Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the single-category
_detect_security_category()function with_classify_category(), a multi-category keyword classifier that coverssecurity,correctness,compatibility,testing, andconfiguration. 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
agent_fox/session/review_parser.py_CORRECTNESS_KEYWORDS,_COMPATIBILITY_KEYWORDS,_TESTING_KEYWORDS,_CONFIGURATION_KEYWORDS), replace_detect_security_categorywith_classify_category(priority-ordered multi-category check), keep old name as backward-compat alias, update call site inparse_review_findings()tests/unit/session/test_review_parser.pyTestClassifyCategory(8 tests) andTestCategoryPopulatedInFindings(6 tests)Tests
TestClassifyCategory— unit tests for_classify_category()covering each category keyword, the no-match case, priority ordering, and case-insensitivityTestCategoryPopulatedInFindings— integration tests verifyingparse_review_output()propagates the correct category for each category type and None for unclassified findingsVerification
Auto-generated by
af-fix.