Repository navigation
Stop db_health_assessor from false-flagging 11 working columns as DEAD - #2
Merged
Merged
Conversation
The population run in squid-protocol/gitgalaxy#1144 hit 11 DEAD FEATURE false positives, all traced to the tool's own whitelist/denominator: - llm_/ml_/dl_ domain-detection signatures and lazy_evaluation are real, working features that are simply rare outside AI-heavy / FP-heavy code. Added the prefixes to SPARSE_PREFIXES and lazy_evaluation to SPARSE_EXACT. - lit_* literature sensors only fire on markdown/doc files, which have coding_loc = 0 and are structurally excluded from active_logic_total -- the denominator this check measures against. The tool was effectively asking "what % of non-doc source files use markdown syntax" (~0% by construction). Added a documented LANGUAGE_SCOPED_PREFIXES exemption rather than silencing it, per issue option (b). Verified on a synthetic fixture: the 11 columns no longer flag, while a genuinely all-zero control column is still detected. Closes #1 Co-Authored-By: Claude Sonnet 5 <[email protected]>
7 tasks
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.
What
Fixes the 11
💀 DEAD FEATUREfalse positives found during the v2.4.7 population run (squid-protocol/gitgalaxy#1144), all of which trace back todb_health_assessor.py's own whitelist and denominator rather than the engine.1.
llm_/ml_/dl_+lazy_evaluation— sparse, not dead.llm_api,llm_orchestrator,llm_vector_store,llm_local_compute,ml_traditional,dl_frameworks,lazy_evaluationall carry real, sensible hits (llm_apiinhomeassistant/.../openai_conversation,dl_frameworksintensorflow/.../keras/layers,lazy_evaluationineffect/.../Array.ts). They read ≥99% zero only because this 718-repo corpus is mostly non-AI, non-FP code. Addedllm_,ml_,dl_toSPARSE_PREFIXESandlazy_evaluationtoSPARSE_EXACT.2.
lit_*— denominator blind spot (issue option b).lit_code_blocks,lit_diagrams,lit_headers,lit_linksonly ever fire on markdown/doc files, which havecoding_loc = 0and are therefore excluded fromactive_logic_total— the population this check divides against. The tool was effectively computing "what % of non-doc source files use markdown syntax" (~0% by construction), not "is this feature dead." Confirmed working: 43,752 / 49,252 markdown files carry reallit_headershits.Rather than the larger per-column-family predicate refactor (option a), this adds a separate, documented
LANGUAGE_SCOPED_PREFIXESexemption so the reason is encoded in the source, not just silenced.Verification
data/is gitignored (multi-GB), so I could not re-run againstmaster_db_v247.dbdirectly. Verified instead on a syntheticfile_datafixture: 1000 active-logic rows with all 11 columns zero + 50 markdown rows wherelit_headersfires + a genuinely all-zero control column.Result: none of the 11 columns flag;
genuinely_dead_colis still detected. The change does not widen any global threshold.Recommend a maintainer with the DB re-run
python3 db_health_assessor.py data/master_db_v247.dbto confirm acceptance criterion 1 against real data.Closes #1
🤖 Generated with Claude Code