docs(production): standardiserad produktionsberedskap och gap-analys

Lägger docs/production-readiness.md och siax/production-gaps.json enligt SIAX Master Definition of Done. Underlag: git-, kod- och live-evidens 2026-11-11. Nivån är evidensbaserad, inte ett leveransgodkännande.
This commit is contained in:
2026-11-10 03:07:36 +01:00
parent fb072d47c7
commit a4189333af
959 changed files with 5 additions and 115771 deletions
-34
View File
@@ -1,34 +0,0 @@
import { NextResponse } from "next/server";
import { checkAllDependencies, isReady } from "@/lib/health-checks";
// GET /api/ready — readiness (BACKLOG P0-3, CD-04/OBS-04: "no /ready route
// existed at all").
//
// Unlike GET /api/health (liveness -- always 200 while the process can
// respond), this fails closed: 503 whenever a load-bearing dependency isn't
// both configured AND actually reachable. Point a load balancer / Coolify
// readiness probe at this route, not /api/health, to stop routing traffic to
// an instance whose database is down without restarting it.
//
// Load-bearing by absence: only the database (see
// `lib/health-checks.ts#isReady`) -- engine/stripe/queue are optional
// integrations 0pt is designed to run without. Load-bearing by FAILURE: all
// of them. A dependency somebody configured and that then fails a live round
// trip makes this instance not-ready, whichever one it is.
export async function GET() {
const deps = await checkAllDependencies();
const ready = isReady(deps);
return NextResponse.json(
{
ready,
service: "0pt-web",
db: deps.db.status,
queue: deps.queue.status,
engine: deps.engine.status,
stripe: deps.stripe.status,
ts: new Date().toISOString(),
},
{ status: ready ? 200 : 503 },
);
}