Skip to content

fix(review_parser): classify findings into multiple categories (fixes #485)#487

Open
mickume wants to merge 1 commit intodevelopfrom
fix/485-fix-review-findingscategory-is-null-for-all-non-security-findings-71-of-78
Open

fix(review_parser): classify findings into multiple categories (fixes #485)#487
mickume wants to merge 1 commit intodevelopfrom
fix/485-fix-review-findingscategory-is-null-for-all-non-security-findings-71-of-78

Conversation

@mickume
Copy link
Copy Markdown
Contributor

@mickume mickume commented Apr 17, 2026

Summary

Replaces the single-category _detect_security_category() function with _classify_category(), a multi-category keyword classifier that covers security, correctness, compatibility, testing, and configuration. All non-security findings that match a keyword now receive a non-NULL category, reducing the NULL rate from 91% to a small residual for genuinely uncategorised findings.

Closes #485

Changes

File Change
agent_fox/session/review_parser.py Add four keyword sets (_CORRECTNESS_KEYWORDS, _COMPATIBILITY_KEYWORDS, _TESTING_KEYWORDS, _CONFIGURATION_KEYWORDS), replace _detect_security_category with _classify_category (priority-ordered multi-category check), keep old name as backward-compat alias, update call site in parse_review_findings()
tests/unit/session/test_review_parser.py Add TestClassifyCategory (8 tests) and TestCategoryPopulatedInFindings (6 tests)

Tests

  • TestClassifyCategory — unit tests for _classify_category() covering each category keyword, the no-match case, priority ordering, and case-insensitivity
  • TestCategoryPopulatedInFindings — integration tests verifying parse_review_output() propagates the correct category for each category type and None for unclassified findings

Verification

  • All existing tests pass: ✅
  • New tests pass: ✅ (14 added)
  • Linter / formatter: ✅
  • No regressions: ✅ (5009 total, up from 4995)

Auto-generated by af-fix.

…485)

Replace the single-category _detect_security_category() function with
_classify_category(), which recognises five categories in priority order:
security, correctness, compatibility, testing, and configuration. The old
function name is preserved as a backward-compatibility alias.

Adds 14 regression tests covering each category and priority ordering.
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