Root-cause analysis
How Mendloop investigates an error down to the exact line, checks every citation, and writes the fix plan.
Mendloop investigates a production error, finds the line that causes it, and writes a fix plan for its owner to approve. Every claim in the result cites evidence, and every citation is checked.
What you need#
- A model mapped for each tier in AI models. Without one, every step falls back to rules and the run log marks those steps "rules", so an RCA still finishes.
- For code-level results: a verified GitHub connection whose project mapping maps the Mendloop project to its repository. Without a mapping, the RCA runs on the event alone and says so.
- For exact lines in JavaScript: source maps and tagged releases.
What happens in one investigation#
- Evidence. The latest event's stack (your own frames first), breadcrumbs, release, environment and feature flags; log events from the same project in the 15 minutes around it; the code at the release commit with a few lines of context; and the recent commits that touched those files.
- Similar incidents. If the Brain has memories, it recalls similar past incidents first.
- Classifier (
fasttier). Is it a code bug, config, data, a third party, infrastructure, network, user error or not a bug? When the fix doesn't belong in code, the report ends early as not code. - Investigators (
balancedtier), in parallel: the code path from trigger to crash, the suspect commit that most likely introduced it, and release correlation across the release, flags, environment and logs. The first two can read more code at the release commit, read-only. - Consolidator (
strongesttier). It merges the findings into one root cause with a causal chain. Then every citation is checked: a claim with no valid citation is dropped, every code reference must exist at its commit, and commits, releases, events, breadcrumbs, logs and memories must be in the evidence. - Fix planner (
balancedtier). The diff plan, alternatives, risk and the regression test. - Sharing. A summary goes to the issue's ticket as a comment and to its Slack thread (simulated in test mode).
Each result carries a proof level: Hypothesis or Strong today, with the reasons written out.
Which commit is read#
The commit for the issue's release. Mendloop looks for a SHA in the release (web@1.8.2+3f9c2ab), then a
commit, git_sha or vcs.revision tag on the event, then a git tag named like the release (web@1.8.2,
1.8.2 or v1.8.2). If none is found, it reads the default branch head and the report says so.
Code is read from a read-only mirror of each mapped repository, refreshed by push webhooks or when it is more than 10 minutes old. Source-mapped frames are matched to files by path (or by module for JVM languages), and a line is cited only if it exists at that commit.
Privacy#
The evidence is scrubbed and redacted again, so secrets in code or logs are masked too. It is trimmed to a token budget, least useful first: old logs and breadcrumbs, then vendor frames. Models receive it as quoted data and never follow instructions found in it.
Automatic or on demand#
The Crash to PR workflow starts an investigation for new and regressed production errors. You can also start one from an issue. To keep model spend in check, an automatic investigation is skipped for issues below a minimum severity (P2 by default), repeats of the same crash are debounced for an hour, and each organization has a daily cap. A person, or an explicit workflow run, is never gated, and test mode is exempt.
The report#
The report has the status (running, done, not code or failed), the classification, the root cause with its exact location and the cited causal chain, the fix plan, similar incidents, the cost and tokens, and a 1–5 rating from the owner. When the owner asks for changes, the plan gets a new version (at most five times).
Export or print it#
Export a report as a document from the report page, as HTML (laid out for A4: print it from the browser and choose "Save as PDF") or as Markdown, with numbered sources and their file, line and commit, for pasting into a ticket, a Slack message or a doc. No PDF renderer is needed on the server.
Troubleshooting#
| You see | Do this |
|---|---|
| "No repository is mapped to this project" | Add the mapping in Integrations → GitHub. |
| "Couldn't read owner/name" | The connection isn't verified, or GitHub was unreachable. Run verify. |
| "code was read at the default branch head" | The release commit wasn't found. Tag releases, or send the commit with the event. |
| No root cause, or "no model available" | Map every tier in Settings → Models and budgets and check Test passes. |
| The cause names the wrong file | Choose Request changes with a comment, or Reject: nothing is written. Rate the report so analytics and the Brain learn from it. |