Summary
The category column in review_findings (added in schema v7) is only populated for security-classified findings. All other findings get category=NULL.
review_findings by category:
NULL: 71 findings (91%)
security: 4 findings ( 5%)
(3 major/security + 1 critical/security)
Root Cause
_detect_security_category() in review_parser.py:84-94 is the only categorization logic. It checks ~20 hardcoded security keywords and returns either "security" or None. No other category types exist.
def _detect_security_category(description: str) -> Optional[str]:
# Returns "security" if keywords match, None otherwise
...
The category value is correctly passed through to the INSERT statement (review_store.py:229-239), but since only security is detected, everything else is NULL.
Files:
agent_fox/session/review_parser.py:57-94 — keyword list and detection function
agent_fox/knowledge/review_store.py:229-239 — INSERT statement
Impact
The category field was designed to enable filtering and prioritization of findings by type. With 91% NULL values, it's effectively useless for non-security analysis. Queries like "show all correctness findings" or "count performance issues" are impossible.
Suggested Fix
Expand _detect_security_category() (or replace it) with a multi-category classifier. Reasonable categories based on the existing finding descriptions:
correctness — spec compliance, wrong behavior, missing functionality
compatibility — API mismatches, proto field disagreements
testing — missing tests, test infrastructure issues
configuration — wrong ports, missing config, deployment issues
security — existing keyword-based detection
Could be keyword-based (same approach, more lists) or LLM-based for higher accuracy.
Summary
The
categorycolumn inreview_findings(added in schema v7) is only populated for security-classified findings. All other findings getcategory=NULL.Root Cause
_detect_security_category()inreview_parser.py:84-94is the only categorization logic. It checks ~20 hardcoded security keywords and returns either"security"orNone. No other category types exist.The
categoryvalue is correctly passed through to the INSERT statement (review_store.py:229-239), but since only security is detected, everything else is NULL.Files:
agent_fox/session/review_parser.py:57-94— keyword list and detection functionagent_fox/knowledge/review_store.py:229-239— INSERT statementImpact
The
categoryfield was designed to enable filtering and prioritization of findings by type. With 91% NULL values, it's effectively useless for non-security analysis. Queries like "show all correctness findings" or "count performance issues" are impossible.Suggested Fix
Expand
_detect_security_category()(or replace it) with a multi-category classifier. Reasonable categories based on the existing finding descriptions:correctness— spec compliance, wrong behavior, missing functionalitycompatibility— API mismatches, proto field disagreementstesting— missing tests, test infrastructure issuesconfiguration— wrong ports, missing config, deployment issuessecurity— existing keyword-based detectionCould be keyword-based (same approach, more lists) or LLM-based for higher accuracy.