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
- Tools run at their own defaults, not at the project's declared versions.
- Semgrep 1.178.0 misparses PEP 758 without any sign.
- It reads
except ValueError, TypeError:asexcept ValueError as TypeError: it exits 0 witherrors: []and lists the file as scanned. - A probe rule
except $X as $Ymatches the line, andexcept ($X, $Y)does not [measured: c-feasibility]. - A "does it parse" canary therefore passes the very version it should catch.
- It reads
Acceptance criteria
- Version flags come from the project:
- ruff's target version from
requires-python; - mypy's
python_version; - Pluto's
--target-versions k8s=<review.kubernetes_version>. - A missing value is a coverage gap.
- ruff's target version from
- The canary is an expected-output test per tool.
- Fixture files: PEP 758, 695 and 649 constructs, a manifest and a Dockerfile.
- Semgrep probes: the tuple form must match the PEP 758 line, and the
asbinding must not. - ruff, Bandit, mypy, kube-linter and Pluto: a known result at a known line each.
- The gate is an exact match on the expected (rule, line) set.
- Recorded outputs as fixtures: Semgrep 1.178.0's output fails the gate and 1.179.0's passes, as an offline CI test.
- When it runs: automatically at review start, once per (tool, version, binary sha, language version, ruleset digest), with the result cached.
- A failing tool's findings are withheld, and the tool shows
canary-failed.
- A failing tool's findings are withheld, and the tool shows
- (person-run) The canary passes for every pinned tool on the real binaries, and the expected outputs are recorded from those runs.
- 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
- Who updates expected outputs? (proposed) A tool bump PR (P2-9) re-records them, and a person reviews the diff.
Strategic alignment
- Milestone: none; the roadmap tooling places it. Depends on: feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772. Blocks: fix(review): Semgrep runs pinned and offline with metrics off, from a cached registry ruleset plus devops-cli's tested rule pack #1144, feat(review): ruff and mypy run as review evidence with the project's settings, advisory rules report only on changed lines, and changed functions show complexity before and after #873, feat(review): dependency advisories and the package inventory come from osv-scanner over the lockfiles, offline, with each advisory's own severity #1146.
- 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.
Update 2026-10-08: refinement
admit(canary_passed=...) and the coverage matrix's canary failed reason exist (review/admission.py:99-122, ai/review/pipeline.py:1366-1367), but nothing passes them (:636-656). The cached canary result feeds both; no second path.
- A test admits a finding from a failed-canary tool and asserts the rejection count and coverage state.
Proposed design
Problem statement
Tools run at their own defaults instead of the project's declared language and platform versions, causing misinterpretations like Semgrep 1.178.0 misparsing PEP 758 without signaling errors. A canary test is needed to verify tool outputs match expected results before findings are counted.
Acceptance criteria
- Criterion 1: Version flags come from the project for tools like ruff, mypy, and Pluto
Verification: Check that ruff's target version comes fromrequires-python, mypy'spython_version, and Pluto's--target-versions k8s= - Criterion 2: The canary is an expected-output test per tool with fixture files
Verification: Verify that fixture files include PEP 758, 695, and 649 constructs, manifest, and Dockerfile; and that Semgrep probes match tuple form for PEP 758 line - Criterion 3: Tool findings are withheld when canary fails
Verification: Confirm that a failing tool's findings are withheld and the tool showscanary-failedin the output - Criterion 4: Recorded outputs as fixtures pass offline CI test
Verification: Run offline tests where Semgrep 1.178.0's output fails the gate and 1.179.0's passes - Criterion 5: Canary runs automatically at review start with caching
Verification: Ensure canary runs once per (tool, version, binary sha, language version, ruleset digest) with cached results
Key questions
- Who updates expected outputs?: A tool bump PR re-records them, and a person reviews the diff. (proposed)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
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
dan-petty commentedon Oct 8, 2026
Linked: #1301 and #1352.
_admit_single_candidate(ai/review/pipeline.py:636-656) passes none ofseverity_caps,manifest_objectsor this item'scanary_passed; whichever lands second rebases. Found by the 2026-10-08 backlog review.dan-petty commentedon Oct 11, 2026
Status set to Ready at 6e862cd (see proposed design in issue body).
feat(review): run review tools at project versions and gate on 5-tupl…
dan-petty commentedon Oct 17, 2026
What changed
#1603, merged into
release/v0.2.36as 31a500e.16 file(s) changed.
How it was verified
Check runs at 16090a4:
Acceptance Criteria of
docs/agent/tasks/task-1143-review-tool-versions-and-canaries.md:No Acceptance Criteria section.
feat(release): v0.2.36 (#1615)