5.2 KiB
Current State
This file is the integrated default-branch snapshot. Feature tasks record progress in 30-worklog/tasks/{task_id}.md and propose canonical changes for the Integration Gate. Feature tasks must not rewrite this file; it changes only in integration mode.
Integrated Through
c44274f(rebased integration of84d84ba, task20260812-rds-postgres-adapter-7f2c1a)79d29bb(cross-platform ACK manifest validation fix)4485899(task-scoped Next.js frontend plus Go backend target design and explicit not-implemented progress record)064e155(canonical ADR-003, architecture, current-state, history, and commitment promotion)b8db39d(merge ofaef5a97— completed Go backend modules; tasks20260812-go-migration-foundation-b74c9e21,20260813-go-identity-vertical-c4e91a72,20260813-go-auth-me-http-8d6f3a21,20260813-go-auth-lifecycle-3f9a6c12,20260813-go-remaining-modules-7d3a9e42)d0fb346(merge ofc1cbd78— Go backend implementation, contract fixtures, migration 0002, and task-scoped records intomain; tasks20260813-go-remaining-modules-7d3a9e42and20260814-go-remaining-integration-5e7c9a1b)f10cdd9(record of completed task20260812-architecture-task-breakdown-a83f61c2)ff055c9(config-driven super-admin bootstrap in the Go backend, task20260814-go-bootstrap-admin-6e2b7d9c)4a8f2d5(Go workload deployment artifacts and split Ingress routing, task20260814-go-deploy-artifacts-2a5f8e1d)
Current Focus
ADR-003's Go modular-monolith backend is implemented and merged into main under backend/ (cmd/zhinian-api, 18 internal/ packages, 24 contract fixtures, migration 0002). There is no production instance of this application yet: the first production deployment will run the ADR-003 split topology directly — Next.js serves pages/static/SSR, Go owns /api, /uploads, and /generated-results — so there is no legacy cutover, no Node Worker drain, and no legacy production session compatibility to preserve. Next.js route handlers remain in the repository for local development only. The production schema is initialized by manually executing the versioned SQL files; the ACK migration Job is not part of the deployment path.
Recently Completed
- 2026-08-12: Replaced the Supabase/PostgREST runtime path with a server-only
pgadapter across data, account, and billing stores. - 2026-08-12: Added versioned PostgreSQL migrations, strict backend selection, verified-CA TLS, database readiness, and ACK Web/Worker/migration manifests.
- 2026-08-12: Accepted and documented the Next.js frontend plus Go backend target, migration contracts, and acceptance criteria.
- 2026-08-14: Implemented and merged the Go backend (foundation, identity, administration, assets, billing, usage, jobs/providers/webhooks/worker loop, public and compatibility HTTP surfaces) with language-neutral contract fixtures and migration 0002.
- 2026-08-14: Reconciled canonical architecture, decision, history, commitment, and positioning memory with the merged Go implementation (task
20260814-go-memory-reconcile-7f2a9c41). - 2026-08-14: Added config-driven first-super-administrator bootstrap to the Go backend (task
20260814-go-bootstrap-admin-6e2b7d9c). - 2026-08-14: Recorded the first-deployment model: no production cutover, manual schema initialization without the migration Job pod (task
20260814-deploy-model-reconcile-9b4c2e7f). - 2026-08-14: Built the Go workload deployment artifacts:
backend/Dockerfile,deploy/ack/go-api.yaml, split-path Ingress routing, non-root/read-only-filesystem workload config, and updated manifest assertions (task20260814-go-deploy-artifacts-2a5f8e1d).
In Progress
- None.
Next Recommended Steps
- Build and push the
zhinian-go-apiimage frombackend/Dockerfile, then validate all manifests withkubectl apply --dry-run=serveron the target ACK cluster. - Initialize the production schema by manually executing
database/migrations/0001_initial_schema.sqlthen0002_generation_lifecycle_fencing.sqlas the migration role, then apply the application-role grants (tables plus the two concurrency functions). - Configure
ZHINIAN_BOOTSTRAP_ADMIN_*on the first Go startup; the process creates the first super administrator exactly once. - Validate against non-production RDS (real application role, verified-CA TLS), real OSS, provider credentials, and external Webhooks before the first production rollout.
- Confirm the public
/api/v1compatibility promise for external consumers.
Open Questions / Blockers
- Target RDS PostgreSQL version, connection budget, endpoint, TLS enforcement, CA bundle, database roles, and ACK network policy remain deployment inputs.
- Real OSS bucket/credential configuration is still needed for shared asset storage.
- Public
/api/v1support promises for external consumers need explicit confirmation.
Risky Areas
- Database grants and least-privilege roles must be tested against the actual RDS instance before the first rollout.
- The current image runs as root; moving to a non-root user requires an explicit writable-path ownership design.
- The Go code is contract-tested but has never run against real provider, OSS, RDS, and Webhook traffic; parity gaps can only surface under real dependencies.
Last Updated
2026-08-14