Skip to content

Stop db_health_assessor from false-flagging 11 working columns as DEAD - #2

Merged
squid-protocol merged 1 commit into
mainfrom
fix/health-assessor-false-dead-flags
Aug 28, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/health-assessor-false-dead-flags

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

What

Fixes the 11 💀 DEAD FEATURE false positives found during the v2.4.7 population run (squid-protocol/gitgalaxy#1144), all of which trace back to db_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_evaluation all carry real, sensible hits (llm_api in homeassistant/.../openai_conversation, dl_frameworks in tensorflow/.../keras/layers, lazy_evaluation in effect/.../Array.ts). They read ≥99% zero only because this 718-repo corpus is mostly non-AI, non-FP code. Added llm_, ml_, dl_ to SPARSE_PREFIXES and lazy_evaluation to SPARSE_EXACT.

2. lit_* — denominator blind spot (issue option b).
lit_code_blocks, lit_diagrams, lit_headers, lit_links only ever fire on markdown/doc files, which have coding_loc = 0 and are therefore excluded from active_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 real lit_headers hits.

Rather than the larger per-column-family predicate refactor (option a), this adds a separate, documented LANGUAGE_SCOPED_PREFIXES exemption so the reason is encoded in the source, not just silenced.

Verification

data/ is gitignored (multi-GB), so I could not re-run against master_db_v247.db directly. Verified instead on a synthetic file_data fixture: 1000 active-logic rows with all 11 columns zero + 50 markdown rows where lit_headers fires + a genuinely all-zero control column.

Result: none of the 11 columns flag; genuinely_dead_col is 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.db to confirm acceptance criterion 1 against real data.

Closes #1

🤖 Generated with Claude Code

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]>
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.

db_health_assessor.py false-flags 11 working columns as DEAD FEATURE (llm_/ml_/dl_ whitelist gap + lit_* active-logic filter blind spot)

1 participant