Files
aevolution/docs/adr/0168-durable-retained-plan-admission.md
dingo c60cdf8e19
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (client) (push) Canceled after 1m11s
Foundation / checks (checks) (push) Canceled after 1m13s
Foundation / checks (postgres) (push) Canceled after 1m8s
Foundation / checks (ecs) (push) Canceled after 1m13s
Foundation / checks (network) (push) Canceled after 1m14s
Foundation / checks (deploy) (push) Canceled after 1m18s
feat(persistence): admit durable retained offspring plans
2026-10-19 15:04:30 -04:00

3.3 KiB

ADR-0168: Durable raw retained-plan admission

Status and scope

Accepted scoped persistence segment of ADR-0163/0165-0167, 2026-10-19. Raw profile 4 only. No automatic upgrade, default/DEV change, population conversion, migration/census qualification, control succession or client-choice UI.

Decision

Schema 55 admits exactly raw bundle 12 with trace 4 through the existing fenced cellular publisher. Only explicit raw bundle 11 -> 12 no-tick upgrades use the immutable cellular profile/version journal. Verify both source bindings, derive the complete owner upgrade and read back the target object before publishing. Journal evidence, result commit and head move remain one transaction under the current lease/exact head. Pending intervals/handoffs prevent new upgrades.

Retain original manifests, traces, input blocks and digests. SQL may normalize parser-local copies of the tuple/trace layout only after verifying the actual trace length/SHA-256 and exact owner/trace version pairing. Stored bytes, retry identity and authority checks always use the actual bundle-12/trace-4 evidence. Legacy helpers remain private. No new runtime privilege or provisioning path.

Mutation outcomes are derived by complete C++ replay and bound atomically to the existing allocator reservation and action block. For this editing mode only, admit result 4 (offspring plan applied), 3 (declined) or 1 (life died); reject in-life applied/funding result meanings. A decline must match operator zero; successful plan selection must match a nonzero operator. Old result domains and old trace/tuple meanings remain unchanged. Recovery loads the exact actions, replays the complete checkpoint, and compares every result and all target bytes.

Upgrade recovery verifies the immutable source/target manifests and objects, journal versions/digests and exact retained transformation using the original writer fields under current recovery authority. Missing, corrupt or biologically false evidence fails closed without an older-head fallback. Exact retries retain original bytes/receipt; changed retries conflict and stale writers remain fenced.

Bundle 12 remains raw-only. Population/census/migration adapters must refuse it, and unsupported evidence cannot become zero life or terminal extinction. A recovered raw owner may continue authoritative biology; no worker opts into the upgrade automatically. NPC behavior retention, birth-time one-way control and their presentation remain separate contracts.

Alternatives, consequences and qualification

New genesis would discard ancestry/stock history; a second upgrade journal would duplicate authority. Broadly admitting every revision bundle would mix two mutation meanings. Use the existing journal and an exact tuple/trace/result set.

Risks include parser normalization bypassing strong bindings, wrong result meanings and partial history after ambiguous publication. Require private SQL tests for the upgrade, exact recovery/continuation, earned plan selections and repeated funded births, stale/current leases, exact/conflicting retries, rollback, pending work, missing/corrupt/false objects and replacement recovery. Run the full persistence/backup/DR/upgrade and privilege/checksum matrix plus appropriate portable, analysis and sanitizer checks. This is not M12 completion or a product acceptance decision.