BackCase study
Jarvis site monitor
Explains outages in plain English and proposes guarded fixes.
- Role
- Sole developer
- Team
- Solo
- Timeline
- Built July 2026; running every 15 minutes since
- Stack
- Node.js, GitHub Actions, Groq, Playwright, Vercel
- Reading time
- 3 min

TL;DR
- Problem
- I had several sites live and needed to make sure none was left unattended. I wanted to know when one went down before a customer did, understand why without digging through logs, and fix small problems from my phone.
- What I did
- Every 15 minutes Jarvis checks each site. When one goes down it asks an AI model what the symptoms most likely mean, emails me a plain-English explanation and, if the fix is small and safe, opens a pull request I can approve with one tap.
- Result
- In deliberate test outages on a sandbox site, Jarvis caught and explained both failures and opened one-line fix pull requests, which I merged after review. Every fix has to pass five guard rails enforced in code.
Context
I had several sites live and needed to make sure none was left unattended. I built Jarvis in July 2026, and it has run continuously since.
Jarvis runs on GitHub Actions. A workflow requests each site in sites.json every 15 minutes and records whether it’s up, the status code and the response time.
Around that check sit four more pieces:
- Explanations. When a site goes down, the symptoms go to an LLM through Groq. A three- to four-sentence explanation with suggested next steps goes into the alert email and the incident log.
- Fix pull requests. If the fix looks small and safe, Jarvis proposes it as a pull request.
- A weekly report. Every Monday, per site: a Google PageSpeed audit, a security-headers check, a Playwright smoke test in a real browser, and a visual comparison against last week’s screenshot to catch layouts that break quietly.
- A dashboard. A small web app, installable on an iPhone home screen, with live status, incident history, past reports and a chat to talk through any incident.
The live instance runs from a private repo. The public repository is a copy with its schedules turned off.
The interactive demo is simulated, with fictional sites. When it proposes a fix, it runs the real guard-rail rules from proposeFix.js against fictional files.
Decisions
Safety rules in code
Instead of: Writing the rules into the prompt and hoping
The model can propose a fix. Whether that fix is allowed is decided by code that runs after the model has answered, so a persuasive answer can’t talk its way past the limits.
Find the file without the model first
Instead of: Asking the model to guess straight away
A failing /api/health maps to api/health.js and a short list of other likely paths. Jarvis tries those, and only asks the model to guess when none exists. A guess that isn’t a single file path is thrown away.
Fixes as find-and-replace snippets
Instead of: Full-file rewrites
The model returns an old snippet and a new one. Every unrelated line, comment and the trailing newline stay untouched. The old snippet has to appear in the file exactly once, or the fix is rejected.
Alert on a change of state
Instead of: Emailing on every failed check
Jarvis only alerts when a site goes from up to down or down to up, so a long outage means one email, not a hundred.
A confirmation page before merging
Instead of: A link that merges when it’s opened
Email scanners follow links automatically. The link in the alert email is signed, expires after 7 days and opens a confirmation page. Nothing merges until I tap “Confirm merge”.
State in JSON files in the repo
Instead of: A database
The workflow commits status.json and incidents.json back to the repository. That also keeps a full audit trail of every status change.
Hardest problem
Letting a model change code on a live site is only acceptable if the worst case is boring. So the fix layer is a row of gates, and every gate fails closed: if anything is ambiguous, no pull request is opened and the reason is recorded.
Is fixing set up for this site?
A token scoped only to the monitored sites’ repos. It can’t modify Jarvis itself.
Not configured. Explain the outage. No fix attempted.
Find the one file
Deterministic paths from the failing URL first; the model’s guess only if none match.
No single file. No pull request.
Ask for a snippet
One old snippet, one new snippet, in a fixed format.
No confident fix, or wrong format. No pull request.
Match exactly once
The old snippet must appear in the file once and only once.
Missing or repeated. Fix rejected.
Count the changed lines
Fifteen changed lines or fewer.
Over the limit. Flagged for manual review.
Open a pull request
On a new branch. Never a push to main.
A person confirms the merge
From the dashboard, or the signed link’s confirmation page.
The last two automated gates are a few lines each:
const occurrences = originalContent.split(oldStr).length - 1;
if (occurrences !== 1) {
return { attempted: false, reason: 'fix rejected: snippet not uniquely found' };
}
const proposedContent = originalContent.replace(oldStr, newStr);
if (proposedContent === originalContent) {
return { attempted: false, reason: 'Proposed content was identical to the original — nothing to fix.' };
}
// Step 4: the hard safety gate. Refuse anything too large, no exceptions.
const changedLines = countChangedLines(originalContent, proposedContent);
if (changedLines > MAX_CHANGED_LINES) {
return {
attempted: false,
reason: `Proposed fix changes ~${changedLines} lines — over the ${MAX_CHANGED_LINES}-line auto-fix limit. Flagged for manual review instead of opening a PR.`,
};
}site-monitor/scripts/proposeFix.jsResults
- Jarvis checks every site every 15 minutes and sends a health report every Monday.
- Five guard rails sit between the model and a pull request, and a person confirms every merge.
To test it end to end, on 11 and 12 September 2026 I broke a sandbox site, Halide, on purpose, twice:
- A deleted health file. The health check returned 404.
- A missing
awaitthat crashed the health check. It returned 500.
Jarvis caught each failure, explained it in plain English, and opened fix pull requests #1 and #2. Each was a one-line change in one file, and I merged both after review.


Reflection
I built it to run for free on Groq. That kept costs at zero, but the explanations and fixes are limited by the model. I’d now spend a little on a stronger one.