修复 API Key app-server 认证重试循环 #205
Reference in New Issue
Block a user
Delete Branch "codex/issue-187"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
修复摘要
Close #187
Issue #187 的根因是:API Key/provider-proxy 模式使用隔离
CODEX_HOME,其中没有 ChatGPTauth.json;Codex app-server 默认启动 remote-control 后,会在desired_state=Unknown时每约 1 秒重试认证,形成持续的认证日志循环。本 PR 的最终修复是启动级禁用,而不是单纯屏蔽日志:
CODEX_INTERNAL_APP_SERVER_REMOTE_CONTROL_DISABLED=1,使 remote-control 从启动时即处于desired_state=Disabled。remoteControl/disable的方案;真实 smoke 证明该 RPC 在无 ChatGPT 登录态时本身会返回remote control requires ChatGPT authentication,无法阻止认证循环。RUST_LOG=warn,仅收敛剩余预期噪音,不承担修复职责。真实 smoke
使用临时 API Key、隔离
CODEX_HOME和 Codex0.150.0-alpha.8:remote control requires ChatGPT authentication,并持续输出Reloading auth/Reloaded auth。CODEX_INTERNAL_APP_SERVER_REMOTE_CONTROL_DISABLED=1后:状态为desired_state=Disabled,5 秒观察窗口内不再出现认证重试循环,仅剩少量启动/退出生命周期日志。--disable remote_control与-c features.remote_control=false未达到同等效果。验证
cargo test --bin genarrative-ai-game-creator-shell codex_app_server:36 passed,1 ignored,0 failedcargo check --bin genarrative-ai-game-creator-shell:通过rustfmt --edition 2021 --check src/agent/codex_app_server.rs:通过npm run ai-game-creator-shell:typecheck:通过npm run check:encoding:通过git diff --check:通过Windows 本机不会执行 Unix-only fake app-server 分支;相关 fixture 已更新,交由 Linux CI 覆盖。真实 smoke 只验证启动与认证循环,没有执行模型请求。
安全说明:临时 API Key 仅用于本次隔离 smoke,未写入仓库、提交或 PR;测试完成后应立即撤销/轮换该 Key。