Files
aevolution/schemas/ecology/cellular-migration-commit-v1.md
dingo d3a867a662
Foundation / checks (ecs) (push) Successful in 2m20s
Foundation / checks (deploy) (push) Successful in 4m7s
Foundation / checks (network) (push) Successful in 21m2s
Foundation / checks (client) (push) Successful in 22m21s
Foundation / checks (tsan) (push) Successful in 28m57s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 38m8s
Foundation / checks (checks) (push) Canceled after 38m19s
feat(persistence): admit durable maturing wildlife migrations
2026-10-19 11:57:00 -04:00

4.2 KiB

Atomic paired biological migration publication

Authority: ADR-0149, schema 49. Requires retained source preparation and destination staging. Biological/checkpoint/trace formats retain their meanings.

The publisher restores both digest-verified predecessor cuts, replays the exact retained trace and uploads/reads back both complete candidates. Two same-profile bundle-10 (trace 1) or bundle-11 (trace 2) no-tick manifests each advance sequence once and bind their own predecessor commit/SHA, world/region/frame, completed tick, quantum and history. Ordinary batch evidence is zero: migration is neither a biological interval nor a profile/version conversion. Result IDs come from the retained trace; writer fields name the respective current endpoint authorities.

ADR-0161/schema 54 requires the exact retained bundle/trace pair at both predecessors/results. Rules 9 continues funded growth only on subsequent ticks; the transfer itself preserves every life field. Mixed bundles or cross-rule traces fail. Existing rules-8 evidence and all transaction guards retain meaning.

Exact retry input is request UUID plus both canonical manifests. Both CURRENT lease grants are supplied separately. SQL locks endpoint lease rows in increasing region order and checks both grants, captured heads, pending pointers, stage and its destination payload SHA/length. Unstaged, aborted, stale or incompatible requests fail. Ordinary publishers cannot publish either migration half.

One transaction inserts immutable cellular_migration_commits (preparation/stage request UUID and unique source/destination result references), clears both pending pointers, inserts both commits and updates both heads. Deferred result foreign keys allow evidence guards to remain enabled. Any failure, including the second insert, rolls back everything. This requires one shared metadata authority, without implying a cross-database protocol.

Before commit the source owns all outgoing organisms/material; its staged peer owns none. Afterwards only the destination owns them. Receipt rows, historical source observations and cumulative flows are evidence, not spendable stock or extra census entries. No birth, death or local tick is invented.

Abort and commit serialize on the source lease row. Abort before commit releases both pauses and permanently refuses publication. Commit before abort permanently refuses abort. Committed retries compare both exact manifests and return the original pair under current fences, even with newer epochs. No old bytes change and no second transfer occurs. Unknown replies retain the prepared pair and cannot infer rollback.

Recovery loads the receipt under current local authority and verifies the trace, both predecessor/result manifests, adjacent links and staged destination object reference. Local retained capsules rederive both results. Their full lengths and SHA-256 must match both manifests; complete local bytes must equal the restored payload. Missing/corrupt capsules or a valid object with false biology fail closed, without live-peer or older-head fallback. Retain all evidence; no GC.

A paused host whose pointers disappear reloads its actual head. A changed head requires full recovery before readiness or advancement, including after restart. Pointer absence alone cannot resume the old source or activate an uploaded ghost. Unknown abort that loses to commit reconciles the actual committed head.

M12.4k's loopback TCP/TLS matrix qualifies request/receipt loss and independent owner expiry/replacement/heal. M12.4l's local storage matrix checks capsule/result sync failures, paused current-payload I/O retry and sticky quarantine for unavailable counterpart replay evidence, with exact recovery. Multi-host/kernel-network failures, linked geometry/resources, world-wide cuts/census, target-host costs and actual elapsed-day ecology remain separate gates. Backup/DR regression retains its supported fixtures and does not qualify cellular history cloning or a new cellular restore procedure. No automatic migration or deployment.