afterbuild/ops
§ S-02/emergency-triage

Emergency triage for AI apps broken in production — one bug in 48 hours

Your Lovable, Bolt.new, or Cursor app is broken in production right now. Emergency triage AI app service: one reproducible bug, one engineer, one 48 hour bug fix, one written root-cause report. Full refund if we miss.

price
$299
turnaround
48h
guarantee
Full refund
Quick verdict

Emergency triage AI app service is a $299 fixed-fee, 48 hour bug fix for one reproducible production failure in a Lovable, Bolt.new, Cursor, Replit, v0, Base44, Windsurf, or Claude Code app. You get a clean git diff, a one-page written root-cause report, a regression test for the failing path, and prevention notes. Full refund if we miss 48 hours. Most common intakes: blank-page deploy, OAuth 500, Stripe webhook silence, Supabase RLS denials, env-var propagation misses.

§ 01/diagnostic matrix

Symptoms emergency triage resolves in 48 hours

Seven real intakes from the last quarter. Symptom column is how founders describe it at 9pm; root cause is what we find on the first trace; fix column is what lands in the repo before hour 24.

seven AI-app-broken-in-production patterns
Symptom (production right now)Root causeWhat we ship
Production deploy renders a blank white pageEnv var propagation missed — supabaseUrl undefined on the hostVercel env set, hardened client init, sentry breadcrumb for the next drop
Login 500s for every user but the founderOAuth redirect URI still localhost:3000 on Google Cloud consoleRedirect URIs updated, Supabase Site URL set, RLS policy spot-check
Stripe Checkout completes, subscription never activatesWebhook handler silently swallows the signature verification failurestripe.webhooks.constructEvent guard + event-ID dedupe + lifecycle sync
Cursor agent rewrote a component and the table stopped loadingSilent early-return drop during a broad edit — guard clause vanishedRestored guard, added integration test asserting the original render
Bolt.new preview works, Netlify deploy 404s on every routeWebContainer-injected env vars + permissive CORS not on the real hostHost env vars wired, CORS allowlist tightened, redirects.toml corrected
Supabase insert succeeds in logs, row never persistsRLS policy references a column that does not exist — silent denyRLS policy rewritten, service-role moved server-side, regression test
Password reset email never arrivesNo DKIM on sending domain — Gmail rejects before inboxDKIM/SPF/DMARC records published, bounce handler, send-queue retry
§ 02/48h schedule

48 hour bug fix schedule, hour by hour

The clock starts when you pay. Intake inside two business hours, reproduction before any patch, and a written report before handoff. No unrelated refactors — the discipline is how we keep the promise.

  1. H0Hour 0

    Intake + scope lock

    One-paragraph bug report, repo read access, host access, and the failing URL. Scope confirmed and Stripe link returned inside two business hours. The 48-hour clock starts when you pay.

  2. H1Hour 1–4

    Local reproduction of the production break

    We reproduce the failure locally before writing a single patch line. One-in-ten triages reveal 'bug only happens for one user' — a data fix, not a code fix — and we call it out immediately.

  3. H4Hour 4–20

    Root-cause trace + smallest-patch diff

    We trace the data path backwards from the symptom: failing render, failing fetch, failing webhook, failing query, failing env var. Most fixes land in three to ten lines. The discipline is not writing the patch — it is resisting adjacent refactors.

  4. H20Hour 20–40

    Regression test + CI verification

    Integration test added that reproduces the original failure and now passes. If the project has no test infrastructure, we add a single test for the path we just fixed — included in the $299.

  5. H40Hour 40–48

    Root-cause report + merge-ready PR

    One-page written report: what broke, why, what the patch changes, and one prevention recommendation. Delivered as a clean git diff or an open PR — you decide who merges.

§ 03/before + after patch

Before and after a typical 48 hour bug fix

Real triage pattern: a Lovable-generated Supabase client that exposes the service-role key to the browser and queries orders with no auth check. The after-patch moves the client server-side, uses the anon key, and lets RLS enforce user_id = auth.uid() instead of trusting a userId argument. Three-line root cause, ten-line patch, one regression test — that is the triage shape.

✕ before · ai-shipped
lib/supabase.ts (ai-shipped)
typescript
01// AI-shipped Supabase client — runs on the server AND the browser02// RLS disabled on this table; anon key used for everything03import { createClient } from "@supabase/supabase-js";04 05export const supabase = createClient(06  process.env.NEXT_PUBLIC_SUPABASE_URL!,07  process.env.NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY!, // leaked to browser08);09 10export async function getOrders(userId: string) {11  // no RLS, no auth check — any user can pass any userId12  const { data } = await supabase.from("orders").select("*").eq("user_id", userId);13  return data;14}
Lovable-generated client: service-role key in NEXT_PUBLIC_* + no RLS.
✓ after · afterbuild
lib/supabase/server.ts
typescript
01// app/lib/supabase/server.ts — server-only client with RLS + user context02import { createServerClient } from "@supabase/ssr";03import { cookies } from "next/headers";04 05export async function supabaseServer() {06  const cookieStore = await cookies();07  return createServerClient(08    process.env.NEXT_PUBLIC_SUPABASE_URL!,09    process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!, // anon key, RLS on10    { cookies: { getAll: () => cookieStore.getAll() } },11  );12}13 14export async function getOrders() {15  const supabase = await supabaseServer();16  // RLS enforces user_id = auth.uid(); no userId argument, no spoofing17  const { data } = await supabase.from("orders").select("*");18  return data;19}
Server-only client with anon key + RLS-enforced auth.uid() on every query.
§ 04/deliverable ledger

