Headless `run` is unusable outside a configured HOME: silent hangs, exit-code 0 on fatal errors, provider env split-brains
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- bun, google-cloud, typescript
- 领域
- authentication, cli, cloud, testing-qa
调研方向
从 PR #1092 的 eval harness 开始,通过已编译的 run CLI 复现文档中记录的仅使用环境变量的运行,并捕获 OPTIMIZER_EVAL_TRANSCRIPT。检查 provider.ts:629 以及错误和流退出路径,然后使用 bun test 验证致命错误会返回非零状态、进程会终止、流会完成或失败,并验证文档中记录的 provider 变量能够一致地工作。
由索引模型根据 Issue 内容生成。
描述
Found while running the dbt-optimizer live eval (PR #1092) — the eval spawns the compiled binary in an isolated HOME with env-only model credentials, which is exactly the headless/CI posture. Eight runs produced six distinct product defects before a single model call succeeded:
runexits 0 on fatal errors.Error: Token refresh failed: 400andModel not found: ...both print to the transcript and exit 0. Headless consumers cannot detect failure by exit code.- Errored CLI lingers as a dangling process. After a provider-lookup error, the process survived
spawnSynctimeout (SIGTERM and SIGKILL configured) — observed alive ~2h and ~69m in two runs untilbun testforce-killed it. - Silent stream hang on google-vertex-anthropic. With valid ADC (verified via
gcloud auth application-default print-access-token), the session starts, the title-agent call is issued... and nothing ever arrives — no error, no timeout, no finish. Logs end atsession.updated. - Google provider env split-brain. Provider detection accepts
GEMINI_API_KEY, but the SDK call then demandsGOOGLE_GENERATIVE_AI_API_KEY— detection succeeds, invocation fails. - Vertex provider env split-brain. The models.dev env list advertises
GOOGLE_VERTEX_PROJECT/GOOGLE_VERTEX_LOCATION, but the loader (provider.ts:629) only detects viaGOOGLE_CLOUD_PROJECT/GCP_PROJECT/GCLOUD_PROJECT;GOOGLE_VERTEX_PROJECTis an output var only. Env-only vertex configuration per the documented names cannot work. - OAuth auth store is location-bound. Copying
auth.jsonto a new HOME yieldsToken refresh failed: 400(refresh-token rotation), so OAuth accounts have no headless path at all; and per (1) that failure is invisible to exit-code checks.
Repro for each is in the PR #1092 eval harness: OPTIMIZER_LIVE_EVAL=1 + OPENCODE_TEST_CLI + the documented env vars; transcripts captured via OPTIMIZER_EVAL_TRANSCRIPT.
Suggested severity: (1) and (3) first — they make headless usage silently unreliable; (4)/(5) are one-line env additions; (2) needs a process-exit audit on the error path; (6) needs a documented headless auth story (API-key path or device-flow re-auth).
- 主要语言
- TypeScript
- 星标
- 813
- 派生
- 134
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 65
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
AltimateAI/altimate-code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
AltimateAI/altimate-code#1359 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
AltimateAI/altimate-code#1323 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
AltimateAI/altimate-code#1288 ·
-
难度 1/5 1 小时以内 新手友好度 92/100
AltimateAI/altimate-code#1285 ·
-
privacy: Altimate Base consent dialog no longer discloses persistent per-installation identifier 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
AltimateAI/altimate-code#1284 ·
查看 AltimateAI/altimate-code 的全部 Issue
相似的 Issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
Crush 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
catppuccin/catppuccin#3125 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
ElementsProject/cln-application#167 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Quantco/pnpm-licenses#17 ·
-
难度 2/5 1-3 小时 新手友好度 75/100