Skip to content

feat(review): track false-positive rate across runs (#434) - #576

Merged
dan-petty merged 1 commit into
release/v0.2.23from
feat/434-false-positive-rate-tracking
Sep 25, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.23from
feat/434-false-positive-rate-tracking

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary of Changes

Closes #434

Key Changes

  • Finding Schema Enhancement (src/devops_cli/ai/review_schema.py):
    • Added optional category: str | None field with flexible alias choices (category, type, classification, defect_class) to Finding.
    • Preserved category classification during finding consolidation (_merge_two_findings).
  • Category Metrics Analytics Engine (src/devops_cli/ai/review/category_metrics.py):
    • Implemented CategoryMetric dataclass and category resolution (resolve_finding_category) with semantic fallback to _infer_hallucination_category.
    • Implemented compute_category_metrics to compute per-category status breakdowns and percentage false-positive rates.
    • Implemented collect_historical_category_metrics to aggregate historical session findings across saved review directories.
    • Implemented format_category_baseline_markdown to render a Markdown table comparing session FP rates against historical baselines.
  • CLI Review Stats Enhancement (src/devops_cli/commands/review.py):
    • Refactored review_stats procedural loop into single-responsibility helpers, reducing complexity from M = 15 to M <= 4.
    • Added Category False Positive Rate (Invalidated) breakdown table to devops review stats.
  • Review Pipeline & Reporting Integration (src/devops_cli/ai/review/pipeline.py):
    • Added ## Category Verification & False-Positive Baseline section to generated Markdown review reports (review.md).
    • Added False Positive Rate metric to console review summary table.
  • Automated Tests & Quality Gates:
    • Added comprehensive test suite in tests/test_category_metrics.py and updated tests/test_review.py with structural tuple equality assertions.
    • 100% passing status across all Gated CI checks (uv run devops ci).

@dan-petty dan-petty added this to the v0.2.23 milestone Sep 25, 2026
@dan-petty
dan-petty merged commit f7628dc into release/v0.2.23 Sep 25, 2026
7 checks passed
@dan-petty
dan-petty deleted the feat/434-false-positive-rate-tracking branch September 25, 2026 12:56
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