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, per-function complexity before and after for changed Python functions with ruff C901 (standard McCabe) as the definition, is kept as this item's C901 criterion and the complexity_delta record below.
- Ruff and mypy are not review evidence today. Ruff runs only in CI [code: .github/workflows/ci.yml:45-66]. mypy runs only as a verifier probe, which ran once in 11 runs [measured: loop §5].
- Ruff honours the target version: it accepts PEP 758 at py314 and rejects it at py313 [measured: u-tools].
- BLE001 catches the three error-handling recall entries (pricing.py:55 and :67, and investigator.py:293) [measured: d-incremental], but it fires 513 times in 164 files at HEAD.
- mypy has no environment in a fresh worktree. The worktree has no
.venv, and HostSandbox looks only for<root>/.venv/bin[code: sandbox/host.py:453-468].
Acceptance criteria
- Ruff with the project's config produces SARIF findings.
- Advisory rules: an advisory set from
.devops/review.toml(default BLE001) reports individual findings only inside diff hunks on branch and PR reviews, and one group per (rule, file) on path reviews. - C901 runs at
max-complexity = 0at base and head for changed functions. A finding is raised only when a function crosses the project's cap or a configured increase. review.md gets a before/after "Complexity" table. - The session JSON keeps the original
complexity_deltarecord:{file, function, before, after, source}for each function whose value changed or that was added (before: null) or removed (after: null), withsource"mccabe (ruff C901)". A unit test with hard-coded values covers a function going from 3 to 12 and an unchanged one. - mypy runs with the project config on changed modules.
- Environment: the checkout's
.venv, bound read-only, when the worktree's uv.lock hash equals the checkout's. - Otherwise it is a coverage gap with that reason.
uv syncnever runs on a reviewed tree. - Isolation:
python -Iand its own cache.
- Environment: the checkout's
- (person-run) A path review of 38517a8 matches 3/3 error-handling entries, and the loop input gives 0 PEP 758 findings.
- 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
- Bandit or ruff S? (proposed) Keep Bandit through P1, and decide on labels (feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137 Q14).
- Which advisory rules? (proposed) BLE001 first (feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137 Q5).
Strategic alignment
- Milestone: none; the roadmap tooling places it. Depends on: feat(review): review tools run at the project's declared language and platform versions, and count only after their output on a canary matches the recorded expected output #1143. Related: feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586, feat(cli): extend the ruff rule set to the correctness families #420, feat(cli): blind exception handling policy #423.
- 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): per-function complexity before and after for changed python functions in reviews[/-][+]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[/+]dan-petty commentedon Oct 9, 2026
Folded in from the #1138 re-scope (2026-10-09)
The 16 BLE001 seed labels move here from #1138: no review session holds those rows, or their fingerprints, until this item admits ruff findings as review evidence. Label them once that is in.
feat(review): ruff and mypy review evidence with project settings (#873)
feat(review): ruff and mypy review evidence with project settings (#873…
dan-petty-bot commentedon Oct 9, 2026
What changed
#1523, merged into
release/v0.2.33as eba4818.10 file(s) changed.
How it was verified
Check runs at 9115ccd:
Acceptance Criteria of
docs/agent/tasks/task-873-review-ruff-mypy-evidence.md:uv.lockSHA-256 match), isolating cache and ignoringnote:continuation lines.review.mdincludes complexity delta table andsession.jsonrecordscomplexity_delta.uv run devops cion the delivering tree, which the orchestrating session runs.feat(release): v0.2.33 (#1537)
fix(roadmap): intake calls a candidate a duplicate only when it asks …