Repository navigation
Description
Problem
Review session 20261001-224227 reported "563 reportable findings (21 Critical, 263 High)" and headlined CVE-2021-44228 (Log4Shell). A triage of all 563 against the code found 46 real defects, none above MEDIUM, and no CVE that applies. The report's integrity failures are code, not model output:
- Ranking.
sort_findings(review_schema.py:1094) orders by model confidence before verification status, so UNVERIFIED findings at confidence 1.0 rank above VERIFIED ones at 0.95. - Headline. The executive summary (
stages/reporting.py:157) names the themes of the first-sorted findings. The theme (:20) is the first reference, so a hallucinated CVE becomes the headline. - Patterns. "Key Bad Patterns" has 280 bullets, 257 of them singletons and 232 keyed by an issue title.
- Good patterns. "Static analyzers … with 0 critical findings" is a hard-coded literal (
:89). Bandit, Semgrep and Pluto failed in that run. - Counts. The counts mix VERIFIED, UNVERIFIED and MITIGATED. 76 findings marked
verification-unavailableand 28 MITIGATED are counted as defects. - References.
- 11 CVEs from other products (Log4j, polkit, Apache httpd, OpenSSH, axios, JUnit) were cited against a Python CLI whose 58 dependencies the same run scanned clean.
- Nothing compares references with this run's dependency scan.
placeholder_advisorymatches only x/n/? runs._check_scanned_clean_dependencynever fires on path reviews, because_verify_single_file_payloadpasses no dependencies (pipeline.py:2661).- On the runner path it reads model-written
external_dependencies.
- Taxonomy. 148 distinct free-text category strings.
Finding.categoryis a freestr, andresolve_finding_categoryonly lowercases it. - Severity.
- 54% of candidates are HIGH, the value in both prompt examples.
- The verifier may raise severity.
- Tests and docs findings are rated CRITICAL or HIGH (25 of 27 reported test findings).
Acceptance criteria
- Ranking.
sort_findingsorders by (not reportable, status VERIFIED < UNVERIFIED < MITIGATED, severity, location, title), with no model confidence. - Headline. Themes come from VERIFIED findings only, ranked by (max severity, count). Singleton themes are cut, and a theme is never a finding title.
- Counts. They are split by status, with verifier-unavailable and MITIGATED findings listed apart.
- Analyzer line. It is computed from scanner results and names analyzers that failed.
- Advisories.
- A CVE or GHSA id stays in
referencesonly if aDependencySpec.vulnerabilitiesentry of this session carries it (by id or alias). Otherwise it is stripped, with a note. - A finding whose only evidence was that advisory is INVALIDATED
deterministic:unbacked_advisory. - The session's dependencies reach
_verify_single_file_payload. - Model-written
external_dependenciesandnetwork_referencesare cleared on parse. - The placeholder pattern also catches sequential ids such as
CVE-2023-1234.
- A CVE or GHSA id stays in
- Taxonomy.
- A validator maps
categorytoCWE-<n>when one appears in the category or references. Otherwise it maps through a keyword table to a closedDefectClassenum, keeping the original ascategory_raw. - One theme function serves the metrics and the report.
- A validator maps
- Severity.
- The verifier may only lower severity; the persona's value is kept as
severity_raw. - Findings in tests and docs are LOW at most unless they concern a verified secret.
- Hedged titles ("Potential", "May", "Could") are MEDIUM at most unless VERIFIED by evidential criteria.
- CRITICAL requires VERIFIED.
- The verifier may only lower severity; the persona's value is kept as
- Path routing. Planning documents (
docs/ROADMAP.md,CHANGELOG.md,changelog.d/,docs/agent/tasks/, ADRs) and generated reference docs (docs/commands/*.md,docs/CLI_REFERENCE.md) are excluded from path reviews. - Tests.
- Crafted findings, including an UNVERIFIED CRITICAL that cites CVE-2021-44228, never put that CVE in the headline.
- One analyzer with critical findings never yields "with 0 critical findings".
- A parametrised mapping over that session's 148 category strings gives at most about 30 classes and no None.
- A table test covers the severity caps.
tests/test_review_report_summary.py:188is updated to the new rules.
uv run devops cipasses.
Key questions
- Does this overlap feat(review): order-independent review finding consolidation with a permutation test #608? feat(review): order-independent review finding consolidation with a permutation test #608 makes consolidation order-independent with a permutation test. This item changes the sort key and the summary; whichever lands second rebases.
- Where does the taxonomy live? As an enum in
review_schema.pywith its keyword table inconfig/constants.py(proposed); refactor(review): one rulebook for known false positives #770's rulebook can absorb it later.
Scope added 2026-10-02: the Path routing criterion above covers path reviews only. Branch and PR reviews paginate the whole diff (_prepare_branch_content, ai/review/runner.py:1828-1892, pages at :1887; _prepare_pr_content, :1895-1937, pages at :1936). The only files they skip are lockfiles (_is_generated_diff_block, ai/review/chunker.py:383-390), and path reviews skip the same lockfiles through a second check (runner.py:1449). In the branch reviews of release/v0.2.25, the paths this item routes took 58 of 214 persona pages in the cold run 20261002-142541 (27%) and 77 of 319 in 20261002-180320 (24%). They produced 14 of 72, 23 of 100 and 23 of 126 reported findings in the first three runs. 1, 6 and 8 of those were VERIFIED, so the new ranking would put them first. A hand triage of 20261002-180320 found none of its 23 valid. Lockfiles still reach Trivy through _lockfiles_beside (ai/review/pipeline.py:507-516). Routed files need the same for the secret scan, because a secret pasted into a task file or changelog fragment is still a secret. One more trap: when every changed file is skipped, the page builder yields one empty page (chunker.py:431-432). The orchestrator then finds no files and returns None before the scanners run (runner.py:2103-2104), and the workflow falls through to the legacy engine, which sends the empty page to the model (runner.py:2287). Routing changelog fragments and task files makes that common: a docs-only branch would hit it.
- Branch and PR reviews apply the same path routing as path reviews. One predicate decides it for all three targets and replaces the two lockfile checks (
runner.py:1449,chunker.py:383-390). - A test feeds a unified diff that touches
src/app.py,changelog.d/1.md,docs/agent/tasks/task-1-x.md,docs/ROADMAP.md,docs/commands/ai.mdanddocs/CLI_REFERENCE.mdthrough the branch review's page builder. It asserts that onlysrc/app.pyreaches a persona page. The PR path is checked the same way with a fake GitHub client. Both run offline. - A routed file still reaches the secret scan. A test with
run_gitleaks_scanfaked asserts that a changedchangelog.d/1.mdis passed to it. - A branch or PR whose changed files are all routed out makes no model call and does not reach
_run_persona_loop. It still runs the secret scan on those files and says that nothing was left for the personas. A test with a diff that touches onlychangelog.d/1.mdand a fake model client asserts both.
Scope added 2026-10-02 from review session 20261002-214641 (.data/review-evaluation-20261002-s6.md, section 4.1): the executive summary counts Gitleaks among "6 static analyzer(s) executed" (ai/review/stages/reporting.py:88), although it ran only built-in patterns because its binary is not installed. All 5 HIGH findings in S5 and S6 were false or overrated.
- The executive summary counts an analyzer as executed only when its state is
ran, and names built-in patterns separately.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(review): the report ranks verified findings first, keeps only sca…
dan-petty commentedon Oct 3, 2026
Closed by #1037, merged into
release/v0.2.25.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.feat(release): v0.2.25 (#1089)