Repository navigation
review: a COMMENT middle verdict when medium findings post and nothing blocks #384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| "review": minor | ||
| --- | ||
|
|
||
| The COMMENT middle verdict: a run that finds medium-importance findings and nothing blocking now submits a COMMENT review instead of an approval. The verdict stays mechanical (lib/verdict.ts): REQUEST_CHANGES iff a posted claim carries a blocking label (plus the existing floors), COMMENT iff nothing blocks and the post-veto medium count is nonzero (collapsed mediums count too: the verdict follows what the run found, not which surface showed it, the same invariant that keeps a 21st blocking claim blocking), APPROVE otherwise. HOLD_FOR_HUMAN outranks COMMENT: the hold's no-stamp/no-record effect is what forces the next run to review in full, and a COMMENT run writes both, so a partial assessment holds even when it found mediums (they fold into the hold comment as claim lines). One mechanical guard on GitHub's state model: a COMMENT that would leave this workflow's own prior REQUEST_CHANGES standing upgrades to APPROVE with a note, since GitHub only moves a reviewer's state on APPROVE or REQUEST_CHANGES and the author's fixes already earned the block's removal. A vetoed medium demotes nothing. The stamp and cache-record machinery accept the new verdict (a COMMENT run still records its fingerprint, so re-review depth planning is unaffected), the conformance gate's no-blocking-inline rule covers COMMENT the same as APPROVE, and the frontmatter's allowed-events gains COMMENT (consumers inherit it at bump time; the gh-aw engine passes the event through to GitHub's review API). | ||
|
|
||
| Expected output-shape effect: no change to inline comment count or body sizes; the review event changes from APPROVE to COMMENT exactly when the medium count is nonzero, and the body head reads "Commented — medium-importance findings found; nothing blocks." instead of the approval line. Authors keep a clean green approval only when the run found nothing worth fixing before merge. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -465,6 +465,14 @@ export const runCase = ( | |
| dimensions: toDimensionReport(corpusCase.dimensions), | ||
| policyConflicts: corpusCase.policyConflicts, | ||
| keptBlockingCount, | ||
| // The PRA-7 middle-verdict signal, mirrored from submission.ts so | ||
| // the offline replica plans the same event the shipped path would | ||
| // submit. The harness has no changed-lines veto (fixtures are | ||
| // hand-anchored), so this is the pre-veto count; a fixture that | ||
| // wants a vetoed medium models it as advisory. | ||
| mediumCount: postedCandidates.filter( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (non-blocking): The eval harness's mediumCount mirror is never exercised. A sketch, not a committable replacement: review detailsfound by test-adequacy |
||
| (candidate) => candidate.finding.severity === "medium", | ||
| ).length, | ||
| ...(options.blockingThreshold !== undefined | ||
| ? {blockingThreshold: options.blockingThreshold} | ||
| : {}), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,6 +162,7 @@ export type RefusalFallbackCounter = { | |
| /** A fresh verdict histogram with every event key initialised to `0`. */ | ||
| export const emptyVerdictMix = (): VerdictMix => ({ | ||
| APPROVE: 0, | ||
| COMMENT: 0, | ||
| REQUEST_CHANGES: 0, | ||
| HOLD_FOR_HUMAN: 0, | ||
| }); | ||
|
|
@@ -341,6 +342,7 @@ const asFiniteNumber = (value: unknown): number | undefined => | |
|
|
||
| const isVerdictEvent = (value: unknown): value is VerdictEvent => | ||
| value === "APPROVE" || | ||
| value === "COMMENT" || | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (non-blocking): No test drives a COMMENT run through the verdict histogram. A sketch, not a committable replacement: review detailsfound by test-adequacy |
||
| value === "REQUEST_CHANGES" || | ||
| value === "HOLD_FOR_HUMAN"; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (non-blocking, best-practice): Versioning: semver as the behavior contract for the review package. The README's Versioning section states the rule: "Semver is the behavior contract: a release that changes the reviewer's behavior bumps the major version, so a consumer pinned to
review-v<major>can assume the fundamental behavior holds within a major." This changeset declares"review": minorfor a change that alters the review event the workflow submits (APPROVE becomes COMMENT whenever the post-veto medium count is nonzero). I checkedworkflows/review/CHANGELOG.md: prior minors did carry behavior changes (v1.17.0's downvote adjudication, v1.19.0's adjudicated-corpus key drop), so minor is the house habit — but none of them changed the set of GitHub review events a consumer receives, which is the surface that sentence protects. Bump the major, or record in the changeset why a new submitted review event is within-major?A sketch, not a committable replacement:
review details
found by skill-auditor