docs: reconcile canonical memory with merged Go backend
This commit is contained in:
1 parent
f10cdd9695
commit
eacb4c67de
14 files changed
+171
-57
No files matched your search
@@ -8,39 +8,46 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
|
||||
- `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 of `aef5a97` — completed Go backend modules: foundation, identity, current-session, password lifecycle, plus remaining modules; tasks `20260812-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 of `c1cbd78` — Go backend implementation, contract fixtures, migration 0002, and task-scoped records into `main`; tasks `20260813-go-remaining-modules-7d3a9e42` and `20260814-go-remaining-integration-5e7c9a1b`)
|
||||
- `f10cdd9` (record of completed task `20260812-architecture-task-breakdown-a83f61c2`)
|
||||
|
||||
## Current Focus
|
||||
|
||||
The implemented application has a production deployment path for Alibaba Cloud ACK backed by direct Alibaba Cloud RDS PostgreSQL access. Local JSON remains an explicit development/test backend. ADR-003 now records the approved future Next.js frontend plus Go modular-monolith backend, but no Go implementation has been merged.
|
||||
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 `pg` adapter 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. Implementation was explicitly deferred; interrupted code drafts were discarded.
|
||||
- 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
|
||||
|
||||
- Production environment values and the real RDS/ACK rollout are not yet validated in this repository environment.
|
||||
- The Go backend migration has not started. Current code remains Next.js full-stack plus the HTTP-polling Node Worker under ACK-001.
|
||||
- None. All Go implementation feature tasks are merged; five feature worktrees remain `ready_for_integration` with completed records and can be released after review.
|
||||
|
||||
## Next Recommended Steps
|
||||
|
||||
1. Before any Go implementation, turn the ADR-003 compatibility requirements into executable HTTP, Cookie, tenant, job, billing, storage, and Webhook contracts.
|
||||
2. For the current implementation, back up RDS; verify roles, internal networking, TLS and CA; then run the reviewed migration/Web/Worker rollout if production deployment proceeds before the Go migration.
|
||||
3. Keep the current Web at one replica until generated assets are externalized to OSS or another shared object store.
|
||||
1. 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.
|
||||
2. Obtain the product/release decisions deferred by ADR-003: parse existing `zhinian_session` cookies without logout versus one-time global re-login, and the public `/api/v1` compatibility promise.
|
||||
3. After validation, plan the single-writer cutover: route `/api`, `/uploads`, and `/generated-results` to Go, drain and stop the Node Worker, and only then delete Next Route Handlers and relocate RDS/provider/OSS Secrets and ACK manifests.
|
||||
4. 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 implementation still needs a deliberate decision on whether to parse existing `zhinian_session` cookies without logout, plus measured API/backlog data before any later Worker split.
|
||||
- Go Cookie compatibility (no-logout parsing versus forced re-login) still needs a product decision.
|
||||
- Public `/api/v1` compatibility 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-12
|
||||
2026-08-14
|
||||
@@ -6,7 +6,14 @@
|
||||
|---|---|---|---|
|
||||
| 2026-08-12 | `20260812-rds-postgres-adapter-7f2c1a` | Direct PostgreSQL/RDS persistence and ACK deployment support integrated; local JSON retained for development/tests. | Current state, architecture, data flow, module map, decisions, commitments |
|
||||
| 2026-08-12 | `20260812-go-backend-migration-6f4a92` | Accepted the Next.js frontend plus Go backend target and recorded migration/acceptance contracts; no application code implemented. | ADR-003, current state, architecture, data flow, module map |
|
||||
| 2026-08-14 | `20260812-go-migration-foundation-b74c9e21` | Go compatibility foundation (health/readiness, configuration, PostgreSQL transport, identity seams) merged into `main`. | Task record |
|
||||
| 2026-08-14 | `20260813-go-identity-vertical-c4e91a72` | Database-refreshed Go identity authorization vertical slice merged into `main`. | Task record |
|
||||
| 2026-08-14 | `20260813-go-auth-me-http-8d6f3a21` | Go current-session HTTP adapter merged into `main`. | Task record |
|
||||
| 2026-08-14 | `20260813-go-auth-lifecycle-3f9a6c12` | Go password session lifecycle vertical slice merged into `main`. | Task record |
|
||||
| 2026-08-14 | `20260813-go-remaining-modules-7d3a9e42` | Remaining Go modules (administration, assets, billing, usage, jobs/providers/webhooks/worker loop, HTTP surfaces), language-neutral contract fixtures, and migration 0002 merged into `main`. | Task record |
|
||||
| 2026-08-14 | `20260814-go-remaining-integration-5e7c9a1b` | Serialized Integration Gate merging the completed Go remaining modules into `main`. | Task record |
|
||||
| 2026-08-14 | `20260814-go-memory-reconcile-7f2a9c41` | Reconciled canonical architecture, decisions, history, commitments, positioning, domain, and success-criteria memory with the merged Go backend. | Current state, system overview, module map, data flow, decision index, ADR-003, migration proposal, commitments, positioning, business rules, glossary, success criteria |
|
||||
|
||||
## Notes
|
||||
|
||||
This is legacy integrated history. Feature tasks must not append here. Record new work in `30-worklog/tasks/{task_id}.md`; an integration workflow may render or summarize accepted history later.
|
||||
This is legacy integrated history. Feature tasks must not append here. Record new work in `30-worklog/tasks/{task_id}.md`; an integration workflow may render or summarize accepted history later. The Go migration rows were appended during the 2026-08-14 integration gate.
|
||||
@@ -0,0 +1,52 @@
|
||||
# Task: Reconcile canonical memory with merged Go backend
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260814-go-memory-reconcile-7f2a9c41
|
||||
- Mode: Integration
|
||||
- Branch: main
|
||||
- Worktree: /Users/brother7/Documents/AI/NianAIGC
|
||||
- Base commit: f10cdd9695db37b9f306b6353f0e2a7a4c9fd991
|
||||
- Owner: dsh
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Reconcile canonical `.project-docs` memory with the Go backend implementation merged into `main` by `b8db39d` and `d0fb346`.
|
||||
- Promote the pending promotion candidates of tasks `20260813-go-remaining-modules-7d3a9e42` and `20260814-go-remaining-integration-5e7c9a1b` (Go module map and contract fixtures) into canonical architecture memory.
|
||||
- Repair stale canonical documents that still described the Go migration as not started.
|
||||
- Complete task-lifecycle housekeeping: commit the untracked record of `20260812-architecture-task-breakdown-a83f61c2`, correct its Status, and release its stale ownership of `main`.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- Record factual implementation progress; do not claim a production cutover that has not happened. ACK-001 remains the deployed truth.
|
||||
- Do not reverse or weaken accepted decisions (RDS-001, RDS-002, ACK-001, ADR-003).
|
||||
- Fill template files only from facts already present in the repository (READMEs, task records, contracts, migrations); keep unknowns explicit.
|
||||
- Feature task records of the source tasks stay read-only; only my own integration record and canonical documents change.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Updated `current-state.md` with `Integrated Through` entries for `b8db39d`, `d0fb346`, and `f10cdd9`, current focus (implemented but unrouted Go backend), next steps, open questions, and risky areas.
|
||||
- Updated `system-overview.md`, `module-map.md`, and `data-flow.md` to describe the merged Go implementation while keeping the deployed Next.js/Node topology authoritative until cutover.
|
||||
- Updated `decision-index.md` (ADR-003 row), `adr-003-next-go-target.md` Status, and the migration proposal implementation/canonical-promotion lines.
|
||||
- Appended the six Go migration tasks to `task-history.md`.
|
||||
- Updated `commitments.md`: marked the pre-implementation contract commitment completed and added cutover-validation and Cookie/`/api/v1` decision commitments.
|
||||
- Filled the placeholder templates `project-positioning.md`, `business-rules.md`, `glossary.md`, `success-criteria.md`, and `stale-items.md` missing context from repository facts.
|
||||
- Committed the completed record of task `20260812-architecture-task-breakdown-a83f61c2` (Status corrected to Ready for Integration) as `f10cdd9` and released its stale ownership of the main worktree.
|
||||
|
||||
## Verification
|
||||
|
||||
- Verified merge topology: `b8db39d` (merge of `aef5a97`) and `d0fb346` (merge of `c1cbd78` into main at `7de3300`; 219 files, +32465/-23).
|
||||
- Verified repository facts used in the docs: 154 Go files under `backend/`, 18 `internal/` packages, 24 contract fixtures under `contracts/`, migrations 0001/0002.
|
||||
- `check_project_docs.py` passes; `check_doc_drift.py --task-id 20260814-go-memory-reconcile-7f2a9c41` passes.
|
||||
- No application, database, test, or deployment file was changed.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Five completed Go feature worktrees remain owned and `ready_for_integration`; release them after their records and merges are confirmed.
|
||||
- Root `README.md`/`README.zh-CN.md` tech-stack sections still describe only the Next.js stack; update when the Go backend becomes deployed.
|
||||
- Real RDS/OSS/provider/Webhook validation and the cutover plan remain open (see `commitments.md` and `current-state.md`).
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- None beyond what this integration task already applied; no canonical changes remain pending from the merged Go tasks.
|
||||
Reference in new issue
Block a user