From 4dccba23cd29c66b30d5b6d0d17c22cce6fe8257 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 31 Oct 2026 11:08:10 +0000 Subject: [PATCH] test(ship): the review-pass fake outside voice ends with its Recommendation: line, the marker its brief prescribes (#3665 integration) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/review-pass.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/review-pass.test.ts b/test/review-pass.test.ts index 624a57452..9bfc99c89 100644 --- a/test/review-pass.test.ts +++ b/test/review-pass.test.ts @@ -128,6 +128,7 @@ function repo(): { dir: string; env: NodeJS.ProcessEnv } { interface Sub { title: string; prompt: string; status: string; polls: number; model?: unknown; summary?: string; late?: boolean } /** A fake Capy host: the shell is real (the repository's bins), subagents are scripted. */ +const cleanReply = (title: string) => (title.endsWith('outside-voice') ? 'Recommendation: ship as-is because no finding survived' : 'NO FINDINGS'); function host(dir: string, env: NodeJS.ProcessEnv, o: { output?: (title: string) => string; fail?: (title: string) => boolean; reject?: (title: string) => boolean; createThrows?: (title: string) => 'before' | 'after' | undefined; pollsToFinish?: number; lateSummary?: boolean } = {}) { let clock = 0; const subs = new Map(); @@ -135,12 +136,12 @@ function host(dir: string, env: NodeJS.ProcessEnv, o: { output?: (title: string) const starts: number[][] = []; const advance = () => { for (const s of subs.values()) { - if (s.late && !s.summary) { s.summary = o.output?.(s.title) ?? 'NO FINDINGS'; continue; } + if (s.late && !s.summary) { s.summary = o.output?.(s.title) ?? cleanReply(s.title); continue; } if (s.status !== 'working') continue; if (++s.polls < (o.pollsToFinish ?? 1)) continue; if (o.fail?.(s.title)) s.status = 'failed'; else if (o.lateSummary && !s.late) { s.status = 'done'; s.late = true; } - else { s.status = 'done'; s.summary = o.output?.(s.title) ?? 'NO FINDINGS'; } + else { s.status = 'done'; s.summary = o.output?.(s.title) ?? cleanReply(s.title); } } }; const tools = {