Repository navigation
Description
🛑 Problem Statement
Found via #1144 (population-scale validation against 718 real repos / 1.2M files). analysis_lens.py
declares a naming-convention signature family in its schema (analysis_lens.py:1061-1067):
"core_var_decl",
"design_camel_case",
"design_snake_case",
"design_pascal_case",
"design_upper_case",
"design_short_vars",
"design_long_vars",
which map to the SQLite columns struct_var_decl, struct_camel_case, struct_snake_case,
struct_pascal_case, struct_upper_case, struct_short_vars, struct_long_vars in
repo_data/file_data/function_data.
grep -c for any of these 7 source key names against gitgalaxy/standards/language_standards.py
returns 0 — no regex producer exists for any of them, in any language.
Confirmed empirically against master_db_v247.db (1,201,836 files, unfiltered, no active-logic
gate applied): all 7 columns are exactly 0 in every single row, including in files/languages
where these patterns are trivially common (PascalCase classes in TensorFlow/Airflow, UPPER_CASE
constants in Linux/WordPress C code, etc.) — this isn't corpus sparsity, it's structurally
impossible for the count to be anything but 0.
This is the same failure shape #323 already fixed for ai_tools/ai_memory/ai_logic_loop:
schema entries with no producer, sitting as permanent dead weight in every scan's output.
🎯 Objective
Either give this 7-column family real regex producers, or remove it from the schema the way #323
removed its predecessor — a permanently-0 column in every repo's output is worse than no column,
since it silently implies "we checked and found none" rather than "we never checked."
🛠️ Proposed Implementation
Unlike ai_tools/ai_memory/ai_logic_loop (behavioral detection, not realistically regex-able —
see #323's reasoning), naming-convention detection (camelCase vs snake_case vs PascalCase vs
UPPER_CASE, short vs. long identifiers) is a lexical, regex-tractable pattern — this family looks
implementable, not a dead end like #369's GlassWorm case. Two paths:
- Implement: add real identifier-naming regexes per language family (most languages already
have anargs/func_startcapture group that could be reused/extended to classify the
captured identifier's casing). - Remove: if not worth the engine complexity, follow Remove ai_tools, ai_memory, ai_logic_loop from SIGNAL_SCHEMA -- not realistically detectable via regex #323's precedent exactly — strip from
RISK_SCHEMA/SIGNAL_SCHEMAinanalysis_lens.py,record_keeper.py's CREATE TABLE +
INSERT, and regenerate golden masters.
✅ Acceptance Criteria
- Decision made: implement real producers, or remove per Remove ai_tools, ai_memory, ai_logic_loop from SIGNAL_SCHEMA -- not realistically detectable via regex #323's precedent.
- If implemented: a real test proves at least one file with PascalCase/snake_case/UPPER_CASE
identifiers produces a nonzero count for the matching column. - If removed:
tests/dead_key_audit.py --cibaseline updated, golden masters regenerated.
Activity
test: rebless golden crucible fixtures for #1145's naming-convention …
fix(core): give core_var_decl/design_* naming-convention signatures r…
docs(recorders): confirm audit_shadow_apis has a real, working produc…