Skip to content

fix(ci): 修复 config-dir 报告读到半截与 darwin 构建 tsc 堆内存不足 - #2805

Merged
deepcoldy merged 1 commit into
masterfrom
fix/ci-config-dir-report-and-darwin-heap
Nov 4, 2026
Merged

deepcoldy merged 1 commit into
masterfrom
fix/ci-config-dir-report-and-darwin-heap

Conversation

@deepcoldy

Copy link
Copy Markdown
Owner

改了什么

根治两个挡在 PR 上的 CI 失败(按合码标准 G4,不靠同 SHA 重跑转绿):

1. bun-test:config-dir.test.ts 读到半截报告

  • 现象(feat(dashboard): 工作流发起人身份 #2798 的 bun-test):worker pins BOTS_CONFIG onto its CLI child … > deletes an inherited BOTS_CONFIG for a core-only synthetic placeholder 报 SyntaxError: JSON Parse error: Unexpected EOF。
  • 原因:测试按 existsSync(report) 轮询,一看到文件就 JSON.parse(readFileSync(...));假 CLI 用普通 writeFileSync 写报告,先截断建文件、再落字节,CI 竞争下读到的是空内容。strict-env-worker.integration.test.ts 之前修过同一类窗口,这里漏了。
  • 修法:假 CLI 改为写 report.json.tmp 再 renameSync,文件一出现就是完整内容。worker-codex-profile.integration.test.ts 是同样的写法,一并改。

2. bun-binary-darwin:bun run build 里的 tsc 堆内存不足

影响面

只改测试夹具和 CI 工作流的一个环境变量;不涉及产品代码、用户行为、发版产物内容。

测试验证

npx vitest run --maxWorkers=2 test/config-dir.test.ts test/worker-codex-profile.integration.test.ts   # 30 通过
bun test test/config-dir.test.ts                                                                      # 24 通过
npx vitest run --maxWorkers=2 test/release-*.test.ts test/ci-*.test.ts test/binary-self-update.test.ts # 8 个文件 166 通过(读工作流文件的护栏)
python3 -c "import yaml; yaml.safe_load(...)"                                                          # 两个工作流 YAML 可解析

darwin 那一项只能在 CI 上验证:本 PR 的 bun-binary-darwin 会跑带新环境变量的构建;合入后 #2802 同步 master 再看同一 job。

🤖 Generated with Claude Code

- config-dir / worker-codex-profile 的假 CLI 改为 tmp + rename 发布报告:
  测试按「文件存在」轮询后立刻读,普通 writeFileSync 先建文件后落字节,
  CI 竞争下会读到空内容(bun-test: JSON Parse error: Unexpected EOF)。
- macos-15 runner 上 `bun run build` 显式给 Node 6 GB 老生代:整仓 tsc
  约 2.4 GB 已贴着默认上限,新增约 30 MB 类型的 PR 即以 exit 134 OOM。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

🚀 Released in v3.57.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant