Skip to content

feat(review): related findings are linked by shared CWE, rule family, symbol-graph component or package, and one review-level plan orders the work across groups #1148

Closed

Description

@dan-petty

Problem

Acceptance criteria

Key questions

  • Model-proposed links? (proposed) None. Only key-sharing links are shown, so correlation never invents a finding.

Strategic alignment

Proposed design

Problem statement

The current review process lacks correlation and investigation across findings, with no item linking findings across groups. This makes it difficult to identify related defects that share common causes such as CWEs, rule families, symbol-graph components, or packages. A single review-level plan is needed to order the work across these groups and ensure deterministic cross-group linking.

Acceptance criteria

  • Criterion 1: Deterministic cross-group keys are implemented using CWE, rule family, symbol-graph component from ai/review/ast_imports.py, purl, and manifest source.
    Verification: The correlation table in analysis.json and review.md contains these keys and is written as specified.
  • Criterion 2: A 'same root cause' statement is only allowed between findings that share a key.
    Verification: Code enforces this rule during the review process, preventing invalid cross-group links.
  • Criterion 3: One plan job takes checked feat(review): each finding group gets a model-written explanation and plan grounded in the rule's documentation at the installed tool version, kept apart from findings, with every quote, citation, version and code block checked #1147 outputs plus the correlation table under G10 checks.
    Verification: The plan covers every finding with either a plan or defer reason, ordered by introduced first, then severity, then file.
  • Criterion 4: Property test ensures findings are identical with this stage on and off.
    Verification: A property test is written that runs both with and without the new functionality and verifies identical results.
  • Criterion 5: On loop input, the plan groups 9 DaemonSets under one step.
    Verification: The loop input produces a plan where the 9 read-only-root-fs DaemonSets are grouped together in a single step.
  • Criterion 6: Tests run offline with fakes and recorded tool output without network or real scanner.
    Verification: All tests use fake data and recorded tool outputs, with execution time under 1 second per test.
  • Criterion 7: Changelog fragment records the change in changelog.d/.md
    Verification: A changelog fragment is created at changelog.d/.md documenting this feature.
  • Criterion 8: uv run devops ci passes.
    Verification: Running 'uv run devops ci' completes successfully without any test failures.

Key questions

None.

Open questions

  • Model-proposed links? (missing verified source)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#1147

Activity

  1. added
    type/feature
    scope/ai
    scope/review
    priority/p1-high
    on Oct 3, 2026
  2. modified the milestone: v0.2.36 on Oct 11, 2026
  3. dan-petty commented on Oct 14, 2026

    @dan-petty
    OwnerAuthor

    Moved to the backlog: it was New, not Ready, when v0.2.36 started. (devops roadmap reprioritize)

  4. added this to the v0.2.38 milestone on Oct 17, 2026
  5. dan-petty commented on Oct 20, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1742, merged into release/v0.2.38 as 272c21a.

    Summary

    Closes #1148

    Link related review findings across groups and produce a deterministic, ordered review-level remediation plan:

    • Deterministic Cross-Group Keys: Extracts CWEs, rule families, symbol-graph components from ai/review/ast_imports.py, purls, and manifest sources, recorded as a correlation table in analysis.json and rendered in review.md.
    • G10 Verification Invariant: Enforces that any "same root cause" relation or statement is strictly forbidden unless the findings share a deterministic correlation key.
    • Review Remediation Plan: Adds review remediation planning stage (run_review_plan_job) covering all admitted findings under G10 checks. Orders findings by introduced status first, then severity rank (CRITICAL down to INFO), then file path, line number, and fingerprint. Groups related resources (e.g. 9 DaemonSets under k8s/llm/profiles/ollama-profiles.yaml) into single remediation steps.
    • Property Test: Validates that admitted findings, findings.json, and findings.sarif are identical whether the analysis stage is enabled or disabled.
    • Offline Fast Tests: All tests run offline with recorded fakes and fixtures in <1s per test without network, live models, or real scanners.

    Fail-to-pass: not applicable: feature deliverable introducing new functionality and tests.

    7 file(s) changed.

    How it was verified

    Check runs at b458299:

    • Prune PR DevContainer Images: pass
    • Audit Defect PR Hardening: skipping
    • zizmor: pass
    • devops-cli: pass
    • bandit: pass
    • CodeQL: pass
    • Rule Pack Tests: pass
    • Changed-Test Independence: pass
    • Static Analysis: pass
    • Tests & Coverage: pass
    • Fail-to-Pass Self-Check: pass
    • Fail-to-Pass Check: pass
    • Analyze (python): pass
    • Analyze (actions): pass
    • Dependency Freshness: skipping
    • Service Image: skipping
    • DevContainer Image: skipping

    Acceptance Criteria of docs/agent/tasks/task-1148-related-findings-correlation.md:

    No Acceptance Criteria section.

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/p1-highscope/aiscope/reviewtype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions