feat(identifiers): add reversible projection migration
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Build and Publish Multi-Context Image / build-and-push (push) Successful in 24s

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a023c0-a0a3-7c03-b395-5a0d2757214d
This commit is contained in:
tegwick 2026-08-22 00:27:48 +02:00
parent ce52e9d1e2
commit cb1b028fd1
18 changed files with 921 additions and 27 deletions

View file

@ -8,7 +8,7 @@ status: active
owner: codex
topic_slug: infotech
created: "2026-08-09"
updated: "2026-08-19"
updated: "2026-08-22"
parent_project: prj-state-hub-retirement
parent_workplan: SHR-WP-0001
related:
@ -176,6 +176,26 @@ transactional projection migration, durable old-id aliases, rollback rehearsal,
and compatibility evidence needed by RMGR-WP-0005-T04. Do not rewrite repository
UUID fields until that sub-slice passes in isolated PostgreSQL.
**Identifier projection gate implemented and rehearsed (2026-08-22):** Alembic
revision `b8d4f0a2c6e1` adds durable old→new alias provenance and converts all 20
foreign keys into `workplans.id` / `tasks.id` to `ON UPDATE CASCADE`, while
retaining their existing delete behavior. The internal executor verifies the
Repo Manager plan seal, `helixforge` namespace, UUIDv5 derivation, repository
membership, source presence, target absence, and alias consistency before a
repository-atomic apply. Reverse runs task-first/workplan-second and retains the
aliases as `reversed`; plan entries with `action: assign` are deferred to normal
file reconciliation because there is no old projection row to rewrite.
Isolated PostgreSQL evidence: migration upgrade produced 20/20 update-cascade
constraints plus the alias table; downgrade restored 20/20 no-action update
constraints and removed the table. Service tests cover cascades through task
parentage, progress, token accounting and dependency edges, forward/reverse
alias state, and all-or-nothing failure (`3 passed`). Full State Hub regression:
`622 passed`. No live database migration or repository UUID rewrite was run.
The remaining gate is an operator-approved pilot ordering the central database
transaction and authoritative file rewrite/reconciliation as one recoverable
cutover unit.
**A2a executed (2026-08-20) — first live cutover slice.** Dual-run is on for the
pilot repo: