feat: support mixed identifier convergence

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a053ff-1d6f-7fe2-ac1c-a6eb40a42a0c
This commit is contained in:
tegwick 2026-08-31 01:27:21 +02:00
parent 4901b6d623
commit 5789e8c520
5 changed files with 313 additions and 11 deletions

View file

@ -79,12 +79,28 @@ clean worktree, exactly match its configured upstream, and use a non-retired
origin. The batch records these facts and its own SHA-256 seal, but always emits
`apply_authorized: false`. An explicit decision must cite that batch hash before
any database or file mutation. Repeat `--projection-api-base` for every hub in
the cutover: each replacement must resolve its current UUID with HTTP 200 and
its derived target with HTTP 404 on every named projection, or the manifest is
not ready for approval. Saved projection endpoints are rechecked by
`migration-batch-verify`; omitting the option retains the offline source/Git-only
planning mode. A projection-aware batch containing UUID assignments fails
closed until an assignment-specific projection identity check is implemented.
the cutover. Each replacement is classified as `legacy_source`,
`derived_target`, `both_present`, or `neither_present`. The first two may coexist
inside one repository-atomic migration: State Hub migrates legacy rows, verifies
already-derived rows against their canonical record identity, and records the
same durable aliases for both. The latter two states are refused. Saved
projection endpoints are rechecked by `migration-batch-verify`; omitting the
option retains the offline source/Git-only planning mode. A projection-aware
batch containing UUID assignments fails closed until an assignment-specific
projection identity check is implemented.
After approval, apply the sealed database phase and then the atomic file phase:
```bash
rmgr identifier migration-projection --plan PLAN.json --repo REPO \
--confirm-plan-sha256 SHA256 --api-base http://127.0.0.1:8000
rmgr identifier migration-files --plan PLAN.json --repo REPO \
--confirm-plan-sha256 SHA256 --execute
```
If the file phase fails, run `migration-projection` with `--direction reverse`
before changing the sealed plan or retrying. Routine `rmgr sync` never performs
this migration implicitly.
Activation and applying a bulk migration remain separate governed steps.
Publishing or planning this function does not retroactively rewrite existing