M12.4: retain migration source freezes and explicit aborts
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m24s
Foundation / checks (network) (push) Successful in 20m44s
Foundation / checks (client) (push) Successful in 22m3s
Foundation / checks (tsan) (push) Successful in 23m1s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 24m7s
Foundation / checks (postgres) (push) Canceled after 24m3s

This commit is contained in:
dingo
2026-10-18 09:08:50 -04:00
parent 1b5c0cdf7c
commit c625a4cb68
25 changed files with 1342 additions and 18 deletions
+7
View File
@@ -57,3 +57,10 @@ terminates, restores in a fresh process, replays and compares all four complete
output snapshots. This qualifies portable continuation, not database atomicity,
source freeze, ghost staging, abort, duplicate-delivery settlement or crash-safe
activation. No schema 45 publisher admits this trace or the new owner tuple.
M12.4h/ADR-0147/schema 47 subsequently retains trace 1 as durable source-freeze
preparation evidence. Both predecessor cuts are SHA-256 bound and replayed from
the source's retained capsule; SQL also checks canonical shape and FNV. The
source still owns every cell and the destination owns no ghost. Explicit abort
releases the freeze without changing either head. This is not result-manifest
admission or a paired ownership receipt. See [the freeze contract](ecology/cellular-migration-freeze-v1.md).
@@ -0,0 +1,64 @@
# Biological migration preparation and source freeze
Authority: ADR-0147, SQL schema 47. This retains preparation and explicit abort,
not a migration result or destination activation receipt. Checkpoint profiles,
rules 8, owner 7 and population batch 2 retain their existing bytes and meanings.
One source-authorized request binds canonical
[migration trace 1](../cellular-migration-trace-v1.md), both retained predecessor
commits/manifests and their exact payloads. Both cuts use bundle 10, the same
representation, world/frame/completed tick and compatible geometry/biology.
The source lease/head is fenced; the destination head is checked optimistically
and remains free to advance. Later staging must check it again. Preparation
does not establish a simultaneous world cut or a physical route.
The adapter restores both SHA-256-verified payloads and derives the complete
biological pair before publication. It copies/verifies the destination cut into
the source's immutable object namespace as a replay capsule. This copy owns no
stock. The source keeps every organism, reserve, body, nursery/habitat compartment,
heat and historical fact at its unchanged committed head. The destination also
keeps its existing head. Proposed transferred material in the trace is metadata,
not an additional account or an applied boundary flow.
SQL retains:
- Immutable `cellular_migration_preparations`, keyed by globally unique request
UUID: source/destination region and predecessor commit references, canonical
trace (272..2,312 bytes), preparing holder and epoch.
- Immutable `cellular_migration_aborts`, keyed by request, with the deciding
current source holder/epoch.
- One operational `cellular_migration_pending` pointer per source region.
Preparation refuses an active source workflow, pending ecological interval,
unpublished player choice or outstanding successful life reservation. C++ also
requires fully suspended controlled cells and an eligible whole wildlife group.
SQL independently validates trace identity/length/member bounds, exact FNV-1a64,
both committed manifest bindings and the declared representation/tuple.
Checksum/UUID metadata alone does not qualify the biology: recovery restores both
cuts from the source namespace and rederives every recorded member/channel.
While pending, indexed trigger guards refuse new region commits, interval
admissions, mutation reservations and life reservations at that source. Historical
exact operation retries keep their old meanings. The whole region is paused;
there is no per-member advancement or passive healing. The host withholds
readiness during preparation uncertainty and a recovered freeze, renews authority,
and polls paused work at most once per second. Normal unpaused stepping adds no
per-tick migration query. `evo_region_migration_frozen` is a fixed, unlabelled
0/1 gauge for a known durable freeze; it does not grant authority.
Explicit source-authorized abort appends its outcome and removes the pending
pointer atomically, without changing either biological head. Exact preparation
and abort retries return the recorded outcome. An aborted preparation cannot
reopen its pointer. Process death, lease expiry, drain, missing evidence and
timeout never imply abort. Missing/corrupt capsules fail closed, without falling
back to the destination's live state. A new source holder may explicitly abort;
destination authority is unnecessary because no ownership has moved.
Keep both predecessor histories and source-side capsule objects, including after
abort. The current backup copies all immutable namespace objects and the shared
database snapshot; no GC or pruning is authorized. This does not qualify cellular
history cloning/restore beyond the existing supported fixtures.
Destination ghost staging, atomic two-head publication, commit/abort races and
activation remain subsequent work. This segment adds no automatic migration,
atlas, cross-edge movement, environmental coupling or census/extinction rule.