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
-29
View File
@@ -1,29 +0,0 @@
import { NextRequest, NextResponse } from "next/server";
import { createSubscription, listSubscriptions } from "@/lib/subscriptions-store";
import { isSiaxError, siaxErrorResponseForLegacy } from "../siax-error-mapping";
// GET /api/subscriptions — feeds list. POST — convert an order to a recurring feed.
export async function GET() {
try {
return NextResponse.json(await listSubscriptions());
} catch (err: unknown) {
// 0pt#53: durable-store failure -> documented DEPENDENCY_UNAVAILABLE/503.
if (isSiaxError(err)) return siaxErrorResponseForLegacy(err);
throw err;
}
}
export async function POST(req: NextRequest) {
const parsed = await req.json().catch(() => ({}));
const body = parsed && typeof parsed === "object" ? parsed : {};
if (!body.order_id) {
return NextResponse.json({ error: { code: "bad_request", message: "order_id krävs" } }, { status: 400 });
}
try {
const sub = await createSubscription(body.order_id, body.cadence ?? "weekly", body.webhook_url ?? null);
return NextResponse.json(sub, { status: 201 });
} catch (err: unknown) {
if (isSiaxError(err)) return siaxErrorResponseForLegacy(err);
throw err;
}
}