Repository navigation
Description
Description
Following #1013 (db_complexity removal — merged via #1021), this epic tracks a coordinated
wave of removing/fixing metrics in the GitGalaxy SAST engine that overreach what an AST-less,
regex-only engine can honestly claim to measure. Same root cause pattern each time: a metric
that sounds precise (a CVE-style score, a Big-O class, a named vulnerability class) but is
actually built from unrelated regex hit-counts co-occurring in the same file/block, with no
real data-flow, control-flow, or type information behind it.
See gitgalaxy/standards/how_to_add_a_language.md and tests/extraction/how_to_harden_extraction.md
for the parallel discipline this engine already applies to parsing correctness — this epic is
the same "don't fake precision the architecture can't support" philosophy applied to risk
scoring instead.
Sub-issues (execution order)
- Remove
db_complexitymetric from the Structural Extractor #1013 — Removedb_complexitymetric (merged via Remove db_complexity metric from the Structural Extractor #1021) - Remove
logic_bombandalgorithmic_dosmetrics #1015 — Removelogic_bombandalgorithmic_dosmetrics (absorbed Removealgorithmic_dosmetric due to compounding heuristic failures #1016, closed as duplicate) - Remove
big_o_depthandis_recursivecomplexity metrics #1014 — Removebig_o_depthandis_recursivecomplexity metrics - Fix argument counting to ignore commas within nested brackets/types #1019 — Fix argument counting to ignore commas within nested brackets/types
- Remove AST-dependent Security & Vulnerability metrics (Injection, RCE, Memory) #1020 — Remove AST-dependent Security & Vulnerability metrics (Injection, RCE, Memory)
- Redesign LCOM (Lack of Cohesion of Methods) calculation using AST-less regex sets #1018 —
RedesignRemoved outright instead of redesigning (see issue's closing comment: prerequisite bugs bug(core): Nested class boundaries truncate outer class scope #1040/bug(core): Nested functions are silently dropped from extraction #1041 plus systemic, style-driven bias in the metric made a bounded 0-100 score untrustworthy;lcom_scoreremoved via Remove LCOM (Lack of Cohesion of Methods) metric from the core engine #1042,state_entanglementkept) - Update LLM Recorder instructions to "Technical Storyteller" persona #1017 — Update LLM Recorder instructions to "Technical Storyteller" persona
Why this order
algorithmic_dos(Removelogic_bombandalgorithmic_dosmetrics #1015) is mathematically built onbig_o_depth(Removebig_o_depthandis_recursivecomplexity metrics #1014) — remove the
dependent composite metric before the metric it depends on, so Removebig_o_depthandis_recursivecomplexity metrics #1014 has one less downstream
consumer to touch.- Fix argument counting to ignore commas within nested brackets/types #1019 touches the exact same
detector.pyfunction (_calculate_block_metrics) as Removebig_o_depthandis_recursivecomplexity metrics #1014 —
bundled immediately after for locality. - Remove AST-dependent Security & Vulnerability metrics (Injection, RCE, Memory) #1020 (Security/Vuln lens) has a real blast radius wider than its own action items list —
touchesanalysis_lens.py,signal_processor.py,security_lens.py,llm_recorder.py,
supply_chain_firewall.py,audit_recorder.py, andstate_rehydrator.py(verified via grep,
not just the 3 files the issue names). Gets its own dedicated pass. - Redesign LCOM (Lack of Cohesion of Methods) calculation using AST-less regex sets #1018 is the one issue in this wave that's a redesign, not a deletion — new regex + set-math
logic indetector.py's class parsing, needscrucible_check.pydifferential verification.
Done after the codebase is decluttered from the other removals. - Update LLM Recorder instructions to "Technical Storyteller" persona #1017 (persona rewrite) is explicitly motivated by the other removals ("stop repeating
hallucinated logic bombs and O(2^N) claims") — done last so it narrates the final metric set.
Process
One PR per sub-issue, merged sequentially into main (matches this repo's existing convention).
detector.py-touching issues (#1014, #1019, #1018) need python tests/tools/crucible_check.py;
the rest (#1015, #1020, #1017) are downstream-only and just need
python tests/tools/audit_check.py + pytest.
Any downstream consumer found beyond what a sub-issue's own action-items list mentions (a common
pattern in this wave so far — see #1013's PR description) should get called out in that PR's
description, not silently left dangling.
Status (2026-08-05)
All sub-issues complete except #1017, which is the last one blocking this epic's closure.
Activity
Remove big_o_depth and is_recursive complexity metrics from the risk …
Remove LCOM (Lack of Cohesion of Methods) metric from the core engine (…
squid-protocol commentedon Aug 5, 2026
All sub-issues complete: #1013, #1014, #1015 (absorbed #1016), #1018 (removed outright via #1042), #1019, #1020, and #1017 (merged via #1048). Closing the epic.
security: remove ai_appsec_sensor.py's co-occurrence RCE/exfiltration…
docs: tone/accuracy pass across every README, plus writing-guide skil…