docs: record first-deployment model and manual schema initialization

This commit is contained in:
zn-admin committed 2026-08-14 07:46:42 +08:00
1 parent ff055c972d
commit ca019abb14
14 files changed
+124 -62

No files matched your search

+3 -3
View File
@@ -6,12 +6,12 @@
|---|---|---|---|
| Web persistence | Routes/services/stores | PostgreSQL adapter -> RDS | Parameterized SQL; related statements share one Pool client transaction. |
| Worker processing | Worker process | Internal Web Service `/api/internal/worker/tick` | Authenticated by internal token; Worker has no RDS credentials. |
| Schema rollout | ACK migration Job | RDS PostgreSQL | Versioned checksummed migrations under an advisory lock. |
| Schema rollout | Manual SQL execution by the deployment operator | RDS PostgreSQL | Versioned checksummed files under `database/migrations/`; 0001 then 0002, then application-role grants. |
| Readiness | ACK probe | Web `/api/ready` -> RDS | Verifies connection, 11 runtime tables, required privileges, and 2 functions. |
## Approved Target Flows
The Go implementation for these flows is merged into `main` under `backend/`; they become active only after the single-writer deployment cutover routes traffic to Go and drains the Node Worker:
The Go implementation for these flows is merged into `main` under `backend/`; they become active on the first production deployment, which routes `/api`, `/uploads`, and `/generated-results` to Go from day one:
| Flow | Source | Destination | Required behavior |
|---|---|---|---|
@@ -34,7 +34,7 @@ The Go implementation for these flows is merged into `main` under `backend/`; th
- Alibaba Cloud ACK resources under `deploy/ack/`.
- Internal Worker HTTP endpoint is cluster-internal and blocked from public Ingress routing.
In the approved target, the internal Worker HTTP endpoint is removed only after the Node Worker is drained and the Go WorkerLoop is verified. It remains part of the deployed implementation until that cutover.
The internal Worker HTTP endpoint remains part of the local-development implementation only; production never deploys the Node Worker and uses the embedded Go WorkerLoop from the first rollout.
## Last Updated