Skip to content

feat(review): review reports state only what was checked (#604) - #622

Merged
dan-petty merged 1 commit into
release/v0.2.23from
feat/604-review-reports-state-only-what-was-checked
Sep 26, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.23from
feat/604-review-reports-state-only-what-was-checked

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Description

Part 1 of Issue #604: Review Reports State Only What Was Checked, With a Tested Empty Outcome.

Historically, review reports emitted assertions for checks that were never executed. Specifically:

  • extract_good_patterns emitted three fixed patterns (Architectural Separation & Invariant Discipline, Subprocess & Process Execution Safety, Defensive Typing & Schema Modeling) regardless of findings or whether relevant analyzers ran.
  • An empty dependency list or network list triggered zero unpinned critical/high CVEs and Zero-Trust Network Isolation.
  • Unqueried dependencies defaulted to CLEAN.
  • Zero findings yielded boilerplate praise (exceptional engineering quality), while any finding produced a generic recommendation mentioning path traversal defenses, and transport protocol safeguards even for unrelated low findings (e.g. missing docstring).
  • Two substring rules were mislabeled as Multi-Agent Adversarial Debate.

Key Changes

  1. Factual Executive Summary & Grounded Remediation:
    • Replaced fixed praise with factual summary stating exact defect count across analyzed files.
    • Derived remediation recommendations directly from actual finding themes (_derive_finding_theme) and severity distributions without generic boilerplate.
    • A single LOW finding is described strictly by its own theme.
  2. Tool-Evidenced Good Patterns:
    • Completely deleted the three hardcoded patterns from extract_good_patterns.
    • Omitted Key Good Patterns Observed section when no tool evidence exists.
    • Emitted Supply Chain pattern only when external dependencies were actually queried with 0 critical/high CVEs.
    • Emitted Network Reference pattern stating total, local, and external reference counts.
    • Emitted Static Security Analysis pattern stating count and names of executed analyzers with 0 critical findings.
  3. Unqueried Dependency Tracking:
    • Defaulted DependencySpec to severity=NOT_QUERIED, security_status=Not Queried, and queried=False.
    • Unqueried packages display as NOT_QUERIED and are never reported as clean unless queried against advisory databases.
    • Table-driven dispatch in _format_dependency_table_row eliminates if/elif ladders and excessive nesting depth.
  4. Terminology Alignment:
    • Renamed substring rule filtering in console output (adversarial_debate.py) and --no-verification CLI help text away from Multi-Agent Adversarial Debate to false-positive rule filtering.
    • Synchronized knowledge base diagram (ai_code_review.md), SDLC docs (SDLC.md), and CLI references (CLI_REFERENCE.md).
  5. Comprehensive Invariant Tests:
    • Added tests in tests/test_review_report_summary.py, tests/test_review_pipeline.py, and tests/test_review_verification.py validating empty outcomes, unqueried dependencies, and theme derivations using structural tuple equality assertions.

Type of Change

  • feat: New feature or capability
  • docs: Documentation updates or additions
  • test: New or updated tests

Target Base Branch

  • Base branch targeting: release/v0.2.23

Enterprise SDLC Quality Gate Checklist

  • Test-First Implementation (TDD): Comprehensive unit and integration tests authored before implementation code.
  • Full CI Quality Gate: devops ci executed locally with 10/10 green quality gates.
  • Strict Code Coverage: Maintained strict >= 90% code coverage requirement across src/.
  • Architectural Invariants Gate:
    • Cyclomatic complexity <= 10 project-wide across all functions and closures (devops scan complexity).
    • Maximum nesting depth <= 5 (< 6 indentation levels) across all code blocks (test_no_excessive_nesting_in_src).
    • Standardized domain exceptions inheriting from DevOpsCLIError.
    • Pytest collection hygiene enforced.
  • Zero-Trust Security & Egress Safety:
    • Zero plaintext secrets, API keys, or credentials stored in code, configurations, or commit history.
    • No information leaked or extracted from private or .gitignored paths.
    • SSRF mitigation and bounded subprocess timeouts strictly enforced.
  • Canonical Location Formatting: All CLI outputs, Rich tables, reports, and review findings formatted as filename.ext:n-n.
  • Documentation Synchronization: CLI options, markdown guides, and README synchronized via devops docs generate --sync-readme.
  • Conventional Commit Messages: Commit history adheres strictly to Conventional Commits format (feat(review): ...).

Related Issues / Milestones

@dan-petty
dan-petty merged commit 0b3d170 into release/v0.2.23 Sep 26, 2026
8 checks passed
@dan-petty
dan-petty deleted the feat/604-review-reports-state-only-what-was-checked branch September 26, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant