Product
How it works
Change graph → evidence → investigation. Correlation is scored; causation stays with the engineer.
TypeError in checkout tax calculation
payments@2026.03.15 · LKG production · window 7d · culprit src/payments/tax.ts
Timeline
- Mar 14 12:00deploy
LKG production good000lk
- Mar 15 10:00pr
PR #95 feat: banner copy
- Mar 15 17:35pr
PR #101 feat: adjust checkout tax
- Mar 15 18:00sentry
Error rate spike · checkout
Stack paths · FACT
- src/payments/tax.ts
- src/payments/checkout.ts
Sentry opens a window around the spike. The graph already has PRs, commits, and the last-known-good deploy. No SHA is invented.
Path
One idea per step
- 01
Ingest changes & errors
GitHub App, Sentry, and Vercel webhooks/API normalize into tenant-scoped entities with HMAC verification and idempotent delivery claims. Natural keys prevent duplicate PRs, commits, and issues.
- 02
Open the incident
Map Sentry issue time, stack frames, and release to commits when possible. commit_sha may be null; ChangeGraph never invents a SHA. Investigation window starts at 24h and can expand to 72h then 7d.
- 03
Resolve last-known-good
When a prior healthy deploy exists, LKG bounds “what changed since things were good.” Prefer candidates between LKG and the incident over ancient history.
- 04
Score candidates deterministically
Scorer v2 ranks PRs/commits with fixed weights (25/25/25/15/10). No LLM in the score. Identical inputs → identical ranks. Penalties for no file overlap or docs/test-only changes.
- 05
Package evidence
Build a sanitized evidence package, then pack it: overlapping paths, timing, release membership, counter-evidence (“why not others”). Secrets never enter the package. The model sees a budgeted digest, not a pretty-printed dump.
- 06
Explain with Mastra
UI shows timeline, ranked candidates, and evidence. explain_incident and investigate_incident on the in-repo Mastra-compatible runtime summarize only the packed package. Model HTTP is the ChangeGraph provider router; Agent.generate throws. Optional Headroom compresses after pack; the packer works without it. Output is validated: invented PRs and files are dropped. Missing provider returns not_configured.
Evidence vocabulary
Labels keep humans honest about what the system knows versus what it scores or suggests.
- FACT
- Observed provider data: file changed in a PR, stack frame path, deploy timestamp, release version.
- CORRELATION
- Scored relationship: PR overlaps the stack and landed in the release window. Useful, not proven cause.
- HYPOTHESIS
- Mastra phrasing over the evidence package. Must cite package fields only; never invent PRs or files.
- UNKNOWN
- Missing mapping (null commit SHA), empty candidate set, or thin overlap. Valid outcomes. Do not invent a culprit.
Deep dive: Scoring & LKG · Investigate incidents · Open source tools
See it on fixtures A–D
Docker Compose, seed fixtures A–D, and investigate with ranked change candidates, evidence, and Mastra workflows.