fix(tests): 修复三类优化实现后的测试适配
- pipeline.test.ts:PipelineDeps 增加 syncMain 可注入接口(默认用真 git), 测试 mockDeps 加 syncMain=no-op + runConflict,消除 fake-worktree 上真 git 调用失败 - models.test.ts:reviewer 三档默认 fable-5、project.model 不覆盖复审/conflict、 MODEL_FALLBACK_CHAIN 三项链;pickFallbackModel 改为取链上下一档(循环)而非首个不等项 - ingest.test.ts:verdict=reject 硬闸测试改为断言未进 exec_review Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -56,6 +56,8 @@ function mockDeps(overrides: Partial<PipelineDeps> = {}): PipelineDeps {
|
||||
reviewCode: async () => okReview,
|
||||
reviewSecurity: async () => okSecurity,
|
||||
runPlanner: async () => ({ ok: true, transcriptRef: '/tmp/plan.jsonl', sessionId: 'sess-plan', finalText: '方案正文' }),
|
||||
runConflict: async () => ({ ok: true, transcriptRef: null, sessionId: null, finalText: null }),
|
||||
syncMain: async () => null, // no-op:测试环境无真实 git worktree,跳过同步
|
||||
...overrides,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user