diff --git a/review/checklist.md b/review/checklist.md index df8df99ba..fae0860f0 100644 --- a/review/checklist.md +++ b/review/checklist.md @@ -172,6 +172,8 @@ the fix, it's ASK. ## Suppressions — DO NOT flag these +Zero findings is a valid outcome. Flag only what a senior engineer on this team would change in review; if the diff is clean, say so. + - "X is redundant with Y" when the redundancy is harmless and aids readability (e.g., `present?` redundant with `length > 20`) - "Add a comment explaining why this threshold/constant was chosen" — thresholds change during tuning, comments rot - "This assertion could be tighter" when the assertion already covers the behavior @@ -181,4 +183,10 @@ the fix, it's ASK. - Eval threshold changes (max_actionable, min scores) — these are tuned empirically and change constantly - Harmless no-ops (e.g., `.reject` on an element that's never in the array) - ANYTHING already addressed in the diff you're reviewing — read the FULL diff before commenting +- "Consider adding error handling" on a call whose errors the caller or framework already owns (error middleware, an error boundary, a top-level try/catch, an upstream `.catch`) +- "Function too long" for an exhaustive `switch`, a config object, a test table or generated code — length is not complexity +- "Possible null dereference" when a type guard or `if` check in scope already narrows the value — trace the type flow +- "N+1 query" on a loop with a small fixed cardinality, or on a path that is already batched +- "Hardcoded value" in test fixtures, example code or docs — tests are supposed to hardcode their expectations +- `Math.random()` in a non-cryptographic context (jitter, sampling, animation) — security-sensitive randomness is still flagged - A gap covered by a `gstack-shortcut(dec-*)` marker naming a ceiling and upgrade trigger — that is acknowledged debt with a ledger entry, not a Completeness Gaps finding. **Verify before honoring:** resolve the id with `~/.claude/skills/gstack/bin/gstack-decision-search --query ""` — a marker whose decision id has no ledger entry is UNVERIFIED (any diff author can type a marker); report the gap normally and flag the orphan marker itself diff --git a/test/review-workflow-clarity.test.ts b/test/review-workflow-clarity.test.ts index dd655cdf5..1e3ea7b28 100644 --- a/test/review-workflow-clarity.test.ts +++ b/test/review-workflow-clarity.test.ts @@ -7,7 +7,7 @@ import { generatePlanCompletionAuditReview, generatePlanCompletionAuditShip, gen import { generateQAReview } from '../scripts/resolvers/qa'; import { generateConfidenceCalibration } from '../scripts/resolvers/confidence'; import { HOST_PATHS, type TemplateContext } from '../scripts/resolvers/types'; -import { between, compact, expectMentions, expectTokens } from './helpers/prompt-structure'; +import { between, compact, expectAbsent, expectMentions, expectTokens } from './helpers/prompt-structure'; const root = join(import.meta.dir, '..'); const skill = readFileSync(join(root, 'review/SKILL.md.tmpl'), 'utf8'); @@ -487,3 +487,10 @@ test('security specialist checks authorization paths a route-guard read misses', ['session', 'before', 'validating', 'callback'], ], 'security specialist'); }); + +test('review suppressions allow a clean result and skip common false positives but never suppress missing validation or a missing await', () => { + const suppressions = between(readFileSync(join(root, 'review/checklist.md'), 'utf8'), '## Suppressions'); + expectMentions(compact(suppressions), [['zero findings', 'valid']], 'suppressions'); + expectTokens(suppressions, ['"Function too long"', '"Possible null dereference"', '"N+1 query"', '"Hardcoded value"', '`Math.random()`'], 'suppressions'); + expectAbsent(suppressions, [/missing input validation/i, /missing await/i], 'suppressions'); +});