Eight deliverables every emergency triage ships

§ 05/scope + price

One bug, one price, one 48 hour bug fix clock

The economics work because we have rescued the same six failure modes hundreds of times across Lovable, Bolt.new, Cursor, Replit, v0, Base44, Windsurf, and Claude Code apps. When you describe the symptom on the intake form, we usually have a one-line hypothesis before we open the repository.

Emergency triage is not a code review, a security audit, or a refactor. It is one bug, one patch, one test, one report. Every minute spent on adjacent improvements is a minute not spent confirming the patch is safe. The fastest way to break the 48-hour promise is to refactor something the founder did not ask us to touch — so we do not. Full refund if we miss.

featured
price
$299
turnaround
48h from payment
scope
One reproducible bug, end-to-end. Diff + report + regression test.
guarantee
Full refund if we miss 48 hours
Start emergency triage
§ 06/vs upwork vs in-house

Emergency triage vs Upwork vs in-house rescue

A $299 fixed fee against a $1,500 Upwork bid or a day of in-house engineering lost to a single production fire.

vs alternatives
DimensionUpwork devIn-house fixEmergency triage AI app
Price for one production bug$800–$2,000Blocks 1–2 engineers for a day$299 fixed
Delivery time3–7 days (plus bidding)Whenever the sprint allows48 hours, guaranteed
Root-cause reportRarelyVerbal, in standupWritten one-pager included
Regression test for the bugIf askedIf timeDefault — added in the $299
AI-builder context (Lovable/Bolt/Cursor)UnknownNot their specialtyAll 9 tools covered
Refund on missNoN/AFull refund if 48h missed

Pick emergency triage if…

  • One specific thing is broken in production right now and you have a reliable reproduction.
  • Your AI app broken in production renders a blank page, 500s on login, or silently fails a Stripe webhook.
  • You need a fixed price and a written root-cause report — not an open-ended hourly bill.
  • A Cursor or Claude Code agent regressed a working feature and you need the guard clause restored.
  • You want a regression test added so the same bug does not come back the next time the AI touches the file.

Don't pick emergency triage if…

  • Three unrelated things are broken at once — that is Break-the-Fix-Loop ($3,999), not a triage.
  • You want a broader security audit — that is a Security Audit ($499), not a single-bug fix.
  • You want the entire codebase cleaned up — that is AI-Generated Code Cleanup ($3,999).
  • You need a full integration built from scratch — that is Integration Fix ($799) or Finish My MVP ($7,499).
  • You are not sure whether the app is worth rescuing — start with the free Rescue Diagnostic first.
§ 07/specialists

Debugging engineers who run the 48 hour bug fix

Triage is usually the right specialist plus the right two-hour trace. Pick the expert whose failure mode matches your bug.

FAQ
What exactly counts as one emergency triage bug?
One reproducible failure mode — a login that 500s for every real user, a Stripe webhook that does not fire, a deploy that renders a blank page, an env var that never propagated. If the same root cause produces three visible symptoms, that is still one bug. If three unrelated things are broken, that is three triages — or upgrade to Break-the-Fix-Loop at $3,999. The intake form asks for one symptom plus the repro steps; we confirm scope before you pay.
What happens if the 48 hour bug fix runs long?
Full refund, no argument. Our 48-hour promise is real because we only accept the engagement when we are 90 percent confident we can hit it on the intake call. In the rare miss, we refund the $299 and hand over diagnostic notes, reproduction steps, and the failing-test we wrote so the next engineer starts 4 hours ahead instead of from zero.
Does emergency triage work if my AI app broken in production runs on Lovable or Bolt?
Yes. We run emergency triage against Lovable, Bolt.new, Replit, Cursor, v0, Base44, Windsurf, Claude Code, and hand-written TypeScript or Python. The five or six failure modes that surface in AI-built apps — env var propagation, Supabase RLS, OAuth redirect URIs, Stripe webhook signatures, Cursor-agent regressions — are the same across builders. We usually have a one-line hypothesis before we open the repo.
Will you break something else while fixing my bug?
No. Emergency triage ships the smallest patch that fixes the reported symptom, runs existing tests, and performs a manual smoke test on adjacent flows. If the codebase has no tests, we add a regression test for the bug we just fixed — included in the $299. The rule for the engagement is: do not touch code we were not asked to touch, even when the urge is strong. That discipline is how we keep the 48-hour promise.
Do you do 2am production-down emergency triage on weekends?
The 48-hour clock runs continuously, including weekends. Book Friday afternoon, delivered by Sunday afternoon. For genuine 2am production-down incidents, email first — we do not guarantee same-hour response but we try to be at the keyboard inside 2 hours and we will quote a surcharge for after-midnight start if it is warranted.
Should I book emergency triage or the free rescue diagnostic?
If you know exactly what broke and have a reproduction, skip straight to emergency triage — faster and cheaper than a diagnostic for a known bug. If you are unsure whether the app is worth saving at all, start with the free Rescue Diagnostic — it returns a written rescue-vs-rewrite recommendation in 24 to 48 hours and you can upgrade to triage on the same call.
§ 08/related fixes

Emergency Triage is our entry-level fixed-fee scope. Bigger problem than one bug? See all pricing tiers for Rescue, Integration Fix, Break-the-Fix-Loop, and Retainer Support.

Next step

One bug. 48 hours. $299 — full refund if we miss.

Send the reproduction and the repo URL. We'll confirm scope inside 2 business hours, reproduce locally, trace to root cause, ship the smallest patch, add a regression test, and hand back a written root-cause report.

Book free diagnostic →