Repository navigation
feat: replace includeSuggestions with a minSeverity floor - #87
Conversation
🤖 AI code reviewDecision: Ready for human review (with comments) Overall PR risk: Medium. This PR replaces the boolean
|
56da4bf to
268d1b6
Compare
268d1b6 to
cd6cfbc
Compare
|
Review notes from a multi-model review (Codex, Grok and Claude, each finding then re-checked against the code). Fixes are in 295f579, pushed to this branch. 1. "Request changes" with zero findings (holds, reproduced).
2.
3. Low. Added a test that a scope config's Not changed: when the floor drops findings, the coordinator summary can still mention them. That already happened with dropped suggestions. Checks: typecheck, |
`policy.minSeverity` names the least severe level a review keeps, and defaults to `design`. A config that still sets `includeSuggestions` loads as before (`true` keeps everything, `false` keeps `critical`, `warning` and `design`) with a setup warning that names the replacement, because zod would otherwise strip the key and silently change what a repo's reviews show. This repo's own reviewer setup moves to `minSeverity: "design"`, and its prompts ask for `design` findings the same way the templates do.
…rn on includeSuggestions in doctor - applyReviewPolicy approved only an approve_with_comments left with no findings. A raised floor (critical, say) can drop every finding a request_changes rested on, which read "Request changes" over "No findings." and exited 1 locally. Approve whenever nothing remains, the same rule as decisionAfterVerification. - The includeSuggestions deprecation rode in setupWarnings, which ecr doctor fails on, so every repo still setting the key failed doctor although its reviews work. It is now its own `deprecations` field: still a setup note on every review, but a ⚠ in doctor. - A test that a scope config's includeSuggestions sets its own floor. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
295f579 to
a3ab928
Compare
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
#86 makes the severity scale five ordered levels:
critical,warning,design,suggestion,nit. The booleanincludeSuggestionscan only gate a fixed set of them, which fits an ordered scale badly. The README already called the setting the "severity floor", sopolicy.minSeverityreplaces it.How
policy.minSeveritytakes one of the five severities, andapplyReviewPolicydrops every finding below it by comparingSEVERITY_RANK. It defaults to"design", which keeps exactly whatincludeSuggestions: falsekeeps in #86, so default reviews don't change.The config schema is a plain
z.object, which strips unknown keys, so removingincludeSuggestionsoutright would silently drop the suggestions of a repo that sets it (expo/expo setsincludeSuggestions: true). So it still loads:truemaps to"nit"andfalseto"design", and the loader adds a setup warning that names the replacement. If both keys are set,minSeveritywins and the warning says to removeincludeSuggestions. Setup warnings show as setup notes in the PR comment and inecr doctor.This repo's own reviewer setup moves to
minSeverity: "design", and itsshared.mdandcoordinator.mdget the samedesignrules as the templates in #86, so its self-reviews start reporting design findings. It reviews itself from source at the PR's base commit, so these prompts never run on an engine without thedesignlevel.This is stacked on #86, which adds the
designandnitlevels.Test Plan
bun test(800 pass),bun run typecheck,bun run lint,bun run fmt:checkandbun run llp:checkall pass. The new config loader tests fail before the change and pass after: theminSeverityfloor and its default, and theincludeSuggestionsalias with its warning (three cases). The policy test now checks three floors. I also ranecr doctorfrom source on a config withincludeSuggestions: true, and it prints the deprecation warning with the fix. On this repo's own setup,ecr ref-check,ecr verify-configandecr doctorpass with no setup warnings. I haven't run it against a live PR yet.