From ac297607ff451565dc07952be7eaeba60aa84007 Mon Sep 17 00:00:00 2001 From: Wayner Barrios Date: Mon, 27 Jul 2026 15:27:14 -0400 Subject: [PATCH] Clarify code review recovery order --- skills/code-review/SKILL.md | 6 +++--- tests/code-review-contracts.test.mjs | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/skills/code-review/SKILL.md b/skills/code-review/SKILL.md index dca7574..d748932 100644 --- a/skills/code-review/SKILL.md +++ b/skills/code-review/SKILL.md @@ -97,9 +97,9 @@ Validate every child envelope against the frozen `SCOPE_ID`, assigned role, expe 1. Preserve valid partial output and identify only the missing work. 2. When a successful child response is incomplete or malformed, resume the same child exactly once with the missing fields and scope named. 3. For transient timeout, rate-limit, or transport dispatch failure, retry the task exactly once as a fresh dispatch. -4. For permission denial, unavailable tools, invalid requests, or deterministic failures, do not retry. -5. If parallel dispatch is unavailable, continue unfinished work with serial children. -6. If task dispatch is unavailable or denied, or bounded recovery is exhausted, complete the missing role checklist in the parent. +4. For permission denial, unavailable tools, invalid requests, or deterministic failures, do not retry; a permission denial does not consume the transient-retry budget. +5. If parallel dispatch is unavailable or denied, continue unfinished work with serial children. +6. If individual task dispatch is unavailable or denied, or bounded recovery is exhausted, complete the missing role checklist in the parent. Never interpret failed, blank, malformed, or partial output as no findings. Preserve valid sibling results and cover only missing work locally. diff --git a/tests/code-review-contracts.test.mjs b/tests/code-review-contracts.test.mjs index 052a98b..d6cf671 100644 --- a/tests/code-review-contracts.test.mjs +++ b/tests/code-review-contracts.test.mjs @@ -30,6 +30,12 @@ test("code-review validates child output and bounds recovery", () => { assert.match(review, /never .*failed.*blank.*partial.*no findings/is); }); +test("code-review distinguishes parallel denial from individual task denial", () => { + assert.match(review, /parallel dispatch is unavailable or denied[^.]*serial/i); + assert.match(review, /individual task dispatch is unavailable or denied[^.]*parent/i); + assert.match(review, /permission denial[^.]*does not consume[^.]*transient-retry budget/i); +}); + test("code-review gates clean output on complete ledgers", () => { assert.match(review, /detection coverage ledger/i); assert.match(review, /candidate ledger/i);