Repository navigation
Closed
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/reviewMulti-persona code review engine, verification, and findingstype/featureType feature: a new function
Milestone
Description
Problem
Re-scoped on 2026-10-03 as phase P1a of the evidence-first review (#1137). The original scope, that every finding records its producer (scanner rule or serving model), is kept: the producer is the anchor below. Producer-split precision, which replaced the original review stats --by producer, is #1138's; model findings and their served_by fields go with #1151.
- No finding records its producer. Scanner output is stamped
persona="devsecops"[code: ai/review/pipeline.py:463-472], and calibration recognizes secret scanners by title prefix [code: ai/review/calibration.py:80-91]. - Model claims reach the top of the report.
app/shell.py:4names no file in the tree, yet it was VERIFIED and row 1 in 11/11 runs (D13) [measured: loop §5]. - Models set severity, state and location:
- the verifier dropped 47/125 valid tool candidate-runs;
- D2 lowered 49/49 kept read-only-root-fs findings;
- D18 moved 8 findings to other files without recording it [measured: loop §4–5].
- A change can suppress its own findings. An inline marker (
# noqa,# nosec,# nosemgrep) added by the change itself hides that change's finding [inference]. - The profile and the report disagree on counts (D6).
Acceptance criteria
- A frozen
Findingis built only byreview/admission.py::admit().- A test asserts that no other module constructs one.
- The test reads source text first and parses only files containing
Finding(, astest_no_module_runs_python_in_processdoes [code: tests/test_architectural_invariants.py:214-234]. A full parse of 504 files takes 1.63 s [measured: c-feasibility].
- Anchors:
ToolAnchor(run_id, result_index, rule_id)andAdvisoryAnchor(db, snapshot, advisory_id, purl, locked_version), behind anAnchorprotocol (kind, location, recheck). - Location check:
- Regions: the path is in
git ls-tree -r <commit>, the lines are within the file, andregion_sha256is stored. - Logical locations: the object (kind/namespace/name) exists in the manifest at the commit, or the package@version exists in the lockfile.
- Absolute paths: made relative when inside the worktree; otherwise rejected.
- Typed rejections are counted in profile.json:
path-not-in-commit,line-out-of-range,object-not-in-commit,file-not-scanned,tool-not-run,canary-failedandno-anchor. - A fixture tree without
app/shell.pyrejects a result that cites it.
- Regions: the path is in
- fix(review): location parsing keeps placeholder, prose-laden and truncated locations #788's persona-location half (placeholder, prose and truncated locations) is covered by the location check above; its scanner-path half lands in P0 as fix(review): location parsing keeps placeholder, prose-laden and truncated locations #788.
- Recording a new known false positive is one edit (refactor(review): one rulebook for known false positives #770's constraint): one
.devops/review.tomlsuppression with a reason and an expiry. - Severity is a pure function of the SARIF level, rule severity,
security-severityor CVSS, and a policy table in.devops/review.toml(path-class caps). The derivation is stored and covered by a table-driven test. - State: OPEN, SUPPRESSED, FIXED or CONFIRMED.
- OPEN comes from a tool run.
- FIXED means the finding is absent from a later run of the same tool version and config.
- SUPPRESSED comes from
.devops/review.tomlread at the base revision (by fingerprint, rule or path glob, each with a reason and an expiry), or from an inline marker that exists on the matching line at the base revision. - CONFIRMED comes only from a person's valid verdict (feat(review): feedback export counts each review subject once and keeps every human verdict #877) or a replayed observation (P6).
- A transition-table test follows
assert_verdict_invariants[code: ai/review/verdicts.py:145-191].
- Inline markers.
- Tools run with their inline suppressions ignored: ruff
--ignore-noqaand bandit--ignore-nosec[measured: help output]; Semgrep--disable-nosem[code: semgrep/commands/scan.py:243, via c-fidelity]. - Markers added by the change are listed as "suppressed by this change", and the finding stays OPEN.
- Tools run with their inline suppressions ignored: ruff
- The test-path policy from fix(review): the review's scanner config drops the rules that never produced a valid finding on this repository #1024 is a set of suppressions with reasons. It covers B103 at test_crypto_tls.py:243 (VERIFIED 10/10, false).
- Branch and PR reviews:
introducedwhen the fingerprint is absent from the base revision's run of the same tool version and config, otherwisepreexisting. - findings.sarif (security/sarif.py) carries tool, version, rule, fingerprint v2,
logicalLocations,partialFingerprintsandbaselineState.from_sarifkeeps the tool version,partialFingerprintsand rule properties [code: security/sarif.py:395-414]. findings.sarif never contains model output. - review.md sections: introduced findings; pre-existing findings in changed files; suppressed (with expiry, and suppressed by this change).
- profile.json and findings.json counts agree.
- Two runs on a fixture tree with recorded outputs and equal input digests produce byte-identical findings.json and findings.sarif, apart from the run id and timestamps.
- (person-run) On the S11 and loop inputs, every row names tool, version and rule, and 0 rows fall outside the tree.
- Tests run offline with fakes and recorded tool output: no network, no real scanner, no model; each test under 1 s.
-
changelog.d/<n>.mdrecords the change;CHANGELOG.mdanddocs/ROADMAP.mdare not edited. -
uv run devops cipasses.
Key questions
- Two tools agree: CONFIRMED? (proposed) No. Ruff S and Bandit read the same AST, so agreement is shown as corroboration only.
- Does a validated patch confirm? (proposed) No. P4-1 attaches a validated fix and leaves the state alone.
- Where does the code live? (proposed) In
src/devops_cli/review/, which imports no model client (feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137 Q9). - D13, D15, D18? (proposed) Not filed. This item, fix(review): a review scans a worktree of the reviewed commit, never hands a deleted file to a tool, and reports which files each tool scanned #1047 and refactor(review): the model verifier, the hallucination catalog and the model-claim guards are deleted, and person-recorded verdicts become suppressions #1150/refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151 make them impossible.
Strategic alignment
- Milestone: none; the roadmap tooling places it. Depends on: fix(security): each finding keeps its own fingerprint across unrelated edits, and deduplication and correlation give one result in every input order, in devops scan and in reviews #1141, fix(review): a review scans a worktree of the reviewed commit, never hands a deleted file to a tool, and reports which files each tool scanned #1047.
- Related: 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, fix(review): the severity cap for unverified findings does not depend on whether the title happens to hedge #1051 and feat(ai): ai review honours an inline intent marker with a quoted reason #602 (frozen; their invariants are carried here, and each closes as superseded when this item lands), fix(review): location parsing keeps placeholder, prose-laden and truncated locations #788 (P0 child for the scanner-path half), refactor(review): report rendering leaves the orchestrator #1008 (frozen; report rendering survives and is rebuilt from
findings.sarif), fix(review):review pr --post --no-reportingposts zero findings and metrics lose the persona #791 and feat(review): verified findings about merged code enter the roadmap through intake #883 (the PR comment, metrics and intake read the admitted set), feat(review): feedback export counts each review subject once and keeps every human verdict #877, feat(review): publish scanner findings to code scanning #419, fix(review): the review's scanner config drops the rules that never produced a valid finding on this repository #1024. - Parent: feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137 (phase P1a).
- Evidence tags ([measured: …], [code: path:line], [sourced: …], [estimate], [inference]; "S11" is the single review run of 2026-10-03 and "the loop" the ten runs S12–S21; c-feasibility and c-fidelity are the two design critiques) are explained in feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137.
Metadata
Metadata
Assignees
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/reviewMulti-persona code review engine, verification, and findingstype/featureType feature: a new function
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]feat(review): findings record their producer: scanner rule or serving model[/-][+]feat(review): every reported finding is admitted with its producer's anchor and a location that exists in the reviewed commit, the review writes findings.sarif, and review.md shows findings and suppressions[/+]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)
feat(review): every reported finding is admitted with anchor and comm…
dan-petty-bot commentedon Oct 7, 2026
What changed
#1278, merged into
release/v0.2.28as fca29e9.22 file(s) changed.
How it was verified
Check runs at aa3a9c8:
Acceptance Criteria of
docs/agent/tasks/task-871-finding-admission.md:Findingis built only byreview/admission.py::admit(), verified by AST architectural invariant test (test_finding_is_constructed_only_by_admission).ToolAnchor(run_id, result_index, rule_id)andAdvisoryAnchor(db, snapshot, advisory_id, purl, locked_version)satisfyAnchorprotocol (test_anchor_protocol_and_implementations).region_sha256stored, logical locations verified against manifests/lockfiles, absolute paths normalized or rejected (test_location_check_and_typed_rejections).profile.json:path-not-in-commit,line-out-of-range,object-not-in-commit,file-not-scanned,tool-not-run,canary-failed, andno-anchor.app/shell.pyrejects a result citing it (test_location_check_and_typed_rejections)..devops/review.tomlcaps with derivation recorded (test_severity_derivation_table).OPEN,SUPPRESSED,FIXED,CONFIRMED) and valid confirmation rules (test_state_transitions_and_invariants).--ignore-nosec,--disable-nosem); markers added by change stayOPENwithsuppressed_by_change=True(test_suppressions_and_inline_markers)..devops/review.tomlcovering B103 on test suites with reason and expiry.introducedvspreexistingbased on base revision fingerprint presence (test_introduced_vs_preexisting_branch_reviews).findings.sarifcarries tool version, fingerprint v2,partialFingerprints,rule_properties, and never contains model output (test_sarif_roundtrip_preserves_version_and_properties).review.mdrenders## Introduced Findings,## Pre-existing Findings in Changed Files, and## Suppressed Findings(test_review_markdown_sections).profile.jsonandfindings.jsoncounts agree (test_profile_and_findings_counts_agree).findings.jsonandfindings.sarif(test_two_runs_fixture_tree_byte_identical).changelog.d/871.mdadded under### Added.chore(release): the v0.2.28 changelog records #1341 in the #871 entry…
fix(review): an inline suppression marker hides only findings of the …
feat(release): v0.2.28 (#1283)