Repository navigation
Description
Problem
A verifier verdict that both confirms and refutes a finding can end VERIFIED with no note. This happens when its reason repeats the finding's title without a negation word.
Golden case. Review session 20261003-034353 (S10, release/v0.2.25 at d6ebe97, devsecops persona). qwen3-coder's reply llm_acc69d97 judged two persona findings in one call (ledger row 10536, 48gib-fast, 43,098/635 tokens, finish stop):
- Item 2:
src/devops_cli/ai/review/verification.py:1239MEDIUM, "Potential Race Condition in Type Checking Probe Cache Directory Creation".- The reply says
verified: true,status: VERIFIEDandinvalidated: false. It matches the invalidation criterion "The code does not implement explicit race condition protection for cache directory creation". - Its reason: "...
_TYPECHECK_PROBE_LOCKis used to protect the critical section ... preventing race conditions during concurrent access to the cache directory. This mitigates the potential race condition described in the finding." - The finding is false: line 1239 sits inside
with _TYPECHECK_PROBE_LOCK. - It was reported VERIFIED MEDIUM, with
verified_by=llmandverification_notenull (findings.json row 5). It is one of the two findings behind review.md's "Race condition: 2 verified" theme.
- The reply says
- Item 1:
verification.py:1221(raw HIGH), "Potential Path Traversal in Type Checking Probe".- It has the same shape: VERIFIED, a matched invalidation criterion ("Path.resolve() normalizes paths to prevent directory traversal") and a reason arguing the risk is mitigated.
- It ended UNVERIFIED, which is right, but with
verifier-inconclusive, the note an undecided reply gets. The finding is false.
Mechanism. Lines are at d6ebe97 and unchanged at the release/v0.2.25 tip b299b52.
_apply_single_finding_verification(src/devops_cli/ai/review/verification.py:1928) calls_without_self_refutation(:1939, defined at:1672) before_verdict_status(:1940, defined at:1589)._verdict_status's refuted-and-confirmed branch (:1600) is what keeps a contradictory verdict UNVERIFIED.- For item 2 the matched invalidation criterion is genuine.
_restates_the_findingis False: claim coverage is 0.56, below_RESTATEMENT_OVERLAP(0.6). _reason_confirms(:1662) is True anyway. The reason holds no_NEGATIONword (:1630), and_coverstakes the largest share over the verification criteria and the title. The reason covers the title at 1.0 and the verification criterion at 0.75.- So the invalidation is withdrawn:
invalidatedis set to False and the matched list is emptied._verdict_statusthen sees only the confirmation and returns VERIFIED. - A note is written only for an UNVERIFIED status (
:1969-1970), so the finding carries none. The matched invalidation criterion is dropped from its record. - Item 1's reason contains "not", so nothing is withdrawn and
:1600returns UNVERIFIED._no_verdict_note(:1913) then writesverifier-inconclusive. Its docstring says that note covers both "neither confirmed nor refuted" and "both confirmed and refuted".- In S10, 16 of the 17 inconclusive notes came from a genuinely undecided reply (
llm_448a037a, services.yaml) and 1 from this contradiction. The profile cannot tell them apart.
Criteria polarity does not matter. The persona inverted its criteria on :1239: its verification criterion, "Cache directory creation is protected by a lock to prevent race conditions", describes the safe state. I replayed it with the criteria the right way round and the reply's matched lists swapped to match. The invalidation is still genuine, _reason_confirms is still True on the title alone, and the finding still ends VERIFIED MEDIUM with no note. A fix cannot rely on the criteria's polarity.
Independent of PR #1055 (#845). I replayed offline at origin/fix/verdicts-point-at-evidence (66cc387). The saved reply and S10's two candidates, with their verdict fields reset, went through _parse_verifier_payload, _bind_verdicts_to_findings and _apply_bound_verdicts_to_findings, with no model, gateway or network call.
- :1239 ends VERIFIED MEDIUM,
verified_by=llm, with no note. :1221 ends UNVERIFIED withverifier-inconclusive. - None of fix(review): mitigation and confirmation verdicts point at evidence that exists, and a verdict whose reason refutes it is not applied (#845) #1055's checks applies:
_denial_of_the_claimneeds a negation followed by at least two consecutive claim words, and this reason has no negation._claims_a_failed_criterion_passeddoes not apply, because :1239's recorded criterion run passed._citation_outside_filepasses: line 1239 of 2,397.
- The withdrawal also runs before any of those checks.
Not a v0.2.25 regression. The withdrawal and its place before _verdict_status shipped in v0.2.23 (ea49d6e). The same replay with v0.2.24's code gives VERIFIED MEDIUM with no note.
How often [estimate]:
- Of 2,628 verifier verdicts in
.data/cache/llm, 320 both confirm and match an invalidation criterion. - 74 of those have no
_NEGATIONword in the reason. - 46 of those cover their own title or matched verification criteria at 0.6 or more.
- This is a proxy. It uses the reply's own title and matched criteria, not the finding's, and does not separate genuine criteria from restating ones.
Source: .data/review-evaluation-20261003-s10.md, sections 1.3 and 3. This uses the D10 mechanism as the evaluation's verification pass corrected it.
Acceptance criteria
- A verdict that confirms its finding (
verified: trueor status VERIFIED) and matches an invalidation criterion that_restates_the_findingjudges genuine never ends VERIFIED, whatever its reason says.- It ends UNVERIFIED and reportable, with the contradiction note.
- It takes no
verified_by,verified_ator citation from the verdict. - The self-refutation withdrawal still applies to a verdict that only refutes.
- Every verdict that both confirms and refutes (
_verdict_status's refuted-and-confirmed branch) gets the contradiction note instead ofverifier-inconclusive.- The note kind is
verifier-contradiction(CONST_VERIFIER_CONTRADICTION) if fix(review): mitigation and confirmation verdicts point at evidence that exists, and a verdict whose reason refutes it is not applied (#845) #1055 has landed. Otherwise this item adds it toCONST_VERIFICATION_NOTE_KINDS. verifier-inconclusivestays for a verdict that neither confirms, refutes nor mitigates, and the_no_verdict_notedocstring says so.
- The note kind is
- Golden test:
llm_acc69d97's reply and S10's two findings (verification.py:1221and:1239, verdict fields reset), trimmed to a fixture and run through_bind_verdicts_to_findingsand_apply_bound_verdicts_to_findings.- Both end UNVERIFIED with the contradiction note.
- The test fails on the current code, where :1239 ends VERIFIED and :1221 ends
verifier-inconclusive.
- The :1239 fixture with its criteria the right way round also ends UNVERIFIED with the contradiction note, and fails on the current code. Its verification criterion is "The code does not implement explicit race condition protection for cache directory creation", its invalidation criterion is "Cache directory creation is protected by a lock to prevent race conditions", and the reply's matched lists are swapped to match.
- Tests pin what stays unchanged:
- S10's three pricing verdicts stay UNVERIFIED with
verifier-self-refutation(llm_4df8c3ec:verified: false, INVALIDATED on criteria that restate the finding). - S10's 16 services.yaml verdicts stay
verifier-inconclusive(llm_448a037a, all UNVERIFIED). - A confirmation whose matched invalidation criteria all restate the finding is still VERIFIED.
- S10's three pricing verdicts stay UNVERIFIED with
- A replay over the cached verifier replies whose findings are saved in
.data/reviews/*/candidates.jsoncounts the verdicts whose outcome or note changes. The PR lists them with a one-line judgment each. -
_unverified_note_countscounts the contradiction note under its own kind. A test gives it one such finding. - The tests run offline, call no model, and each runs well under 1 s.
-
changelog.d/1059.mdrecords the fix under### Fixed.CHANGELOG.mdis not edited. -
uv run devops cipasses.
Key questions
- Does PR fix(review): mitigation and confirmation verdicts point at evidence that exists, and a verdict whose reason refutes it is not applied (#845) #1055 (fix(review): mitigation and confirmation verdicts must point at evidence that exists #845) fix this? (proposed) No. The two are independent; see the replay above.
- fix(review): mitigation and confirmation verdicts must point at evidence that exists #845 covers a confirmation or mitigation whose reason denies the claim.
- This item covers a verdict that refutes and confirms at once, and is turned into a confirmation before any check runs.
- They compose: fix(review): mitigation and confirmation verdicts point at evidence that exists, and a verdict whose reason refutes it is not applied (#845) #1055 checks a VERIFIED verdict's reason, and this item keeps a contradiction from becoming VERIFIED. If fix(review): mitigation and confirmation verdicts point at evidence that exists, and a verdict whose reason refutes it is not applied (#845) #1055 lands first, this item reuses its note kind.
- Should the fix change the order or
_reason_confirms? (proposed) The order.- A confirming verdict with a genuine matched invalidation criterion skips the withdrawal, so the refuted-and-confirmed branch decides. That holds whatever the reason says and whichever way the persona wrote its criteria.
- Dropping the title from
_reason_confirmswould also stop this case: the reason covers the correctly polarised criterion alone at only 0.45. - But on a verdict that only refutes, that change alters which correct refutations the withdrawal undoes. That is fix(review): a correct refutation stands when the guard's evidence is a path token, a citation inside the finding's own lines, or generic scanner wording #1021's scope (the withdrawal on generic words), so it is recorded there.
- Does a confirmation still count when every invalidation criterion it matched restates the finding? (proposed) Yes. That is the model filing the claim on the wrong side, the case the withdrawal was written for, and nothing in the reply argues against the finding. A test pins it.
- Is this a v0.2.25 critical fix? (proposed) No.
- fix(review): passing criteria leave a finding for the verifier instead of verifying it, and running the cited test counts as evidence #1043 joined v0.2.25 because v0.2.25's own fix(review): grep-only criteria neither verify nor invalidate a finding, and prompt examples stop teaching them #846 and fix(review): criteria commands run in the reviewed project's environment with a measured python timeout #847 opened its path.
- This withdrawal shipped in v0.2.23 (ea49d6e), and v0.2.24's code gives the same result, so it is not a regression of the current release. fix(review): the report ranks verified findings first, keeps only scanned advisories, and uses one category taxonomy and calibrated severity #948's VERIFIED-first ranking (v0.2.25) only makes it more visible.
- It is P1. v0.2.26 to v0.2.29 are at or over the cap of 12, so it waits in the backlog.
Depends on: none.
Order:
- No constraint with fix(review): mitigation and confirmation verdicts point at evidence that exists, and a verdict whose reason refutes it is not applied (#845) #1055. Whichever lands second rebases, and this item reuses fix(review): mitigation and confirmation verdicts point at evidence that exists, and a verdict whose reason refutes it is not applied (#845) #1055's note kind if fix(review): mitigation and confirmation verdicts point at evidence that exists, and a verdict whose reason refutes it is not applied (#845) #1055 is already in.
- fix(review): a correct refutation stands when the guard's evidence is a path token, a citation inside the finding's own lines, or generic scanner wording #1021 edits
_without_self_refutation's restatement words and_NEGATION. Whichever lands second rebases and keeps both sets of golden cases. - The change touches
ai/review/verification.py(_without_self_refutation,_apply_single_finding_verificationand_no_verdict_note),config/constants.pyand their tests.
Related:
- fix(review): mitigation and confirmation verdicts must point at evidence that exists #845 and PR fix(review): mitigation and confirmation verdicts point at evidence that exists, and a verdict whose reason refutes it is not applied (#845) #1055: confirmations whose reason denies the claim.
- fix(review): a correct refutation stands when the guard's evidence is a path token, a citation inside the finding's own lines, or generic scanner wording #1021: the withdrawal on generic words, and its scope (d) note kinds.
- fix(review): the report ranks verified findings first, keeps only scanned advisories, and uses one category taxonomy and calibrated severity #948: VERIFIED findings are ranked first.
- fix(review): a model verdict that rests on a criterion with no command is not a confirmation #1053: a confirmation resting on a criterion with no command.
- fix(review): review.md says why each finding is unverified and what severity it was raised with, and the profile counts the findings the report holds #1046: review.md shows no notes.
- refactor(review): one finding verifier owns the verdict and its side effects #996: one finding verifier, which moves this code.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 3, 2026
Frozen by the evidence-first review redesign (#1137, owner direction of 2026-10-03): patches to the model generator and verifier stop, and tool-layer fixes continue. This item patches code that #1150 deletes (the verifier path in
verification.py, the guards and verifier prompts,construct_validator.py,criteria_evidence.py, and the known-false-positive catalog).It stays open, labelled
status/blocked, and closes as not planned with "Superseded by #1150" when that item lands. Until then, the interim is the tools-only review (--no-persona-review --no-verification). Do not start work on it.dan-petty-bot commentedon Oct 6, 2026
Moved to v0.2.28: v0.2.28 started with fewer than its 12 items and was topped up to 12 from Ready items, critical fixes and P0 features first. (devops roadmap reprioritize)
fix(review): a verdict that both confirms and refutes its finding sta…
dan-petty commentedon Oct 7, 2026
Resolved by PR #1273 into release/v0.2.28
feat(release): v0.2.28 (#1283)