Repository navigation
fix(research): preserve native Codex auth in isolated analysis - #6956
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
使用者在已登录的正式 App 点击深度分析,仍可能等到认证失败而看不到结果。 旧路径在本机返回401;复用原生 Chat 已有认证传输后,同一原分析任务明确重试成功,先前失败仍保留。 原研究 Goal 已读回中文分析,原证据未变;后续调用可由 Codex 沿用已有账户负责认证和刷新。 不修改模型、评分、原始证据、用户配置、凭据存储或工具权限,也不把模型输出当作独立科学校准。 当前修复已通过真实 provider 恢复;正式 App 对新 provider 版本的安装采用仍在后续交付中核验。
改动思路
认证与原生账户路由已有共享 helper;分析进程只应复用其公开传输参数,不能为恢复调用而导入用户工具或复制凭据。 只修复隔离分析的 Codex 调用及其回归和文档,不修改模型、提示、评分、来源、前端或权限。
最小修复不是要求用户再次登录,也不是加载整套用户配置。现有 native Chat 已经有不指定 endpoint、不复制令牌的认证 HTTP 传输配置。分析进程复用这个结果,仍让 Codex 负责账户与刷新,模型只能接触当前固定证据。读取缓存、原文和切换语言均不触发新模型任务;只有原来显式执行和重试的分支使用新增参数。
具体改动
依据修改前的 docs/reference/trajectory-assessment.md,版本 b9389edc28cf5b787f387ef426d1bafd0c118cfb:native-account 对应既有本机 Codex 账户调用;observer-isolation 对应证据观察者及原研究边界;explicit-retry-history 对应失败保留和显式重试。三项在此准确 head 都有代码与执行证据,不用新加的文档段落证明自己的正确性。
关键代码讲解
execute(trajectory_assessment.py:70)完成原有 key 与 retry 校验后,复用共享 transport 产生 CLI 参数。没有改变模型、提示、结果路径或分析键。认证参数不含 endpoint、token 或环境密钥,原来的 ignore-user-config、ignore-rules、read-only 与 shell/exec/web 禁用继续存在。shared_chatgpt_transport(codex_context.py:101)是未修改的现有 helper,返回原生认证及 HTTP 默认值,凭据读取和刷新留给 Codex。复用它避免另一套账户读取逻辑,也不需要覆盖 CLI 禁止重定义的 builtin provider。
测试在已有实际临时子进程中检查认证、HTTP、无凭据/endpoint 覆盖和原隔离参数,继续覆盖失败、重试归档、并发/取消、输入和引用完整性。39 项 provider/store/生产 HTTP/native-context 测试通过。真实原任务在准确新 provider 源码下明确重试完成,既有已安装 reader 已显示中文结果,冻结来源摘要未变;模型输出不是合成 fixture 冒充的。公开描述和截图仍不包含真实轨迹或账户资料。
对主干的风险
最关键风险是修认证时意外扩大工具或凭据读取边界。本改动只携带既有公开 transport 参数,不合并用户工具配置,不复制凭据,真实子进程断言保留只读和工具禁用。账户仍由原生 Codex 负责;没有新设置、登录或额外授权轮次,也不自动重试失败任务。
原401和一个被 CLI 拒绝的 builtin 覆盖探针均保留为失败观察,最终代码采用已有共享 custom transport。完整原任务第二次尝试成功,先前失败记录仍保留。六项直接检查、十五项风险选择检查及准确范围质量回执均通过,benchmark-sensitive 人工评审要求由本次执行。按当前 wait_for_ci=false 没有查询远端 CI。新 provider 的正式 App 采用仍需交付时核对,不能从现有 reader 能显示结果推断安装完成。
我的整体评价
APPROVE。long_horizon 为 improved:允许原来已授权但被认证问题阻塞的分析恢复,保留同一输入、身份、旧失败及显式重试。user_experience 为 improved:不用把已存在的登录和配置工作再次交给使用者,也没有为恢复调用开放用户工具。
认证与原生账户路由已有共享 helper;分析进程只应复用其公开传输参数,不能为恢复调用而导入用户工具或复制凭据。 只修复隔离分析的 Codex 调用及其回归和文档,不修改模型、提示、评分、来源、前端或权限。 这是完整的 provider 恢复切片,而不是新的认证能力或权限开关。此作者 COMMENTED 结论只记录准确 head 的评审;合并仍需既有范围授权和新鲜 readiness,安装采用仍单独读回。
English verdict: APPROVE · 31b0026. Reuses native Chat authenticated HTTP transport in the existing isolated observer. Real recovery,39 focused tests and risk-based checks pass; credentials, source evidence, scoring, prompts and tool isolation remain owned by their existing boundaries. Installed provider adoption and scientific calibration stay separate.
深度分析的隔离 Codex 进程没有选用现有原生 Chat 的已认证传输,已登录的本机账户仍可能收到匿名请求的 401。
复用
shared_chatgpt_transport,让 Codex 继续负责已有账户的认证与刷新。保持--ignore-user-config、--ignore-rules、只读沙箱和 shell/exec/web 禁用;不复制令牌、不指定 endpoint、不导入用户工具配置。原失败记录保留,仍须明确重试。Validation: 39 production assessment/store/HTTP/native-context tests passed. The real child fixture now checks the authenticated shared transport and retained isolation. A native Codex probe using that exact transport completed with the existing account. Risk-based canary has no check failures and retains the benchmark-sensitive exact-head review hold. No solver/scoring or source-pack changes.
This is the provider recovery companion to #6955. No UI source changed; its packaged Chinese reading is shown below using the same public synthetic capture. The screenshot is presentation evidence, not authentication or model-quality proof. Provider implementation revision:
31b0026f0c8882ac3f9c302a460f458445df83b3; inherited UI revision:07d38f0c57f99426b622083c25ee2a83098d7819.English: Reuse native Chat's authenticated HTTP transport for the isolated trajectory observer, preserving the existing account and read-only/no-tools boundary. Failed attempts remain available for explicit retry.