docs: record Next and Go target architecture
This commit is contained in:
1 parent
a235266bed
commit
4485899654
2 files changed
+220
No files matched your search
@@ -0,0 +1,55 @@
|
||||
# Task: Migrate Next backend to Go and prepare main integration
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260812-go-backend-migration-6f4a92
|
||||
- Mode: Feature
|
||||
- Branch: codex/20260812-go-backend-migration-6f4a92-go-backend-migration
|
||||
- Worktree: D:\Datas\OthersProjects\NianAIGC-go-backend-6f4a92
|
||||
- Base commit: a235266bed8f1a7e19518cdd3aa5ed3e0a309b82
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Record the user-approved Next.js frontend plus Go modular-monolith target architecture.
|
||||
- Capture the current implementation status and the required migration, compatibility, deployment, and verification contracts.
|
||||
- Merge design and progress documentation into `main` through the serialized Integration Gate.
|
||||
- Do not implement or merge Go/application/deployment code in this task.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- The user initially requested a one-step complete migration, then explicitly superseded that instruction: do not implement code; merge only design documentation and progress records.
|
||||
- Preserve current `/api/**`, file-route, JSON/status, session-cookie, multi-tenant, idempotency, billing, and task-state behavior unless a source defect prevents safe preservation.
|
||||
- Production remains explicit PostgreSQL/RDS and fail-closed; keep versioned checksummed migrations and the `claim_generation_jobs` and `billing_post_wallet_entry` database functions.
|
||||
- Use one same-origin Ingress: pages route to Next.js and API/file paths route to Go. Go embeds the worker loop initially so steady state remains two long-lived Pods.
|
||||
- Do not double-write or run the old Node worker beside the Go worker in the final deployment.
|
||||
- Preserve the occupied `main` worktree and its unrelated untracked task record during documentation integration.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Completed a task-scoped architecture proposal covering target workloads, deep Modules, Interfaces and seams, PostgreSQL concurrency, authentication compatibility, storage, Secret ownership, migration sequencing, acceptance tests, and consequences.
|
||||
- Recorded that implementation has not started: current `main` remains Next.js full-stack plus the Node HTTP-polling Worker under accepted decision `ACK-001`.
|
||||
- Six implementation sub-agents were started after the earlier request, then immediately interrupted when the user changed scope. All resulting Go, Docker, Compose, and deployment drafts were removed from the isolated worktree and will not be merged.
|
||||
- No application source, SQL, Docker, ACK manifest, package, or runtime configuration change remains in the task branch.
|
||||
|
||||
## Verification
|
||||
|
||||
- Concurrent Task Gate and Planning Gate passed in isolated worktree `D:\Datas\OthersProjects\NianAIGC-go-backend-6f4a92` at base `a235266`.
|
||||
- Rechecked the current API routes, server/auth/provider modules, PostgreSQL schema/functions, ACK decisions, and peer architecture/configuration task records before writing the proposal.
|
||||
- Confirmed with `git status` and `git diff` that code drafts were removed and only task-owned project documentation remains before integration.
|
||||
- Application tests were not run because application code was not changed.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Implementation remains a future task. It should start from executable HTTP/Cookie/authorization/job/billing/storage contracts rather than from deleted drafts.
|
||||
- Live RDS TLS/roles, OSS/provider calls, Docker daemon execution, and ACK rollout remain unverified.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- Target: accepted architecture decision and canonical architecture documents.
|
||||
Proposal: supersede ACK-001 with a same-origin Next.js frontend plus Go modular-monolith backend, with Go owning RDS and the embedded worker loop.
|
||||
Evidence: user-confirmed architecture task `20260812-next-go-architecture-4d81e2` and task-scoped proposal `20260812-go-backend-migration-6f4a92__next-go-architecture.md`.
|
||||
Future impact: changes module ownership, secrets, deployment topology, health/readiness, worker lifecycle, and feature development language.
|
||||
Semantic conflicts: supersedes ACK-001; must retain RDS-001 and RDS-002.
|
||||
Human confirmation required: already received from the user; promotion still requires Integration Gate validation.
|
||||
Reference in new issue
Block a user