M12.4: atomically publish and recover biological migration pairs
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m21s
Foundation / checks (network) (push) Successful in 20m51s
Foundation / checks (client) (push) Successful in 22m2s
Foundation / checks (tsan) (push) Successful in 22m59s
Foundation / checks (postgres) (push) Successful in 53m40s
Foundation / checks (checks) (push) Successful in 1h7m19s
Foundation / postgres-tools (push) Successful in 29s
Foundation / server-image (push) Successful in 38s
Foundation / image (push) Successful in 4m31s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m21s
Foundation / checks (network) (push) Successful in 20m51s
Foundation / checks (client) (push) Successful in 22m2s
Foundation / checks (tsan) (push) Successful in 22m59s
Foundation / checks (postgres) (push) Successful in 53m40s
Foundation / checks (checks) (push) Successful in 1h7m19s
Foundation / postgres-tools (push) Successful in 29s
Foundation / server-image (push) Successful in 38s
Foundation / image (push) Successful in 4m31s
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
# ADR-0149: Atomic paired biological migration publication
|
||||
|
||||
## Status
|
||||
|
||||
Accepted and locally qualified for scoped M12.4j implementation, 2026-10-18.
|
||||
Executed evidence and limits are in [VALIDATION](../engineering/VALIDATION.md).
|
||||
No automatic routing, ecological boundary or deployment is
|
||||
selected.
|
||||
|
||||
## Decision
|
||||
|
||||
Publish ADR-0144's two exact candidates in one PostgreSQL transaction after
|
||||
ADR-0147 preparation and ADR-0148 destination staging. Lock endpoint lease rows
|
||||
in increasing region order, require both current authorities and unchanged
|
||||
captured heads, and bind the destination payload to the immutable staged ghost.
|
||||
The immutable shared receipt names the preparation and both result commits.
|
||||
Both result manifests preserve their profiles, bundle 10, history, quantum and
|
||||
completed tick while advancing each commit sequence exactly once. They use no
|
||||
ordinary biological batch or invented birth/death event.
|
||||
|
||||
Restore both verified predecessor capsules, replay the exact trace and upload/
|
||||
read back both complete results before publication. Clear both pending pointers,
|
||||
insert the common receipt, insert both commits and update both heads in the same
|
||||
transaction. Any failure rolls everything back, including a failure at the second
|
||||
commit. Deferred receipt foreign keys allow evidence guards to recognize this
|
||||
dedicated publisher without disabling triggers or permitting generic bypasses.
|
||||
|
||||
Before this commit the source owns all outgoing stock and the ghost owns none.
|
||||
After it only the destination owns the transferred organisms/material. Current
|
||||
regional budgets and explicit cumulative boundary flows retain their meanings.
|
||||
Keep both predecessor histories/capsules, stage and receipt. No stock account is
|
||||
created for the receipt, and no terminal extinction inference follows from it.
|
||||
|
||||
Explicit source abort and paired publication serialize on the source lease row.
|
||||
Abort wins only before commit; a committed request can never be aborted. If abort
|
||||
wins, commit is refused. Exact committed retries compare both complete manifests
|
||||
and return the original pair under current endpoint authority, including newer
|
||||
epochs; changed bytes conflict. Unknown replies retain that exact prepared pair.
|
||||
Lease replacement never changes its bytes or fabricates a second transfer.
|
||||
|
||||
Recovery loads the shared receipt under current local authority, verifies both
|
||||
predecessor/result manifests and their links, replays both candidates from local
|
||||
retained capsules, compares both result digests and the complete local payload,
|
||||
and requires the staged destination digest/length. Missing or false evidence
|
||||
fails closed. A paused host whose pointers disappeared reloads its actual head
|
||||
and performs this recovery before readiness; it never resumes stale source stock
|
||||
or activates a ghost based solely on pointer absence.
|
||||
|
||||
## Alternatives, risks and qualification
|
||||
|
||||
Two ordinary publications can leave half a transfer committed. Treating timeout
|
||||
as rollback can duplicate stock. Shared append-only evidence plus one fenced
|
||||
transaction gives one outcome, at the cost of temporarily requiring both owners
|
||||
and one metadata authority. This is not a general distributed transaction across
|
||||
independent databases.
|
||||
|
||||
Require both representations, complete stock/member equality, exact/conflicting
|
||||
retries, abort/commit races, stale/replacement authorities, failed second inserts,
|
||||
ambiguous replies, process loss before/after commit, missing/corrupt/false replay
|
||||
evidence, host adoption/restart and subsequent biological continuation. Linked
|
||||
geometry, independent network partitions, actual multi-day ecology and target
|
||||
host capacity remain separate gates.
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
# Architecture decision records
|
||||
|
||||
- [ADR-0148: Durable destination staging without activation](0148-durable-cellular-migration-staging.md) - schema 48 freezes the destination at its exact cut, retains a verified read-only ghost and replays it on recovery; source abort releases both pauses. Paired publication/activation remain open.
|
||||
- [ADR-0149: Atomic paired biological migration publication](0149-atomic-cellular-migration-publication.md) - schema 49 binds both current fences, heads and exact candidates in one immutable receipt/transaction; recovery replays the pair and hosts verify the changed head before readiness.
|
||||
|
||||
- [ADR-0148: Durable destination staging without activation](0148-durable-cellular-migration-staging.md) - schema 48 freezes the destination at its exact cut, retains a verified read-only ghost and replays it on recovery; source abort releases both pauses.
|
||||
|
||||
- [ADR-0147: Durable biological preparation and source freeze](0147-durable-cellular-migration-freeze.md) - schema 47 retains exact preparation/capsules and explicit abort; the source stays authoritative and paused across worker replacement. Paired activation remains open.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user