feat(persistence): admit durable cellular environment profile
Foundation / checks (ecs) (push) Successful in 2m24s
Foundation / checks (deploy) (push) Successful in 4m51s
Foundation / checks (network) (push) Successful in 20m42s
Foundation / checks (client) (push) Successful in 21m53s
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 40m19s
Foundation / checks (postgres) (push) Canceled after 40m9s
Foundation / checks (tsan) (push) Canceled after 37m53s

ADR-0174 and schema 56 add checkpoint profile 6, which stores the joint
cell/environment envelope nesting population envelope 2 (bundles 10 and
11). Entry from a committed population head is explicit, one-way and
no-tick, with the source commit, manifest and payload digests bound in
immutable evidence. Joint intervals use schema 45's owned admission and
settlement; conversions cannot overtake a pending interval. The fenced
publisher validates the joint trace structurally, including the complete
nested population batch, and records per-commit imported and radiated
totals. Recovery replays the head's link and requires the payload
exactly, refusing a forged but structurally valid trace. A trigger
refuses profile-6 commits from every other publisher; profile 4/5 bytes,
parsers and rules are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-19 17:16:50 -04:00
co-authored by Claude Opus 5.5
parent fc6d26d7d6
commit 51991ac7ff
25 changed files with 1599 additions and 63 deletions
+9 -3
View File
@@ -17,9 +17,15 @@ the unchanged population batch plus each tick's recorded import and radiated hea
Recorded unattended intervals equal the same live joint ticks; replay re-derives
every flow and refuses forged flows, boundaries and cuts.
Both full Release suites pass **94/94**; see [Validation](engineering/VALIDATION.md).
Producers (ADR-0136 step C), durable admission (12.5c), worker/census/migration
integration (12.5d) and target-host qualification (12.5e) remain open.
[ADR-0174](adr/0174-durable-cellular-environment-profile.md)/schema 56 makes the
joint owner durable as checkpoint profile 6: an explicit one-way, no-tick entry from
a population head, fenced joint publication with owned intervals and per-commit SQL
totals of imported and radiated stock, and recovery that replays the head's link
exactly. A forged but structurally valid trace is refused on recovery.
See [Validation](engineering/VALIDATION.md). Producers (ADR-0136 step C),
executable/network joint fault drills, worker/census/migration integration (12.5d)
and target-host qualification (12.5e) remain open.
## Portable retained-plan exact populations - 2026-10-19
@@ -0,0 +1,57 @@
# ADR-0174: Durable cellular environment profile
## Status and scope
Accepted M12.5c durable admission, 2026-10-19. Extends ADR-0142/0143 (population
profile and owned intervals), ADR-0172 (joint owner) and ADR-0173 (joint batch).
Schema 56. No automatic selection, worker scheduling, census/migration support,
default/DEV opening, live upgrade or World0 operation.
## Decision
**Checkpoint profile 6** (`cellular_environment_v1`, history profile 6) stores the
complete joint envelope `AEVOCEN1`. It nests population envelope 2 only (owner 7 with
rules 8 or 9: cellular bundles 10 and 11). Bundle 12 retained-plan populations stay
outside until their own durable population admission exists.
**Entry is explicit, no-tick and one-way.** `migrate_population_to_environment` takes
a committed profile-5 head under the current lease, restores its population, wraps
it with the declared environment and requires the nested population bytes to equal
the source exactly. SQL binds the source commit, manifest digest and payload digest
in `environment_profile_transitions`; the bundle, frame, tick quantum and tick are
unchanged and a pending player mutation or interval blocks it. There is no reverse
transition: unwrapping would discard environment state that has no other owner.
Re-entering profile 5 needs a separately versioned decision.
**Publication** of a joint interval or whole-group conversion replays the batch from
the committed predecessor before upload and requires the candidate bytes exactly.
`publish_environment_checkpoint` validates the joint trace structurally, including
the complete nested population batch contract bound to the same identity,
predecessor and ticks, and records per-commit totals of imported energy/C/N/P/other
and radiated heat. Intervals require schema 45's owned admission: admission now
accepts profiles 5 and 6 and the same pending pointer and settlement journal apply.
A conversion cannot overtake a pending interval. Exact retries return the original
receipt; a reused identity with other bytes conflicts.
**Recovery** loads the head, its immutable evidence and its predecessor, then either
verifies the transition's byte-identical nesting or replays the joint trace and
requires the stored payload exactly. SQL flow totals are audit evidence only; a
structurally valid but forged trace that reaches the database through the low-level
publisher is refused on recovery, not trusted.
Every profile-6 commit requires its evidence: a trigger refuses the generic, raw and
population publishers. History/census/migration readers refuse profile 6 explicitly
until 12.5d integrates them; the region host does not select it.
## Consequences and qualification
Joint ownership now survives process and worker replacement with exact replay,
retries and fenced authority, without changing any profile-4/5 byte or rule. The
nested ledger's flows remain complete; recorded environmental totals separate them
from migration flows for audit. Required evidence: durable bundle 9 -> 10 -> 11,
profile 4 -> 5 -> 6, transition retry/conflict/resolution, unadmitted interval
refusal, owned interval with matching SQL totals, conversion blocked by a pending
interval, settled conversion, cohort interval, bypass-publisher refusal, forged-flow
recovery refusal, the upgrade chain and legacy history-domain reconstruction.
Executable/network fault drills, census and migration integration, producers and
target-host qualification remain open.
+2
View File
@@ -1,5 +1,7 @@
# Architecture decision records
- [ADR-0174: Durable cellular environment profile](0174-durable-cellular-environment-profile.md) - schema 56 checkpoint profile 6 nesting population envelope 2; explicit one-way 5 -> 6 entry, fenced joint publication with owned intervals and SQL flow totals, exact replayed recovery.
- [ADR-0173: Cellular environment joint batch](0173-cellular-environment-batch.md) - portable `AEVOEBT1` wraps the unchanged population batch with per-tick recorded environmental flows; unattended recording runs the controller after each exchange and replay re-derives every flow exactly.
- [ADR-0172: Cellular environment ownership](0172-cellular-environment-ownership.md) - one owner per patch of space for cells and their local environment; reserves stay individual; open planet boundary with recorded imports/exports; portable envelope `AEVOCEN1` with finite infall entitlements and radiative heat export.
+1 -1
View File
@@ -12,7 +12,7 @@ Commit and push each validated scoped segment separately.
| 12.2 | Exact local model selected and paired qualification implemented (12.2d); production cost gate open | ADR-0139, exact canonical equality across 196,608 paired ticks per platform. Regional approximation disabled; no compression claim. Deployment-host capacity and fuller interaction coverage remain open. |
| 12.3 | Exact population profile/trace/store and opt-in host integration implemented (12.3b) | ADR-0142, schema 44; exact publication/recovery, mutation race guards, ambiguous replies and process kills. Executable/network population fault drills and target-host qualification remain open. |
| 12.4 | Owned intervals and durable paired migration/fault qualification implemented in scoped segments through 12.4l | ADR-0143–0149/schema 49; bounded admitted work, source freeze, staged ghost, atomic pair and exact recovery, local TLS and storage faults. Multi-host/orchestrator, linked ecology and integrated stock audits remain open. |
| 12.5 | Ownership accepted; portable joint owner implemented (12.5a-b) | ADR-0172: one owner per patch, tagged water/dissolved compartments, finite infall entitlements and radiative export with exact raw/cohort, refusal and restart evidence. Producers (ADR-0136 step C), durable profile, worker integration and target-host qualification remain open. |
| 12.5 | Ownership accepted; portable joint owner, joint batch and durable profile 6 implemented (12.5a-c) | ADR-0172-0174/schema 56: one owner per patch, tagged water/dissolved compartments, finite infall entitlements and radiative export, exact unattended replay, owned durable intervals and recovery. Producers (ADR-0136 step C), worker/census/migration integration and target-host qualification remain open. |
| 12.6 | Regional queries, replayed history, scoped multi-region queries and consistent database head snapshots implemented (12.6a-d) | ADR-0150–0153; short read-only snapshot capture prevents atomic pairs from straddling declared head sets, with exact immutable replay. Durable world/branch coverage, outside transfer/viability reconciliation, target-host query/index costs and client path remain required. |
| 12.7 | Evidence policy, registered coverage, history domains and verified pending handoff evidence implemented (12.7a-c) | ADR-0154–0156/schema 52 captures namespace/registry/heads/pending handoffs together, with exact capsule/ghost replay and supported restore forks. Cross-domain clone provenance, other viable-store coverage and durable accepted global reconciliation/freshness remain required. |
| 12.8 | Bounded unscripted generation evidence; actual-days gate not qualified | ADR-0162 measures four real wildlife generations with exact raw/cohort recovery, predation and twins. Actual multi-day integrated ecology/restart/clone evidence remains required. |
+1 -1
View File
@@ -66,7 +66,7 @@ or authorize production enablement.
| 12.2 | Exact cellular model and paired matrix; local samples through 256 lives; bounded four-generation rules-9 predation/twin matrix | Deployment-host tail costs including publication; larger wildlife cohorts and fuller contention coverage; useful compression remains unimplemented. |
| 12.3 | Dedicated population profile/trace/store/owning host; exact recovery and private PostgreSQL fault tests | Population-specific executable/network fault drills and target-host publication/capacity qualification. |
| 12.4 | Owned intervals; exact transfer/accounting; durable atomic pair/recovery; independent loopback TLS path loss and owner expiry/replacement/heal; local object sync/read-failure matrix | Multi-host/kernel-network, storage-host and orchestrator drills, linked-boundary contracts and integrated ownership/stock audits at scale. |
| 12.5 | ADR-0172 portable joint owner: one budget for cells and local environment, effective depth, tagged water/dissolved compartments, refused atmosphere, finite infall entitlements, radiative export; closed/source-off/open/exhaustion and raw/cohort comparisons; ADR-0173 joint batch with exact unattended replay | Producer process and coefficients (ADR-0136 step C), durable profile/trace/recovery (12.5c), worker/census/migration integration and escrowed cross-worker sources (12.5d), target-host qualification (12.5e). |
| 12.5 | ADR-0172 portable joint owner: one budget for cells and local environment, effective depth, tagged water/dissolved compartments, refused atmosphere, finite infall entitlements, radiative export; closed/source-off/open/exhaustion and raw/cohort comparisons; ADR-0173 joint batch with exact unattended replay; ADR-0174/schema 56 durable profile 6 with owned intervals and exact recovery | Producer process and coefficients (ADR-0136 step C), executable/network joint fault drills, worker/census/migration integration and escrowed cross-worker sources (12.5d), target-host qualification (12.5e). |
| 12.6 | Retained archive, regional census/lineage queries, replayed history, scoped multi-region queries and consistent database head snapshots (12.6a-d); registered coverage/history domains follow in 12.7a-b | Cross-domain clone provenance, retained historical coverage/other viable stores, target-host query/index qualification and client permission/presentation; no account power or invented precise statistical ancestry. |
| 12.7 | Viability/unknown policy; consistent cuts, registered coverage, history domains/restore forks and verified pending handoff evidence (12.7a-c/schema 52) | Cross-domain clone provenance, other viable-store coverage and durable accepted global evidence records/freshness. Missing/stale/unsupported owners must prevent terminal extinction. |
| 12.8 | Deterministic seed/regime drivers, separate-process exact continuation and bounded unscripted generations | Reproducible integrated worlds running for actual days, real restarts/clone comparisons and retained accounting/diversity/cost audits. Accelerated tests cannot supply elapsed days. |
+45
View File
@@ -1,5 +1,50 @@
# Validation report
## 2026-10-19 - Durable cellular environment profile (M12.5c)
[ADR-0174](../adr/0174-durable-cellular-environment-profile.md)/schema 56 adds
checkpoint profile 6. The manifest parser normalizes only profile, history, payload
cap and nested trace length before reusing the population validator; joint traces
are checked structurally, including the complete nested population batch. Schema
45's interval admission now accepts profiles 5 and 6. Four runtime functions join
the fenced allowlist. Profile-4/5 bytes, parsers and rules are unchanged.
Executed locally:
- GCC 14.2 private PostgreSQL qualification `--full` passes in **622 s**: the C++
suite, migration partitions, life reservations, backup, DR, upgrade, migration
history (through schema 56), permission audit and checksum drift. The first two runs
failed only in the region migration test, whose hard-coded digests and expected
history still ended at schema 55; both are updated.
- Joint-only PostgreSQL suite (`--environment-only`) passes in a fresh disposable
cluster: a funded rules-8 region with real wildlife and fully suspended players is
upgraded durably to bundle 10 and 11, enters profile 5 and then profile 6 (head 108,
tick 6,379; 38,700,000 pJ imported, 2,312 pJ radiated at the end).
- GCC 14.2 Release full CTest **95/95, 4.87 s** and MSVC 19.44 Release full CTest
**95/95, 6.43 s**, with NDEBUG.
- Portable `environment-checkpoint-contract`: transition/successor/conversion
manifests, round trip, payload restore, and refusals of raw or envelope-1 sources,
re-entry, another frame's lease, traceless or 65-tick successors, a population head
publishing a joint successor, history 5, bundle 12, genesis, another tick, a bare
population and a rules mismatch.
- clang-tidy 19 (warnings as errors, with libpq headers) and clang-format 19 on the
new and changed persistence sources and tests.
Evidence in the PostgreSQL suite: exact transition retry returns the original
receipt, a reused identity with other bytes is refused with EVL07 and resolution
reports committed; recovery reproduces the nested population byte for byte with no
crossing. An interval without its owned admission is refused with EVL18; after
admission the published interval's SQL totals equal the trace's imported energy,
carbon and radiated heat, exact retry returns the same head and recovery equals the
recorded candidate. The population publisher refuses joint evidence. A conversion
cannot overtake a pending interval (EVL18); after settlement it publishes and a
cohort interval follows, each recovered exactly. A trace with one radiated picojoule
forged commits through the low-level SQL publisher, which does not replay biology,
and recovery refuses that head with `tail`.
No executable/network fault drill, census or migration support, worker scheduling,
target-host cost, default opening, live upgrade or World0 operation.
## 2026-10-19 - Cellular environment joint batch (M12.5b)
[ADR-0173](../adr/0173-cellular-environment-batch.md) adds joint batch