Skip to content

Persist/coordinator event sourcing#286

Closed
James-FE wants to merge 4 commits into
mainfrom
persist/coordinator-event-sourcing
Closed

Persist/coordinator event sourcing#286
James-FE wants to merge 4 commits into
mainfrom
persist/coordinator-event-sourcing

Conversation

@James-FE

Copy link
Copy Markdown
Owner

repair CI。

总结:CI 挂了 3 天,根因是 LocalAgentTask.test.ts 里 11 个 mock.module() 都只提供了部分导出,--isolate 模式的独立 worker 里传递依赖找不到完整的模块导出就崩了。6月11日 GitHub 更新 macOS runner 镜像后暴露了这个缺陷(之前在 Linux 本地也不挂因为全局模块缓存救了一命)。

Codex 的修复:每个 mock 先 await import() 真实模块拿到全部导出,...RealModule 做基底,只覆写测试需要改的几个函数。3979 pass / 0 fail。

James-FE added 4 commits June 12, 2026 17:59
afterEach now clears CLAUDE_CODE_USE_OPENAI / CLAUDE_CODE_USE_GEMINI /
CLAUDE_CODE_USE_GROK so external env vars don't hijack adapter selection.
Fixes CI test failures when these flags leak into the test environment.
Previously tail -30 truncated failures that appeared before the summary.
Now grep for (fail) markers when tests fail, so we can see what broke.
…te failures

Every mock.module() now imports the real module first and spreads all
exports, then overrides only the specific functions the test controls.
Fixes 'Export named X not found' errors in isolate mode when transitive
imports need exports not listed in the partial mock.

CI has been failing since June 11 macOS runner update exposed this.
3979 pass, 0 fail in both normal and --isolate modes.
@James-FE James-FE closed this Jun 12, 2026
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