The 7-Stage Graph Investigation Lifecycle
BlastGate replaces intuition with a deterministic, evidence-backed pipeline. Here is how a real Git change traverses the code graph and FalkorDB service graph to yield a defensible engineering decision.
Detect the Real Source Code Change
In our flagship demonstration PR-900, a developer changes a contract field type in contracts/pricing.py:
@@ class PriceQuote:
- discount_tier: str
+ discount_tier: dict
BlastGate extracts the real unified git diff between the target branch and working tree, isolating changed symbols and field-level alterations.
contracts/pricing.py::PriceQuote, Field: discount_tier, Change Type: type_changed (str → dict).
Index the AST into FalkorDB Code Graph
BlastGate executes Gristle inside an isolated virtual environment (.gristle-venv). Gristle parses the full repository AST and populates an in-memory code graph in FalkorDB with nodes representing classes, functions, and endpoints.
Gristle indexes structural relationships: 6 dependent functions and 2 API routes that reference PriceQuote.
Validate Contract Mapping to Service Graph
Before traversing the service graph, code-level changes must be validated against published contract schemas in blastgate.map.json.
BlastGate verifies that PriceQuote.discount_tier is the authoritative implementation for the schema field pricing-api-v2.discount_tier emitted by the service pricing-engine.
validated (Ambiguous or unmapped changes are flagged with explicit UNCERTAIN warnings rather than false CLEARs).
Query Connected Multi-Hop Blast Radius
Once mapped, FalkorDB executes multi-hop Cypher queries along CONSUMES_FIELD and DEPENDS_ON relationships:
MATCH (s:Service)-[:CONSUMES_FIELD]->(f:SchemaField {field: $field})
OPTIONAL MATCH path = (downstream:Service)-[:DEPENDS_ON*1..4]->(s)
RETURN s, path
The query discovers that checkout-api is a direct consumer (hop 1), which feeds order-orchestrator (hop 2) and storefront-bff (hop 2), cascading further to invoice-worker and partner-gateway (hop 3).
Investigate via 5 Allowlisted MCP Tools
The agent orchestrator triggers five distinct Model Context Protocol tools, each answering a specific question with schema-validated arguments:
inspect_change: Validates schema type and producer properties.inspect_contract_coverage: Checks consumer fallback readiness. Discoverscheckout-apihas fallback_enabled = false.trace_blast_radius: Traverses all transitive downstream services, identifying 5 affected systems and 3 at-risk SLAs.analyze_network_criticality: Computes sampled betweenness centrality, highlightingorder-orchestratorwith a critical score of 4.0 (highest in topology).retrieve_incidents_and_reviewers: Queries graph history for outageINC-2041and assigns responsible engineerseng-alphaandeng-bravo.
next_actions. It does not fabricate autonomous live-LLM tool decisions.
Deterministic Verdict: BLOCK
BlastGate's deterministic verdict policy evaluates the verified Cypher evidence:
- Critical Failure: A breaking type change reaches consumer
checkout-apiwithout fallback handling. - SLA Impact: Cascades to critical services
checkout-apiandorder-orchestrator, generating an assumed $43,000 SLA penalty acrossSLA-CHECKOUT-99.95andSLA-ORDERS-99.9. - Incident Risk: Re-exposes the root cause of past outage
INC-2041.
The rule engine outputs an authoritative BLOCK. Agent commentary can explain the verdict, but cannot weaken or override it.
Hypothetical Counterfactual Simulation
The developer asks: "What if checkout-api implements a backward-compatible fallback?"
BlastGate copies the active graph into a temporary isolated graph (GRAPH.COPY) in FalkorDB. On the copy, it sets checkout-api.fallback_enabled = true and re-executes the verdict engine.
The simulated outcome becomes CLEAR. BlastGate renders a visual topology diff, while keeping the production graph and authoritative BLOCK decision strictly unchanged and explicitly marked UNVERIFIED.