Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review (codex): drop review-summary marker that collided with its own doc
Adam Eivydc5671ae1300
diff --git a/server/lib/tuiHandshake.js b/server/lib/tuiHandshake.jsindex 137efb8e7b..893f58f741 100644--- a/server/lib/tuiHandshake.js+++ b/server/lib/tuiHandshake.js@@ -398,21 +398,29 @@ export const REVIEW_LOOP_IDLE_TIMEOUT_MS = 900000;// only extends the (bounded) idle window, and a false NEGATIVE just preserves// prior behavior. Matched against ANSI-stripped output.//-// All three patterns are anchored to the literal RENDERED shape rather than a-// bare substring, because this repo bundles the slashdo docs that DESCRIBE-// these banners in prose — `lib/slashdo/lib/multi-reviewer-loop.md` alone-// contains the word "multi-reviewer" dozens of times and the literal phrase-// "Review plan:" once (inside its own instruction text), and this project's-// CLAUDE.md convention text is "run a simplify/self-review pass before-// committing", whose substring "review pass" would otherwise latch on ANY-// CoS agent's ordinary narration or docs-editing — not just an actual+// Both patterns are anchored to the literal RENDERED shape rather than a bare+// substring, because this repo bundles the slashdo docs that DESCRIBE these+// banners — `lib/slashdo/lib/multi-reviewer-loop.md` alone contains the word+// "multi-reviewer" dozens of times, the literal phrase "Review plan:" once+// (inside its own instruction text), AND a fully-rendered example of its own+// aggregate-report heading ("## Multi-Reviewer Summary", in the doc's sample+// output block) — so a THIRD marker keyed on that heading alone would latch+// on any agent reading/quoting that one doc file (codex review flagged this+// exact collision; verified via `grep -rn "multi-reviewer summary"+// lib/slashdo/` — it's the only bundled doc containing that literal string).+// This project's CLAUDE.md convention text is also "run a simplify/+// self-review pass before committing", whose substring "review pass" would+// otherwise latch on ANY CoS agent's ordinary narration — not just an actual// do:release/do:pr/do:rpr run. Anchoring on the shape only the runtime output-// actually has (a rendered `[...]` agent list, a digit/slash pass counter, or-// the literal report heading) keeps the false-positive rate low without-// weakening true-positive detection of the real banners.+// actually has (a rendered `[...]` agent list, or a digit/slash pass counter)+// — verified clean against every bundled slashdo doc — keeps the+// false-positive rate low without weakening true-positive detection: the+// review-plan banner alone is a complete, sufficient signal (it prints once,+// unconditionally, before ANY reviewer pass begins) and the tracker latches+// permanently once set, so the pass-banner pattern only needs to catch the+// (rare) case where the plan banner itself was missed.const REVIEW_PLAN_PATTERN = /review plan:\s*\[/i;const REVIEW_PASS_BANNER_PATTERN = /review pass\s+\d+\s*\/\s*\d+/i;-const REVIEW_SUMMARY_PATTERN = /multi-reviewer summary/i;/*** True when a chunk of ANSI-stripped TUI output shows the multi-reviewer loop@@ -424,9 +432,7 @@ const REVIEW_SUMMARY_PATTERN = /multi-reviewer summary/i;*/export function isReviewLoopSignal(strippedText) {if (typeof strippedText !== 'string' || !strippedText) return false;- return REVIEW_PLAN_PATTERN.test(strippedText)- || REVIEW_PASS_BANNER_PATTERN.test(strippedText)- || REVIEW_SUMMARY_PATTERN.test(strippedText);+ return REVIEW_PLAN_PATTERN.test(strippedText) || REVIEW_PASS_BANNER_PATTERN.test(strippedText);}/**diff --git a/server/lib/tuiHandshake.test.js b/server/lib/tuiHandshake.test.jsindex 3861aef5af..0f32e8feff 100644--- a/server/lib/tuiHandshake.test.js+++ b/server/lib/tuiHandshake.test.js@@ -308,7 +308,6 @@ describe('tuiHandshake — review-loop idle suppression', () => {it('isReviewLoopSignal matches multi-reviewer-loop chrome (case-insensitive)', () => {expect(isReviewLoopSignal('Review plan: [claude, codex] (mode: series, stop-mode: all)')).toBe(true);expect(isReviewLoopSignal('--- Review pass 1/2: codex ---')).toBe(true);- expect(isReviewLoopSignal('## Multi-Reviewer Summary')).toBe(true);});it('isReviewLoopSignal ignores ordinary implementation/output chrome', () => {@@ -319,20 +318,24 @@ describe('tuiHandshake — review-loop idle suppression', () => {expect(isReviewLoopSignal(undefined)).toBe(false);});- // Regression for false-positive latches found across two rounds of local- // review: bare substrings ('review pass', 'review loop', 'multi-reviewer')- // would match this project's own CLAUDE.md convention ("run a simplify/- // self-review pass before committing") and this repo's bundled slashdo docs- // (which say "review loop" and "multi-reviewer" dozens of times, including- // the literal instruction text "Review plan: {REVIEW_AGENTS}..."), latching- // the tracker for ANY CoS agent's ordinary narration or docs-editing — not- // just an actual do:release/do:pr/do:rpr run.+ // Regression for false-positive latches found across three rounds of local+ // review: bare substrings ('review pass', 'review loop', 'multi-reviewer',+ // 'multi-reviewer summary') would match this project's own CLAUDE.md+ // convention ("run a simplify/self-review pass before committing") and this+ // repo's bundled slashdo docs — which say "review loop"/"multi-reviewer"+ // dozens of times, include the literal instruction text "Review plan:+ // {REVIEW_AGENTS}...", AND (codex review's finding) render a fully-formed+ // example of their own "## Multi-Reviewer Summary" aggregate-report heading+ // in a sample output block — latching the tracker for ANY CoS agent's+ // ordinary narration or docs-editing, not just an actual do:release/do:pr/+ // do:rpr run.it('isReviewLoopSignal does NOT match ordinary self-review narration or doc prose', () => {expect(isReviewLoopSignal('running the self-review pass before committing')).toBe(false);expect(isReviewLoopSignal('## Local Agent Code Review Loop')).toBe(false);expect(isReviewLoopSignal('You are a Copilot review loop agent.')).toBe(false);expect(isReviewLoopSignal('the multi-reviewer wrapper dispatches each listed agent')).toBe(false);expect(isReviewLoopSignal('Print the resolved plan before starting: `Review plan: {REVIEW_AGENTS} (mode: ...)`')).toBe(false);+ expect(isReviewLoopSignal('## Multi-Reviewer Summary')).toBe(false);});it('createReviewLoopTracker latches on first signal and stays active through silence', () => {