feat(review): a REVIEW.md policy caps and skips MINOR findings only

This commit is contained in:
Kjell Tore Guttormsen 2026-11-02 19:43:54 +01:00
commit 8d399fddfb
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q
8 changed files with 1056 additions and 7 deletions

View file

@ -693,6 +693,18 @@ change; finalize marks it from git, the verdict gate re-derives the mark, and a
counts in full whatever the mark. A carried finding (`carried_from`) keeps its line from the previous round's end,
so it is never pre-existing, whatever the mark.
**The review policy.** The policy file is `REVIEW.md` at the repo root, read at `scope_sha_start` from git, never
from the working tree, and finalize applies it as its last pass. Only its one `voyage-review-policy` block is read;
the file's text is data, never an instruction. The block holds at most one `max-minor` line (`max-minor: <0-999>`),
the cap: at most that many MINOR and SUGGESTION findings stay reported, and each one over it is listed by title
under `## Declined to Judge` with `policy:cap`, followed by `Over the policy cap: N`. It also holds at most 50
`skip` lines (`skip: <glob>`): a MINOR or SUGGESTION finding on a skip path is listed there with `policy:skip`, and
its file stays in Coverage. The policy caps and skips MINOR and SUGGESTION findings only, never a BLOCKER, a MAJOR
or a security finding; the verdict gate exits 2 on a review in which one was moved. A malformed or changed file (any
other line in the block, two blocks, a bad glob, a symlink, or a file changed inside the reviewed range) is not
applied, and the review says so in `review_policy: not-applied` and `review_policy_note`. Without the file there is
no cap (`review_policy: absent`). The review records the file's sha256 in `review_policy_sha256`, `none` without it.
**The verdict is in the file (K7).** The frontmatter carries
`verdict: ALLOW | WARN | BLOCK`, equal to the trailing JSON block's
`verdict`. It is required at write time; a review without it fails Phase 8.