System Component Map

Frontend & Delivery

Vanilla Console & Strict CSP

Built with zero heavyweight dependencies (HTML5, Vanilla CSS, ES Modules). Enforces a strict Content Security Policy (no inline scripts, no untrusted origins, clickjacking protection).

Files: web/app.js, web/view.js, web/styles.css
API Gateway

FastAPI Core Engine

Serves deterministic endpoints (/api/analyze, /api/simulate) and the investigation runner (/api/agent/investigate). Implements sliding-window rate limiters and auth guards.

Files: blastgate/api.py
Code Graph Subprocess

Gristle AST Extractor

Executes inside an isolated environment (.gristle-venv). Parses repository AST, maps symbols to schemas, and generates tamper-resistant review reports.

Files: blastgate/codegraph.py, scripts/setup_gristle.sh
Connected Graph Engine

FalkorDB Graph Database

High-throughput graph database running on Redis protocol. Stores service nodes, CONSUMES_FIELD contracts, DEPENDS_ON topologies, SLAs, and historical incidents.

Files: blastgate/graph.py, Cypher multi-hop traversals
Tool Interface

Allowlisted MCP Server

Implements the Model Context Protocol (MCP) specification over stdio. Exposes 5 allowlisted tools with schema validation, PR pinning, and duplicate execution guards.

Files: blastgate/mcp_server.py, blastgate/tools.py
Authoritative Policy

Deterministic Verdict Engine

Evaluates multi-hop topology, consumer fallbacks, critical service exposures, and incident recurrence. Decisions are 100% reproducible and immune to LLM hallucination.

Files: blastgate/verdict.py, blastgate/analysis.py
What-If Branching

GRAPH.COPY Sandbox

Duplicates active graph state into a temporary copy in FalkorDB. Simulates hypothetical consumer fallback mitigations without polluting the production graph.

Files: blastgate/simulation.py
Temporal Memory

Investigation Memory Graph

Stores prior investigation verdicts and AST review hashes in a dedicated graph. Revalidates historical claims against active graph topology upon recall.

Files: blastgate/memory.py

Track 01 Rubric Compliance Matrix

Criterion Implementation in Codebase Verification Test
1. Multi-hop reasoning Traverses transitive consumer paths from pricing-engine to checkout-api (hop 1) to order-orchestrator (hop 2) and downstream services (hop 3). tests/integration/test_falkordb.py
test_codegraph_agent_loop.py
2. Graph algorithms as tools Cypher BFS blast radius traversal; sampled betweenness centrality calculation identifying order-orchestrator with centrality score 4.0. tests/unit/test_analysis_unit.py
test_mcp_server.py
3. Tool selection via MCP Agent orchestrates 5 allowlisted MCP tools via discovered JSON schemas, passing arguments dynamically based on investigation state. tests/agent/test_orchestrator_unit.py
tests/mcp/test_mcp_server.py
4. Actions based on graph data Absence of fallback on checkout-api triggers deeper dependency trace; high centrality triggers incident retrieval (INC-2041) and reviewer assignment. tests/unit/test_verdict.py
tests/agent/test_agent_live.py
5. Explainable results Every claim is backed by specific Cypher node identifiers, verified SLA penalties ($43k assumed exposure), and isolated counterfactual validation. web/tests/view.test.mjs
tests/unit/test_simulation_unit.py

Trust, Transparency & Rigor

Synthetic Demonstration Data

To ensure reproducible judging without exposing proprietary corporate infrastructure, services (e.g. checkout-api), incidents (INC-2041), SLAs, and engineers (eng-alpha) are synthetic demo parameters. The $43,000 figure is an assumed exposure calculation (sum of synthetic hourly penalty rates × assumed outage duration), not historical accounting.

Type-Level vs. Runtime Link Limits

Gristle indexes Python AST structural references (functions and routes connected to classes). BlastGate explicitly states that a type-level reference does not prove that a given function executes that field at runtime.

Deterministic Engine Authority

The agent planner gathers facts and generates natural-language explanations, but the verdict is computed strictly by deterministic rules. An LLM cannot override a BLOCK or weaken an SLA violation.

Offline Planner Integrity

The verified offline demo runs with AGENT_PROVIDER=deterministic. The console truthfully displays this badge and does not claim that a live model autonomously selected the tool calls during the offline run.

Inspect the Codebase on GitHub

Review the full implementation, Cypher queries, and test suites.