Skip to content

feat(review): a person's VERIFIED verdict sets the admitted finding's stored state to CONFIRMED #2414

Description

@dan-petty

Problem or Motivation

CONTEXT.md says: "Only a person's valid verdict or a replayed observation confirms" a finding, and the review redesign (#1137, child P2-10, #877) says: "A valid verdict sets CONFIRMED". The code does not do this (origin/main bb46660):

  • FindingState.CONFIRMED and Finding.confirmed_by exist (src/devops_cli/review/state.py, src/devops_cli/review/finding.py), but no code sets them. admit() writes confirmed_by=None (src/devops_cli/review/admission.py:217), and git grep CONFIRMED src finds no other writer.
  • A session stores no finding state. findings.sarif holds baselineState and the fingerprints, but not the state (src/devops_cli/security/sarif.py). findings.json and candidates.json hold SavedFinding, which has the verdict fields (status, verified_by, verified_at) and no state.
  • devops review verify writes the verdict with apply_verdict (src/devops_cli/ai/review/verdicts.py) and changes no state.

#877 delivers the other half of P2-10: the feedback export counts each subject once and keys human verdicts by fingerprint v2. This item is the CONFIRMED half, which #877 left out because it needs the design decisions below.

Proposed Solution & Architectural Design

  • Decide where a session stores the state of each admitted finding: a SARIF result property (properties.state, properties.confirmedBy) in findings.sarif, or a state field on SavedFinding.
  • devops review verify --status VERIFIED on a finding that has a fingerprint v2 sets its state to CONFIRMED with confirmed_by="human".
  • Decide what a later verdict does. _VALID_TRANSITIONS lets CONFIRMED move only to FIXED, but a person can change VERIFIED to INVALIDATED with devops review verify. Either the transition table allows CONFIRMED to OPEN for a person's later verdict, or verify refuses the change and names the reason.
  • Decide whether MITIGATED (the defect is there, but a named guard limits it) also confirms.
  • Name the reader of the stored state (for example review.md, devops review findings, or the feedback export record), so the state is not a field that nothing reads.

Target Subsystem

Code review: src/devops_cli/review/ (state, finding, admission), src/devops_cli/ai/review/verdicts.py, devops review verify, the session files.

Existing Tool Considered

SARIF 2.1.0 has no CONFIRMED state of its own. A result property bag (properties) holds tool-specific data, and suppressions hold suppression state. No tool records a person's verdict as a finding state, so the change uses the SARIF property bag and builds nothing new.

Acceptance criteria

  • A person's VERIFIED verdict on an admitted finding sets its stored state to CONFIRMED and records who confirmed it. A test reads the state back from the session files.
  • The rule for a later verdict on a CONFIRMED finding is tested.
  • A reader of the stored state is named and tested.

Proposed design

Problem statement

A person's VERIFIED verdict on an admitted finding does not set the finding's stored state to CONFIRMED. The Finding model has the state and confirmed_by fields, but no code writes them. The session files hold no state. A person who verifies a finding gets no persisted confirmation record, and no command reads one back.

Acceptance criteria

  • Criterion 1: A person's VERIFIED verdict on an admitted finding with a fingerprint v2 sets its stored state to CONFIRMED and records confirmed_by as human.
    Verification: Run a test that applies a VERIFIED verdict via apply_verdict, then reads the state and confirmed_by fields back from the SavedFinding in findings.json.
  • Criterion 2: A person's MITIGATED verdict on an admitted finding with a fingerprint v2 also sets its stored state to CONFIRMED and records confirmed_by as human.
    Verification: Run a test that applies a MITIGATED verdict via apply_verdict, then reads the state and confirmed_by fields back from the SavedFinding in findings.json.
  • Criterion 3: A later verdict that changes a CONFIRMED finding back to UNVERIFIED or INVALIDATED moves its state to OPEN and clears confirmed_by.
    Verification: Run a test that sets CONFIRMED, then applies an INVALIDATED verdict, and asserts the state is OPEN and confirmed_by is None.
  • Criterion 4: The transition table allows CONFIRMED to OPEN for a person's later verdict.
    Verification: Call can_transition(FindingState.CONFIRMED, FindingState.OPEN) and assert it returns True.
  • Criterion 5: A named reader displays the stored state of each finding.
    Verification: Run the reader command or function and assert the output includes the state value for a CONFIRMED finding.

Key questions

  • Where does a session store the state of each admitted finding?: Add state and confirmed_by fields to SavedFinding. SavedFinding already holds the verdict fields (status, verified_by, verified_at) and is what findings.json and candidates.json persist. The Finding model already has these fields, so the change copies them into the saved form. (proposed) [sources: src/devops_cli/review/finding.py, src/devops_cli/ai/review/verdicts.py]
  • What does a later verdict on a CONFIRMED finding do?: Allow CONFIRMED to OPEN. Add FindingState.OPEN to the CONFIRMED row of _VALID_TRANSITIONS. When a person changes the verdict to INVALIDATED or UNVERIFIED, the state moves to OPEN and confirmed_by clears. This matches CONTEXT.md: a person's valid verdict confirms, and a person can change that verdict. (proposed) [sources: src/devops_cli/review/state.py:34, CONTEXT.md]
  • Does a MITIGATED verdict also confirm the finding?: Yes. CONTEXT.md defines MITIGATED as the defect being there with a named guard limiting it. Since the defect is there, the finding is confirmed. Both VERIFIED and MITIGATED set state to CONFIRMED. (proposed) [sources: CONTEXT.md, src/devops_cli/ai/review/verdicts.py]
  • What is the reader of the stored state?: The devops review findings command displays the state of each finding. The feedback export record from feat(review): feedback export counts each review subject once and keeps every human verdict #877 also includes it. This ensures the state field is read by at least one user-facing output. (proposed) [sources: openspec/changes/archive/2026-10-28-877-feedback-export-per-subject/proposal.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/feature
    on Oct 28, 2026
  2. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

    • Type: type/feature. The candidate adds new behaviour: a VERIFIED verdict sets the finding state to CONFIRMED and records the confirmer.
    • Priority: P2-Medium. It completes a planned review-redesign step but is not a blocking defect or security gap.
    • Value: Medium. Users who verify findings gain a persisted CONFIRMED state and a named reader, closing a gap in the review workflow.
    • Effort: Medium. It needs design decisions on storage location, transition rules, and a reader, plus code changes across state, finding, admission, verdicts, and session files.
    • Related: feat(review): feedback export counts each review subject once and keeps every human verdict #877, which asks for a different change. Both are halves of P2-10; #877 delivers the feedback export half, while this candidate delivers the CONFIRMED-state half that #877 left out.
  3. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Status set to Ready at 73d1807 (see proposed design in issue body).

  4. added
    priority/p2-medium
    status/ready
    value/medium
    effort/medium
    on Oct 28, 2026
  5. added
    scope/review
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Oct 30, 2026
  6. removed
    status/in-review
    on Oct 31, 2026
  7. added a commit that references this issue on Oct 31, 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

    effort/mediumpriority/p2-mediumscope/reviewsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions