Skip to content

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

fix: address claude review contract findings

[._.]/ Adam Eivy6c6e40189883
diff --git a/server/services/agentPromptBuilder.test.js b/server/services/agentPromptBuilder.test.js
index f37954d679..5a81101df8 100644
--- a/server/services/agentPromptBuilder.test.js
+++ b/server/services/agentPromptBuilder.test.js
@@ -2836,8 +2836,9 @@ describe('buildReviewLoopFollowUpSection — CLI reviewer procedure inlining', (
);
expect(out).toContain('directly affected contracts only');
expect(out).toContain('concrete wrong outcome');
- expect(out).toContain('only a substantive fix earns another round');
- expect(out).toContain('do not expand into a repository-wide audit');
+ expect(out).toContain('only substantive fixes do');
+ expect(out).toContain('skip repository-wide audits');
+ expect(out).toContain('This affects looping only, not clean/partial verdicts');
});
});
diff --git a/server/services/codeReview.js b/server/services/codeReview.js
index adba34a834..b53fd0a0e3 100644
--- a/server/services/codeReview.js
+++ b/server/services/codeReview.js
@@ -249,7 +249,7 @@ const CODE_REVIEW_SYSTEM_PROMPT = `You are a careful senior code reviewer. The u
## Blocking
## Recommended
-For each finding, name the file:line (when known) and explain the concrete wrong outcome + suggested fix in one or two sentences. If you find nothing actionable, reply with exactly: \`No findings.\``
+For each finding, name the file:line (when known) and explain the concrete wrong outcome + suggested fix in one or two sentences. Omit a severity heading when it has no findings. If you find nothing actionable, reply with exactly: \`No findings.\``
/**
* Run a single code-review request against the configured local-LLM backend.
diff --git a/server/services/codeReview.test.js b/server/services/codeReview.test.js
index a5c177881a..fa0dc9f1fa 100644
--- a/server/services/codeReview.test.js
+++ b/server/services/codeReview.test.js
@@ -435,6 +435,7 @@ describe('codeReview helpers', () => {
expect(body.messages[0].role).toBe('system')
expect(body.messages[0].content).toContain('at most five')
expect(body.messages[0].content).toContain('concrete wrong outcome')
+ expect(body.messages[0].content).toContain('Omit a severity heading')
expect(body.messages[0].content).not.toContain('## Nits')
expect(body.messages[1].content).toContain('diff --git a b')
})
diff --git a/server/services/cosChallenge.js b/server/services/cosChallenge.js
index 6d3f9a889b..90479b71f8 100644
--- a/server/services/cosChallenge.js
+++ b/server/services/cosChallenge.js
@@ -121,7 +121,7 @@ export function buildChallengeResolutionPatch({ outcome, note, resolvedBy, now =
*
* When a challenge is resolved by re-running a reviewer against the current diff
* (rather than a human verdict), the merge-gating signal is the reviewer's
- * `## Blocking` section — nits/recommended never block a merge, so only a
+ * `## Blocking` section — a `## Recommended` finding never blocks a merge, so only a
* surviving blocking finding sustains the original rejection. The local-LLM
* reviewer emits the exact `No findings.` sentinel for a fully clean diff
* (see codeReview.js CODE_REVIEW_SYSTEM_PROMPT) and a `## Blocking` header only
diff --git a/server/services/promptSections/reviewLifecycle.js b/server/services/promptSections/reviewLifecycle.js
index cfa69d8454..90441c9ee3 100644
--- a/server/services/promptSections/reviewLifecycle.js
+++ b/server/services/promptSections/reviewLifecycle.js
@@ -462,7 +462,7 @@ Only a successfully extracted \`.findings\` value is the review text; treat it l
? 'Copilot is configured after another reviewer, so the system did NOT pre-request it — request the Copilot review yourself when you reach its turn (after the earlier reviewers’ fixes are pushed), and invoke the other reviewers yourself.'
: 'The system did NOT pre-request a reviewer because no Copilot review leads the order — you must request/invoke each configured reviewer yourself against the PR diff.';
const repeatedCommentsNote = '**Repeated comments:** If a fresh review round only re-raises feedback you intentionally rejected (with a reply explaining why), treat that round as clean and move on.';
- const reviewScopeNote = '**Review scope and convergence:** inspect this change and its directly affected contracts only. Report and fix material issues with a concrete wrong outcome; do not expand into a repository-wide audit or spend a round on style, naming, formatting, refactoring preferences, speculative edge cases, or minor nits. A pass with no substantive finding is clean, and a pass with only marginal findings should converge rather than trigger another review; only a substantive fix earns another round.';
+ const reviewScopeNote = '**Review scope and convergence:** review this change and directly affected contracts only. Report material issues with concrete wrong outcomes; skip repository-wide audits, style, refactoring preferences, speculation, and nits. Marginal findings alone do not earn another round; only substantive fixes do. This affects looping only, not clean/partial verdicts for stop-mode or cross-phase gates: record what the reviewer reported and what you committed.';
// Challenge protocol (#2471): auto-invoke the bounded worker↔reviewer dispute
// from the review loop. When a reviewer's BLOCKING finding is a false positive,
// the agent disputes it once via POST /challenge instead of silently complying