4.6 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: foundation, identity, current-session, password lifecycle, plus remaining 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)
Current Focus
ADR-003's Go modular-monolith backend is implemented and merged into main under backend/: cmd/zhinian-api plus 18 internal/ packages (154 Go files), 24 language-neutral contract fixtures under contracts/, and lifecycle-fencing migration 0002_generation_lifecycle_fencing.sql. The deployed production architecture remains the Next.js full-stack Web plus HTTP-polling Node Worker (ACK-001): no Go traffic cutover, Next Route Handler deletion, or manifest/Secret ownership change has happened, and no Go workload is deployed.
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: Reconciliated canonical architecture, decision, history, commitment, and positioning memory with the merged Go implementation (task
20260814-go-memory-reconcile-7f2a9c41).
In Progress
- None. All Go implementation feature tasks are merged; five feature worktrees remain
ready_for_integrationwith completed records and can be released after review.
Next Recommended Steps
- Validate the merged Go backend against a non-production RDS instance (real application role, verified-CA TLS), real OSS, provider credentials, external Webhooks, and production-like Worker recovery before any Go traffic cutover.
- Obtain the product/release decisions deferred by ADR-003: parse existing
zhinian_sessioncookies without logout versus one-time global re-login, and the public/api/v1compatibility promise. - After validation, plan the single-writer cutover: route
/api,/uploads, and/generated-resultsto Go, drain and stop the Node Worker, and only then delete Next Route Handlers and relocate RDS/provider/OSS Secrets and ACK manifests. - Release the five completed Go feature worktrees once their records and merges are confirmed.
Open Questions / Blockers
- Target RDS PostgreSQL version, connection budget, endpoint, TLS enforcement, CA bundle, database roles, and ACK network policy remain deployment inputs.
- Go Cookie compatibility (no-logout parsing versus forced re-login) still needs a product decision.
- Public
/api/v1compatibility obligations for the cutover need explicit confirmation.
Risky Areas
- Database migrations and least-privilege grants must be tested against the actual RDS instance before production cutover.
- Web pods still own runtime files; PostgreSQL does not make local uploads/generated assets safe for horizontal Web scaling.
- The current image runs as root; moving to a non-root user requires an explicit writable-path ownership design.
- The merged Go code is contract-tested but unrouted; parity gaps can only surface under real provider, OSS, RDS, and Webhook traffic.
Last Updated
2026-08-14