feat(document-workbench): wire customer upload, structuring, credits and readiness
CI (SIAX Cloud) / integration (push) Skipped
CI (SIAX Cloud) / sonar (push) Skipped
masterplan-lock / check (push) Successful in 10s
CI (SIAX Cloud) / sonar (pull_request) Skipped
Security Scan (SIAX Cloud) / security (push) Successful in 13s
masterplan-lock / check (pull_request) Successful in 7s
CI (SIAX Cloud) / security (push) Successful in 26s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 17s
CI (SIAX Cloud) / security (pull_request) Successful in 19s
CI (SIAX Cloud) / quality (push) Successful in 1m9s
CI (SIAX Cloud) / quality (pull_request) Successful in 2m26s
CI (SIAX Cloud) / integration (pull_request) Successful in 2m33s

- POST /api/0pt/documents/upload: real multipart bytes into DOC0 through the
  durable attempt journal and the existing coordinator; verified tenant/actor
  only, project authorization fail-closed.
- POST /api/0pt/documents/structure: DOC0 segments -> INF0 -> evidence-bound
  validation -> optional JSON/CSV export, with credit reserve/settle.
- Credits: balance, server-owned price book, Stripe Checkout and idempotent
  webhook reconciliation via a Stripe re-read of session + payment intent.
- /portal/dokument and /portal/krediter: SIAX-styled workspace.
- @siax/access: universal, framework-neutral OpenFGA project relationship
  primitive reusable by DOC0/N0D/other products.
- Readiness: real Redis PING probe instead of presence-only; queue is now a
  live dependency when configured.
- Dockerfile: copy every workspace manifest so --frozen-lockfile works.
- Format/build hygiene: .prettierignore, .worktrees ignored, valid manifest YAML.
This commit is contained in:
2026-11-02 14:46:10 +01:00
parent ac1ac73be8
commit b3239487b7
37 changed files with 3152 additions and 59 deletions
+5 -6
View File
@@ -52,14 +52,13 @@ describe("GET /api/health", () => {
expect(body.queue).toBe("not_configured");
});
it("reports queue as not_integrated (never a fabricated ok) when REDIS_URL is set but unused", async () => {
process.env.REDIS_URL = "redis://localhost:6379";
it("reports a configured but unreachable queue as error (never a fabricated ok)", async () => {
process.env.REDIS_URL = "redis://127.0.0.1:1";
const res = await healthGET();
const body = await res.json();
expect(body.queue).toBe("not_integrated");
// Not wiring a real check for an unused integration is not itself a
// degradation -- overall liveness stays ok.
expect(body.ok).toBe(true);
expect(body.queue).toBe("error");
// Liveness stays 200; readiness is what fails closed on a broken dependency.
expect(res.status).toBe(200);
});
it("response includes a ts timestamp", async () => {