Skip to content

feat(cli): one verdict writer, cited refutations and no unverified fix claims #601

Closed

Description

@dan-petty

Context & Rationale

Lines are on release/v0.2.23. Finding (ai/review_schema.py:565) accepts an INVALIDATED, reportable, verified record. A criteria-VERIFIED finding still goes to the model (ai/review/verification.py:1512), which overwrites it as verified_by="llm" (:1393); ai/review/pipeline.py:2179-2193 restamps llm everywhere and drops criteria_execution_results and the relocated location. Debate-invalidated findings stay reportable (ai/review/stages/adversarial_debate.py:57), inflating reported (ai/review/runner.py:1768); review verify --status UNVERIFIED sets verified=True (commands/review.py:968); MCP review_findings sends an undefined --mitigated (ai/mcp/server.py:171-174). Requested line citations and mechanisms (ai/tasks/verify_finding_system.md:7-8) land in free-text invalidation_reason (verification.py:1398). auto-fix claims test_verified=True untested (ai/review/auto_fix.py:77-85); apply-patch prints "Staged patch", staging nothing (ai/review/patching.py:58); test-gen's assert hasattr (ai/test_gen.py:72) is labelled SYNTHESIZED (config/defaults.py:536).

Scope & Deliverables

  • Context & Rationale*: Lines are on release/v0.2.23. Finding (ai/review_schema.py:565) accepts an INVALIDATED, reportable, verified record. A criteria-VERIFIED finding still goes to the model (ai/review/verification.py:1512), which overwrites it as verified_by="llm" (:1393); ai/review/pipeline.py:2179-2193 restamps llm everywhere and drops criteria_execution_results and the relocated location. Debate-invalidated findings stay reportable (ai/review/stages/adversarial_debate.py:57), inflating reported (ai/review/runner.py:1768); review verify --status UNVERIFIED sets verified=True (commands/review.py:968); MCP review_findings sends an undefined --mitigated (ai/mcp/server.py:171-174). Requested line citations and mechanisms (ai/tasks/verify_finding_system.md:7-8) land in free-text invalidation_reason (verification.py:1398). auto-fix claims test_verified=True untested (ai/review/auto_fix.py:77-85); apply-patch prints "Staged patch", staging nothing (ai/review/patching.py:58); test-gen's assert hasattr (ai/test_gen.py:72) is labelled SYNTHESIZED (config/defaults.py:536).
  • Deliverable*: (1) Delete auto-fix and apply-patch with modules, docs and tests; test-gen status becomes UNEXECUTED. Amend the v0.3.1 CEGIS item: pytest via WorkloadSandboxEngine.exec (sandbox/engine.py:427) under timeout and exec_run(demux=True) (docker/engine.py:407); a test fails unpatched, passes patched; counterexamples keyed by nodeid, exception type and message; candidates hashed by ast.dump(include_attributes=False); vibes statuses (tools/cegis_engine.py:110-118) on stdlib; a pydantic-ai output validator raising ModelRetry; git apply --check on shadow worktrees. (2) Add apply_verdict(finding, status, by, reason), writing status, verified, reportable, mitigated, verified_by and verified_at together, for criteria, deterministic checks (deterministic:<check>), the model, debate and review verify; verified_by becomes a Literal. Invariants: INVALIDATED is neither reportable nor verified; VERIFIED requires verified_by; UNVERIFIED has neither. MITIGATED stays reportable (verification.py:1273-1279). Executed verdicts are final; the pipeline copies the whole result back. Assert invariants at the findings.json write and in an every-writer test. MCP passes --status for all four states. (3) Add optional citation_line and mitigating_mechanism to Finding and FeedbackRecord, and per-adjudicator citation rates to compute_verdict_distributions (review_schema.py:1313). A missing or out-of-range cited line makes a refutation UNVERIFIED with a verification_note; an absent mechanism adds a note. Match identifier tokens, falling back to ai/ast/engine.py. Once rates show parity, retire _reason_confirms, _restates_the_finding and _NEGATION under feat(cli): semantic validator deprecation & structural positional oracles #436. Excludes verdict-first ranking and perimeter re-checks.
  • Constraint*: No raising model_validator on Finding: after-validators skip assignment and model_copy(update=...), which the writers use, and _validate_raw_findings_list silently drops failing reply items (review_schema.py:1205-1210), as feat(cli): verdict polarity & field distribution assertions #435's polarity validator (:730-748) already causes. Final executed verdicts inherit executor flaws: one passing command of several sets VERIFIED (review_environment.py:334); timeouts and spawn errors exit -1 like failures (:271, :277). Only verdicts whose commands all ran are final. Citation checks only downgrade or annotate. A repair loop on today's always-yes oracle converges immediately; port vibes' classifier semantics, not its 845-line file.
  • Measured*: On release/v0.2.23: .venv/bin/python -B probe/rw_bind/probe.py: a finding VERIFIED by grep -n open m.py came back UNVERIFIED, verified_by=llm, after a mocked refutation. .venv/bin/python -B probe/rw_bind/drop.py: of two reply items, the one with only observed_value was dropped. pytest -q -p no:cacheprovider test_math_ops.py on test-gen output for a multiply returning x + y: 1 passed. python3 scan_verdicts.py over 9 recorded candidates.json of unknown code version: 12 of 85 model refutations name a line.
  • Source*: vibes patterns/findings-must-carry-their-own-falsification.md, patterns/kinetic-exploit-probes-and-invariant-leashing.md, tools/kinetic_probe.py, observations/systems/30-kinetic-falsification-and-the-ephemeral-exploit-harness.md, artifacts/prompts/multi-persona-code-reviewer.md, patterns/cegis-and-hypothesis-debugging.md, tools/cegis_engine.py, examples/cegis-debugging-workbench/workbench.py, observations/systems/01-distributed-telemetry-and-agent-waterfalls.md, patterns/epistemic-seam-and-mitigated-defect-auditing.md, observations/systems/29-epistemic-drift-and-the-unreliable-teacher-in-autonomous-verification.md, docs/TAXONOMY.md, observations/systems/13-verify-the-finding-before-you-fix-it.md

Strategic Alignment

  • Milestone: v0.2.23 (devops ai Review Quality, LLM Routing & Multi-Language Validation)
  • Roadmap Reference: docs/ROADMAP.md

Activity

  1. added this to the v0.2.23 milestone on Sep 25, 2026
  2. added
    type/feature
    scope/cli
    priority/p0-critical
    on Sep 25, 2026
  3. dan-petty commented on Sep 26, 2026

    @dan-petty
    OwnerAuthor

    Closed by #625, merged into release/v0.2.23.

    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.

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/p0-criticalscope/clitype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions