Skip to content

feat(cli): disposition set — manual human verdict (#4)#42

Merged
pureliture merged 1 commit into
mainfrom
claude/human-disposition
Jun 19, 2026
Merged

feat(cli): disposition set — manual human verdict (#4)#42
pureliture merged 1 commit into
mainfrom
claude/human-disposition

Conversation

@pureliture

Copy link
Copy Markdown
Contributor

What

Add disposition set — a CLI for a person/analyst to record a true_positive /
false_positive verdict on a finding, through the same channel the Ollama
verifier uses
(set_finding_disposition → global FINDING_STATE +
append-only STATE_EVENT ledger), tagged actor=human / source=manual.

Why

Today only the AI verifier auto-dispositions; there was no way for a human to
record a verdict. Because finding_id is branch/commit-stable, a cleared finding
stays cleared on re-detection (global state), so a manual verdict suppresses
future re-asks
— exactly the human-triage feedback loop that was missing.

Changes

  • cli/commands/disposition.py: disposition set --finding-id --verdict [--reason --repo --rule-id]. Reuses disposition_status_for_verdict
    (false_positiveFALSE_POSITIVE, true_positiveOPEN); takes repo/ruleId
    from the finding's stored state unless overridden; dynamodb-only (exit 2);
    unknown finding → exit 2.
  • app.py: register the command (+ registration-order lock updated).
  • Spec: docs/workbench/specs/human-disposition/ (research-grounded self-Q&A).

Test

  • uv run pytest — 690 passed (false/true positive mapping + recorded
    actor/source/reason/repo/rule, unknown-finding exit 2, repo/rule override,
    missing repo/rule exit 2, jsonl exit 2).
  • governance.public_safety clean.

Out of scope

  • Notification/endpoint integration (design exclusion).
  • IGNORED status (not a Verdict value) — possible follow-up.

Related to #23 follow-on residual work.

A person can record true_positive/false_positive on a finding through the same
channel the Ollama verifier uses (set_finding_disposition → global FINDING_STATE
+ STATE_EVENT ledger), with actor=human / source=manual. Because finding_id is
branch/commit-stable, a cleared finding stays cleared on re-detection, so future
re-asks are suppressed.

- cli/commands/disposition.py: `disposition set --finding-id --verdict
  [--reason --repo --rule-id]`; reuses disposition_status_for_verdict
  (false_positive→FALSE_POSITIVE, true_positive→OPEN); reads repo/ruleId from the
  finding's stored state unless overridden; dynamodb-only (exit 2), unknown
  finding → exit 2.
- app.py: register the command.

Out of scope: notification/endpoint (design exclusion) and IGNORED status (not a
Verdict value) — possible follow-up. Spec: docs/workbench/specs/human-disposition/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new disposition CLI subcommand (disposition set) that allows analysts to manually record human verdicts (true_positive or false_positive) on findings. The command integrates with the existing DynamoDB-compatible finding store to persist these manual triages, which are then used to suppress future re-detections. Design and requirements specifications, CLI command implementation, and comprehensive unit tests have been added. No review comments were provided, so there is no feedback to address.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@pureliture pureliture merged commit 805357e into main Jun 19, 2026
9 checks passed
@pureliture pureliture deleted the claude/human-disposition branch June 19, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant