feat(ecology): own cells and their local environment together
Foundation / checks (ecs) (push) Successful in 2m28s
Foundation / checks (deploy) (push) Successful in 4m59s
Foundation / checks (network) (push) Successful in 20m56s
Foundation / checks (client) (push) Successful in 22m1s
Foundation / checks (tsan) (push) Successful in 45m41s
Foundation / checks (postgres) (push) Successful in 1h13m35s
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 1h20m34s
Foundation / checks (ecs) (push) Successful in 2m28s
Foundation / checks (deploy) (push) Successful in 4m59s
Foundation / checks (network) (push) Successful in 20m56s
Foundation / checks (client) (push) Successful in 22m1s
Foundation / checks (tsan) (push) Successful in 45m41s
Foundation / checks (postgres) (push) Successful in 1h13m35s
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 1h20m34s
ADR-0172 records the maintainer's M12.5 ownership decision: one owner per patch of space for cells and their local environment, reserves belonging to the biological individual, and an open planet boundary whose every crossing is a recorded import or export. The portable CellularEnvironment owner (envelope AEVOCEN1) holds an exact population with tagged water and dissolved compartments, refuses declared atmosphere, imports infall from finite per-source entitlements (ADR-0136 step B) and radiates retained heat. Each tick's exchange is a validated swap on the nested owner, undone if the biological tick refuses. Closed and source-off regions keep their biology byte for byte; raw and cohort representations agree under infall. No existing format, trace, golden, default opening or live version changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -647,6 +647,12 @@ the later multicellular idea are not ratified game rules.
|
||||
|
||||
## M12 - Persistent ecology
|
||||
|
||||
2026-10-19: [ADR-0172](adr/0172-cellular-environment-ownership.md) accepts one
|
||||
owner per patch of space for cells and their local environment, individual
|
||||
reserves and an open planet boundary. The portable joint owner adds finite infall
|
||||
entitlements and radiative export with exact closure; producers, durable admission
|
||||
and integration remain open.
|
||||
|
||||
2026-10-19 gameplay clarification:
|
||||
[ADR-0163](adr/0163-structural-inheritance-and-offspring-succession.md) accepts
|
||||
offspring-only structural expression, permanent birth-time parent/child control
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# Project status and next steps
|
||||
|
||||
## Cellular environment ownership (M12.5a-b) - 2026-10-19
|
||||
|
||||
The maintainer accepted one owner per patch of space for cells and their local
|
||||
environment, individual reserves (colony/multicellular sharing later) and an open
|
||||
planet boundary. [ADR-0172](adr/0172-cellular-environment-ownership.md) records
|
||||
that contract and adds the portable `CellularEnvironment` owner (envelope
|
||||
`AEVOCEN1`): tagged water/dissolved compartments, refused atmosphere, finite infall
|
||||
entitlements (ADR-0136 step B) and radiative heat export, applied with each joint
|
||||
tick or not at all. Closed and source-off regions keep their biology byte for byte.
|
||||
Raw and cohort representations agree under infall. Old formats and goldens keep
|
||||
their meaning; no default/live version changes.
|
||||
|
||||
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.
|
||||
|
||||
## Portable retained-plan exact populations - 2026-10-19
|
||||
|
||||
[ADR-0171](adr/0171-retained-plan-exact-populations.md) adds envelope/batch 3 for
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
# ADR-0172: Cellular environment ownership and open-boundary contract
|
||||
|
||||
## Status and scope
|
||||
|
||||
Accepted 2026-10-19. The maintainer accepted the single-owner direction of the
|
||||
[ownership resolution](../engineering/M12_ENVIRONMENT_OWNERSHIP_RESOLUTION.md) and
|
||||
clarified its scope. This ADR is M12.5a: the contract that the portable composite
|
||||
owner (12.5b) implements. It extends ADR-0136 step B, ADR-0144 and ADR-0157/0165.
|
||||
No default/live version, durable profile, SQL schema, photosynthesis, atmosphere
|
||||
or M6 fixture change. ADR-0136 step C remains proposed design input.
|
||||
|
||||
## Maintainer clarification
|
||||
|
||||
- **One owner per patch of space, at any moment.** It is not one global owner.
|
||||
A world is many regions, each with exactly one owner of its cells *and* their
|
||||
local environment. Stock changes owner only through recorded, paired transfers
|
||||
(ADR-0147–0149 escrow). This carries forward unchanged to the multicellular 3D
|
||||
world (M13.8/M14): more and larger owners, never two ledgers for one stock.
|
||||
- **Reserves belong to the biological individual.** A single cell owns its body
|
||||
and reserve. A colony or multicellular body sharing resources internally is a
|
||||
later, separately versioned rule (ADR-0135 colonies, M14.2). Nothing here pools
|
||||
reserves between organisms or forecloses that rule.
|
||||
- **The planet is an open system.** Resources may enter or leave the region, and
|
||||
later the planet as a whole. Every crossing is an explicit, versioned process
|
||||
recorded as a cumulative import or export. Nothing is minted or deleted silently:
|
||||
`current = opening + imports − exports`, per channel. Exported stock is gone; it
|
||||
returns only as a new recorded import.
|
||||
|
||||
## Decision
|
||||
|
||||
`CellularEnvironment` (envelope `AEVOCEN1`, format 1, environment rules 1) takes
|
||||
exclusive ownership of one exact `CellularPopulation` (raw or cohort; nested owner
|
||||
7 with rules 8 or 9, or owner 8 with rules 10) and of that region's tagged
|
||||
environmental compartments. Neither the nested owner nor any copy is separately
|
||||
spendable while the composite exists. It exposes read-only views only.
|
||||
|
||||
### Geometry
|
||||
|
||||
One declared axis-aligned habitat inside one environmental voxel: voxel address,
|
||||
micrometre origin and a box whose width and height equal the cellular area and
|
||||
whose effective depth is positive (`world::measure_habitat`). Depth defines a
|
||||
sampling volume for concentration views only; it never creates or scales stock.
|
||||
Organism count and camera size never determine depth or supply.
|
||||
|
||||
### Compartment map, version 1
|
||||
|
||||
| Compartment | Owner | Edible | v1 processes |
|
||||
|---|---|---|---|
|
||||
| Organic energy, C, N, P, other in deposits, lives, corpses, nursery | nested cellular owner | yes (existing contact feeding) | existing biology; infall import |
|
||||
| Heat (energy) | nested cellular owner | no | radiative export |
|
||||
| Water | composite | no | none: conserved, audited, never converted |
|
||||
| Dissolved inorganic N, P | composite | no | none: conserved, audited, never converted |
|
||||
| Atmospheric species | unsupported | — | declaring any is refused (`unsupported`), never zero or unlimited |
|
||||
| Incident light | not stock | — | not represented until a producer process exists |
|
||||
|
||||
Cellular `other` means organic other only. `accounting::Inventory` has no water,
|
||||
dissolved or gas channel, so no generic retag can turn water into food, dissolved
|
||||
nutrients into edible matter or heat into usable energy. A conversion between
|
||||
compartments requires a separately versioned process with debit, credit, work,
|
||||
waste and residual terms. Rules 1 define none.
|
||||
|
||||
### Processes, rules 1 (all coefficients are trial values)
|
||||
|
||||
1. **Infall import (ADR-0136 step B).** At most four sources, sorted unique
|
||||
nonzero ids, with disjoint rectangles inside the habitat, a half-open active
|
||||
tick interval and a finite per-channel **entitlement**. On each advancing tick
|
||||
`t` in its interval a source fires when a SplitMix64 roll of
|
||||
`(world, region, source, t)` is divisible by its mean interval (trial 2,400
|
||||
ticks, two simulated minutes). An event drops `min..max` (trial 12–24) single-
|
||||
channel bubbles within a 500 µm disc at a seeded centre in the source rectangle,
|
||||
cycling the channels its per-bubble amount stocks. Each bubble credits
|
||||
`min(per-bubble amount, remaining entitlement)`. A zero credit, an occupied
|
||||
address or the 4,096-deposit limit skips that bubble; skips are counted, never
|
||||
deferred. Credits enter the nested boundary `incoming` and the source's
|
||||
cumulative `imported`; remaining entitlement is derived, never stored twice.
|
||||
Exhausted or inactive sources import nothing. Restart, retry and representation
|
||||
change cannot reset entitlement, because `imported` is persisted.
|
||||
2. **Radiative heat export.** Each advancing tick exports `min(heat, cap)` pJ of
|
||||
retained heat (cap per tick is configuration; zero closes the boundary). The
|
||||
amount enters the nested boundary `outgoing` and the composite's cumulative
|
||||
export. Heat is never spendable before or after export.
|
||||
|
||||
Infall happens only on advancing ticks, so a region that does not tick (offline,
|
||||
ADR-0128) imports nothing. There is no catch-up credit.
|
||||
|
||||
### Tick and atomicity
|
||||
|
||||
For advancing tick `t`: derive the exchange from the committed state; apply it to
|
||||
the nested owner as a validated swap (new habitat, heat and boundary ledger, with
|
||||
`current = opening + incoming − outgoing` rechecked); then run the unchanged
|
||||
population tick (shared wildlife controller, controlled intentions, selections).
|
||||
If the biological tick refuses, the exchange is swapped back and the composite is
|
||||
byte-for-byte unchanged. Environment progress commits only with the tick. There is
|
||||
no independently acknowledged environmental or cellular prefix.
|
||||
|
||||
### Envelope and versions
|
||||
|
||||
The envelope stores identity, completed tick, geometry, compartments, radiation
|
||||
cap and cumulative export, every source with its cumulative import and event/skip
|
||||
counters, and the complete nested population envelope, with an FNV-1a64 checksum
|
||||
and byte-identical re-encoding. A nested owner restored alone must not publish a
|
||||
joint result. Old cellular formats 6/7/8, rules 8/9/10, population envelopes 1–3,
|
||||
traces and durable bundles 9–11 keep their exact meaning; none gains fields. The
|
||||
composite admits only nested owners with a boundary ledger (format 7 or 8).
|
||||
|
||||
The nested boundary ledger also carries migration flows (ADR-0144). The composite's
|
||||
own cumulative import and export distinguish environmental crossings from migration.
|
||||
|
||||
## Consequences
|
||||
|
||||
The open boundary is auditable: replay re-derives every infall from configuration,
|
||||
tick and seed, and restore continues from persisted cumulative entitlement. Source-
|
||||
off, exhausted and open worlds become directly comparable. Producers (photosynthesis)
|
||||
still require ADR-0136 step C's genome capability, coefficients and a capture
|
||||
process debiting a declared light entitlement; until then 12.5 is not complete.
|
||||
Durable publication (12.5c), worker/census/migration integration (12.5d) and target-
|
||||
host qualification (12.5e) remain separate segments.
|
||||
|
||||
## Alternatives
|
||||
|
||||
A copied environmental view, reuse of the M6 two-actor fixture, two independently
|
||||
committed checkpoints and a generic inventory setter remain rejected (see the
|
||||
resolution). A single global owner was rejected by the maintainer's clarification:
|
||||
regions scale by count, not by one shared ledger.
|
||||
@@ -1,5 +1,7 @@
|
||||
# Architecture decision records
|
||||
|
||||
- [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.
|
||||
|
||||
- [ADR-0171: Retained-plan exact populations](0171-retained-plan-exact-populations.md) - portable envelope/batch 3 preserve every member's expressed/heritable state, exact conversion/policy replay and projection-2 plan counts; durable admission remains separate.
|
||||
|
||||
- [ADR-0170: Explicit DEV worker placement](0170-dev-worker-placement.md) - required control-plane/master exclusion for DEV workloads in full and standalone overlays, with rendered-policy regression checks; no live-placement claim.
|
||||
|
||||
@@ -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 | Blocked on 12.2-12.4 | Finite M6 process fixtures do not qualify coupled persistent cellular/cohort atmosphere/water budgets. |
|
||||
| 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.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. |
|
||||
|
||||
@@ -4,6 +4,15 @@
|
||||
implementation boundary; it does not declare a new biological rule, accepted
|
||||
producer chemistry, working adapter or completed gate.
|
||||
|
||||
**Decision (2026-10-19):** the maintainer accepted the single-owner direction with
|
||||
three clarifications recorded in [ADR-0172](../adr/0172-cellular-environment-ownership.md):
|
||||
one owner per patch of space at any moment (many regions, paired transfers between
|
||||
them, unchanged for the later multicellular 3D world); reserves belong to the
|
||||
biological individual, with colony/multicellular sharing a later versioned rule;
|
||||
and the planet is an open system whose every crossing is a recorded import or
|
||||
export. ADR-0172 is the 12.5a contract and implements the portable 12.5b owner
|
||||
with finite infall entitlements and radiative heat export. Producers remain open.
|
||||
|
||||
## Concrete conflict
|
||||
|
||||
`CellularLives` exclusively owns its finite habitat, nursery, living bodies and
|
||||
|
||||
@@ -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 | Finite cellular contact feeding/decay and separate M6 producer/consumer resource owner | One jointly owned cellular/environment budget, explicit effective depth and source entitlements, versioned water/atmosphere species mapping and producer coefficients, plus closed/open and nutrient-exhaustion comparisons. |
|
||||
| 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 | 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.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. |
|
||||
@@ -82,7 +82,9 @@ and photosynthesis steps B/C do not silently become accepted M12 mechanics.
|
||||
The [ownership resolution proposal](M12_ENVIRONMENT_OWNERSHIP_RESOLUTION.md)
|
||||
records the actual public-API conflict, a composite-owner/checkpoint direction,
|
||||
typed compartment and source requirements, worked balances and delivery segments.
|
||||
It is a concrete design for review, not an implemented adapter or completed 12.5.
|
||||
The maintainer accepted it on 2026-10-19; [ADR-0172](../adr/0172-cellular-environment-ownership.md)
|
||||
records the clarified scope and implements the portable joint owner. It is not a
|
||||
durable profile, live upgrade, producer ecology or completed 12.5.
|
||||
|
||||
The engineering constitution requires stopping expansion at this architectural
|
||||
boundary and documenting the resolution. That does not prevent the independent
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
# Validation report
|
||||
|
||||
## 2026-10-19 - Cellular environment joint owner (M12.5a-b)
|
||||
|
||||
[ADR-0172](../adr/0172-cellular-environment-ownership.md) records the maintainer's
|
||||
ownership decision and adds envelope `AEVOCEN1`. The joint owner applies each
|
||||
tick's infall import and radiative heat export to the nested cellular owner as one
|
||||
validated swap, then runs the unchanged population tick; a refused tick swaps the
|
||||
exchange back. The only nested change is a private exchange/savepoint pair; no
|
||||
existing envelope, trace, golden or rule changes meaning.
|
||||
|
||||
Executed locally:
|
||||
|
||||
- GCC 14.2 Release full CTest **94/94, 8.83 s** and MSVC 19.44 Release full CTest
|
||||
**94/94, 15.16 s**, with NDEBUG. After trimming test tick counts only, the two
|
||||
environment tests pass **2/2** on both (2.48 s GCC, 3.23 s MSVC).
|
||||
- Clang 19.1 ASan/UBSan cellular subset **28/28, 200.52 s**, then the trimmed
|
||||
environment tests **2/2, 66.03 s**, with no sanitizer reports.
|
||||
- clang-tidy 19 (warnings as errors) on the new owner/tests and the changed
|
||||
cellular owner/population sources; clang-format 19 on every touched file.
|
||||
- Fresh-process continuation of a two-source, radiating region (400 + 400 ticks):
|
||||
MSVC and GCC checkpoint and resumed outputs are byte-identical, SHA-256
|
||||
`1746dd489226d612d46624c36987fba83f711c54dfe3f03f3e0bb0be65ea7379`.
|
||||
|
||||
Evidence in the suite: closed and source-off regions keep population bytes
|
||||
identical to a plain population every tick; a finite entitlement of ten bubbles
|
||||
per channel is consumed exactly (20 credited, later events counted exhausted and
|
||||
skipped, nothing more imported); radiated heat (75,000 pJ over 1,500 ticks at a
|
||||
50 pJ cap) leaves lives, corpses and habitat identical to the closed run; real
|
||||
wildlife collapsed into an exact cohort matches the individual run through 121
|
||||
infall events; a refused tick on an import tick leaves the envelope unchanged and
|
||||
the retried tick imports. Restore refuses corruption, wrong identity, future
|
||||
format, import above entitlement, a changed nested length, declared atmosphere,
|
||||
zero depth, a box unequal to the cellular area or outside its voxel, overlapping
|
||||
or unsorted sources, stockless or out-of-habitat sources and an owner without a
|
||||
boundary ledger. Every tick audits `current = opening + incoming - outgoing` and
|
||||
that environmental flows equal the nested ledger.
|
||||
|
||||
No producer, durable profile, SQL schema, worker integration, target-host cost,
|
||||
default opening or live upgrade. No World0 operation.
|
||||
|
||||
## 2026-10-19 - Portable retained-plan exact populations
|
||||
|
||||
[ADR-0171](../adr/0171-retained-plan-exact-populations.md) adds explicit envelope
|
||||
|
||||
Reference in New Issue
Block a user