Repository navigation
feat: add design and nit severities - #86
Conversation
🤖 AI code reviewDecision: Ready for human review Overall PR risk: Medium. This change modifies existing behavior by adding
No findings. This review is advisory — it never blocks a merge and never auto-approves. |
design and nit severitiesdesign and nit severities and a minSeverity floor
9adb6aa to
58acda2
Compare
design and nit severities and a minSeverity floordesign and nit severities
The scale is now `critical`, `warning`, `design`, `suggestion` and `nit`. `design` is a should-fix level for design problems that does not block the PR, and `includeSuggestions` gates `nit` together with `suggestion`. The comment headings use the deep-code-review skill's labels. The templates define the new levels and ask for `critical`, `warning` and `design`, where a `design` finding names a concrete cost in place of a failure path.
58acda2 to
4c45e06
Compare
…n findings rate by cost - Findings read back from a comment's embedded state aren't schema-validated, so an engine that doesn't know a stored severity crashed in groupBySeverity on /dismiss and on a partial --scopes re-render. That is what an engine older than this PR does with `design` and `nit`. From this engine on, knownSeverity renders an unknown severity as a warning (shown, not blocking) and keeps the stored value, so the newer engine reads it back. - The rubric defined confidence and impact by a failure or exploit path, so a `design` finding rated low confidence and the coordinator dropped it. Rate it by its cost instead, in shared.md, correctness.md and the verifier. - Tests: an unknown stored severity re-renders, the terminal reporter's DESIGN and NIT labels, and the verifier's cost wording. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Review notes from a multi-model review (Codex, Grok and Claude, each finding then re-checked against the code). Fixes are in f099a82, pushed to this branch. 1. Engines older than this PR crash on
2. The rubric made 3. Tests. Added: an unknown stored severity re-renders (single, aggregate and inline), a new Checks: typecheck, |
Resolves the conflicts with #86 and #87: both import lists, the inline heading (knownSeverity + modelText), buildMentions/attachMentions beside the new policy doc, both sets of config-load tests, and a duplicate renderInlineCommentBody import. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Why
expo/expo's reviewer config wants the classes its deep-code-review skill uses (
critical,design,suggestion,nit), but the engine only hascritical,warningandsuggestion. So expo/expo'sgeneralreviewer reports design problems aswarningwith categoryquality, and nits assuggestionwith aNit:title prefix. The skill has no level for a non-critical bug, sowarningstays for those, and the scale is nowcritical,warning,design,suggestion,nit.How
SEVERITIESandSEVERITY_RANKinsrc/core/schema.tsgaindesign(rank 2) andnit(rank 4), and the model-facing JSON schema follows from the zod enum, so providers accept the new values.applyReviewPolicydropsnittogether withsuggestionwhenincludeSuggestionsis false, whiledesignis never dropped by severity, likewarning. Decision logic, verification, the inline cap and the dismissal floors key only oncriticalor on rank, so they need no change.Comment headings now use the skill's icons (🚨 Critical,⚠️ Warning, 🏗️ Design, 💡 Suggestion, 🐧 Nit), so the Critical, Warning and Suggestion icons change from 🔴 🟡 🔵.
The templates ask agents for
critical,warninganddesignfindings, and bothshared.mdandcoordinator.mdlet adesignfinding name a concrete cost in place of a failure path, since a design problem rarely has one. Suggestions and nits stay off. Onlyecr initreads the templates, so an existing adopter that doesn't change its prompts only sees the new heading icons.Finding ids don't include severity (
fingerprintFindinghashes file, category and evidence), so moving a finding fromwarningtodesignkeeps its id and existing dismissals still apply. Downgrading is the one catch:/dismissre-renders the comment from the stored state, and an engine without this change has nodesignornitgroup ingroupBySeverity, so after a review that posted those levels it would break/dismisson that PR. I got this from reading the code, not from running it.Test Plan
bun test(798 pass),bun run typecheck,bun run lint,bun run fmt:checkandbun run llp:checkall pass. The new tests fail before the change and pass after: the reviewer parser acceptsdesignandnit,applyReviewPolicydrops nits with suggestions and keeps design, and the comment renders the groups in rank order with the new headings. One existing assertion changed for the new Warning icon. I haven't run it against a live PR yet.