Skip to content

fix(review): verdicts land on the finding shown, record who gave them, and machine-invalidated candidates can be overturned #949

Closed

Description

@dan-petty

Problem

A person cannot reliably give a review verdict, and the record does not say who gave one. Found while analysing review session 20261001-224227 (2026-10-02). Across 27 local sessions and 2,800 findings, not one has verified_by=human.

  • Verdicts land on the wrong finding.
    • devops review findings --status/--verified numbers the filtered list (commands/review.py:876-879), while verify --index indexes the unfiltered findings.json (:971-981).
    • The MCP verify_finding tool (ai/mcp/server.py:198) indexes from 0.
    • --title takes the first substring match.
  • Machine-invalidated candidates cannot be seen or overturned.
    • They are never in findings.json, so review findings --invalidated is always empty for pipeline sessions.
    • A real defect the machine wrongly invalidated is the most costly error, and no command can restore one.
  • Every caller is recorded as human.
  • The default --status INVALIDATED means one careless call both invalidates a finding and teaches the learned catalog.
  • A reset leaves side effects behind. Resetting a finding to UNVERIFIED leaves its learned-catalog and mitigations-ledger entries in place.
  • A redundant settings load. path, branch and pr load settings twice (commands/review.py:524); triage idx 280.

Acceptance criteria

  • Stable numbering. review findings shows each finding's index in findings.json even when filtered, and verify --index uses that number. The MCP tool takes the same 1-based index.
  • Candidates can be judged. review findings --candidates lists candidates.json, and verify --candidate <n> gives a verdict on one. A candidate a person marks VERIFIED or MITIGATED moves into findings.json, with verified_by set to the adjudicator.
  • Provenance. verify takes --adjudicator {human,agent}, and the MCP tool always records agent. History ranking (ai/review/history.py) and the dataset exporter count only human.
  • No default verdict. --status is required.
  • Resets undo their side effects. Resetting a finding to UNVERIFIED reverts the catalog and ledger entries its verdict created.
  • One settings load in each review command.
  • Tests:
  • Docs. docs/commands/review.md, the knowledge base and AGENTS.md describe the commands as they now work.
  • uv run devops ci passes.

Key questions

Activity

  1. added this to the v0.2.25 milestone on Oct 2, 2026
  2. added
    type/bug
    scope/review
    priority/p1-high
    on Oct 2, 2026
  3. dan-petty commented on Oct 2, 2026

    @dan-petty
    OwnerAuthor

    Closed by #994, merged into release/v0.2.25.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

  4. added a commit that references this issue on Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/reviewtype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions