Repository navigation
Description
🛑 The Architecture & The Oversight
As an AST-free, Zero-Trust knowledge graph engine, GitGalaxy is built to survive air-gapped or restricted CI/CD environments. When C-backed computational engines (networkx, tiktoken, xgboost, pyyaml) are missing, the orchestrator gracefully degrades into Zero-Dependency Mode.
For strict data provenance, the architectural intent was always to record bypassed metrics (like N-Dimensional topology, PageRank, or Token Mass) as NULL. This is explicitly stated in the galaxyscope.py CLI warning and documented properly inside the AI-context payloads generated by llm_recorder.py (which correctly notes that missing values are "intentionally recorded as null").
However, I missed a section in the translation layer. Currently, record_keeper.py relies on hardcoded dictionary fallbacks (e.g., .get("pagerank_score", 0.0)). When Zero-Dependency Mode skips these calculations, the dictionary keys are omitted, triggering the literal 0.0 fallbacks. As a result, false zeros are being injected into the SQLite database instead of true NULLs. Furthermore, llm_recorder.py is currently the only output artifact that explicitly highlights to the user that this degraded mode was engaged and how it alters the system.
⚠️ The Risk (Data Poisoning)
A 0.0 is a mathematical reality, while a NULL is a lack of data. If the engine outputs literal zeros for metrics like Dependency Blast Radius or Betweenness Centrality, downstream consumers (Enterprise Data Warehouses, AI agents, or WebGL UI dashboards) will interpret those as perfectly isolated files rather than uncalculated metrics.
🛠️ The Fix (Implementation Plan)
To guarantee absolute data integrity, I am standardizing the Zero-Dependency state across all export artifacts:
-
record_keeper.py(SQLite Vault): Strip the0.0fallbacks for advanced topology and ML metrics. Map omitted dictionary keys to strict SQLNULLs. Introduce anis_zero_dependency_modeboolean to therepo_datatable. -
audit_recorder.py(Forensic JSON): Elevate the mode flag into theForensic Traceability Anchor. Explicitly label bypassed vulnerability and ML metrics as[BYPASSED - ZERO DEPENDENCY MODE]rather than reporting0. -
gpu_recorder.py(WebGL JSON): Inject thezero_dependency_modeflag into thepayload["meta"]["session"]dictionary so the front-end rendering engine can display an accurate system-state warning regarding missing spatial geometries.
📈 Impact
- Target Domains: Data Provenance, Air-Gapped DevSecOps, Static Application Security Testing (SAST).
- Ensures the mathematical integrity of the structural telemetry pipeline regardless of the host environment's dependencies.
Activity
fix(data-integrity): inject zero-dependency mode flags into top-level…
test: harden zero-dependency fallback coverage across all c-backed en…
Release v2.3.1: Enforce Zero-Dep Data Integrity & Double Golden CI/CD…
fix(data-integrity): enforce zero-dependency mode fallbacks and ci/cd…
cics-crucible: hc-tdqueue-enable case (body-only; crucible PR #97) (P…