You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In one review pass, we found six independent instances of the same failure
shape: a consumer reads a dict/schema key that no producer ever writes,
under either the exact name or a near-miss rename.
signal_processor.py reading ghost_meta["aperture_reason"] -- real key
is reason, and even that only gets copied on the opposite branch condition
from the one that matters (the "CRITICAL LEAK" shunt case)
statistical_auditor.py reading artifact["lang_mix"] -- never written
anywhere, silently disabling polyglot-file detection
AIAppSecSensor reading 7 of 8 inputs from a telemetry namespace that
nothing populates (companion issue)
That's a strong enough pattern to treat as a process problem, not a string
of unlucky typos. All six were invisible at runtime (no exceptions, no
crashes -- code just silently computed nothing, or the wrong thing) and were
only found by manually grepping every .get("key"...) call against every ["key"] = / "key": assignment across the codebase.
Proposed fix: automate the manual diff
A one-time investment: a small static-analysis script that:
Walks every .get("some_key" (and equivalent dict-access patterns)
across the repo.
Cross-references each key against every place it's ever assigned
(["key"] =, dict-literal construction, .setdefault(, etc.).
Flags any read key with zero matching writes anywhere in the codebase.
Runs as a CI check (or pre-commit hook), not just an ad-hoc audit.
Expect real noise on the first pass (config constants from external files,
legitimate external JSON schema keys like lockfile fields, keys that are
genuinely optional by design) -- the first sub-task is tuning it down to a
low-noise signal, not just writing the walker.
Sub-tasks
Build the key-read vs key-write static analysis script
Fix each of the 6 enumerated instances above (linked once individually filed)
Workflow context
Several of these instances (at least #249's duplicate-math case and the
AIAppSecSensor telemetry mismatch) trace back to AI-assisted coding sessions
(Gemini) producing plausible-looking consumer code against a producer that
was never actually built or was renamed later without updating the consumer.
Worth keeping this epic open as the place that documents the pattern, even
as individual instances get fixed piecemeal.
Pattern observed
In one review pass, we found six independent instances of the same failure
shape: a consumer reads a dict/schema key that no producer ever writes,
under either the exact name or a near-miss rename.
SecurityLens.evaluate_risk()vsSignalProcessor's_calc_*methods --two full disagreeing implementations of the same five risk categories (Two independent, disagreeing implementations of the same risk-scoring logic #249)
supply_chain_firewall.pyreadingdependency_network-- key never writtenanywhere; real data lives at
telemetry.network_metrics(found during Two independent, disagreeing implementations of the same risk-scoring logic #249)signal_processor.pyreadingghost_meta["aperture_reason"]-- real keyis
reason, and even that only gets copied on the opposite branch conditionfrom the one that matters (the "CRITICAL LEAK" shunt case)
statistical_auditor.pyreadingartifact["lang_mix"]-- never writtenanywhere, silently disabling polyglot-file detection
language_standards.py's AI/LLM SDK names hand-pasted into 2 of 57language blocks instead of using the established GLOBAL_ pattern (AI/LLM detection sensor cluster (llm_api, llm_orchestrator, ai_tools, etc.) is entirely non-functional -- no rule ever produces these signals #313
follow-up)
AIAppSecSensorreading 7 of 8 inputs from atelemetrynamespace thatnothing populates (companion issue)
That's a strong enough pattern to treat as a process problem, not a string
of unlucky typos. All six were invisible at runtime (no exceptions, no
crashes -- code just silently computed nothing, or the wrong thing) and were
only found by manually grepping every
.get("key"...)call against every["key"] =/"key":assignment across the codebase.Proposed fix: automate the manual diff
A one-time investment: a small static-analysis script that:
.get("some_key"(and equivalent dict-access patterns)across the repo.
(
["key"] =, dict-literal construction,.setdefault(, etc.).Expect real noise on the first pass (config constants from external files,
legitimate external JSON schema keys like lockfile fields, keys that are
genuinely optional by design) -- the first sub-task is tuning it down to a
low-noise signal, not just writing the walker.
Sub-tasks
optional keys, third-party JSON schema fields)
Workflow context
Several of these instances (at least #249's duplicate-math case and the
AIAppSecSensor telemetry mismatch) trace back to AI-assisted coding sessions
(Gemini) producing plausible-looking consumer code against a producer that
was never actually built or was renamed later without updating the consumer.
Worth keeping this epic open as the place that documents the pattern, even
as individual instances get fixed piecemeal.