M4.2 moves individuals into the M4.1 record and does only that: no advance, no materialization back, no transfer between habitats, no persistence. Collapse is two phases over one sample. plan_collapse reads the members once and returns an immutable plan that already carries a validated cohort; commit applies exactly that plan and derives nothing, so replaying a committed sample cannot resample, and a record that would not validate fails during planning rather than after the ledger has moved. A controlled, suspended, dead or unsettled member refuses the whole plan instead of being skipped. Filtering would let a caller obtain a plan by omitting whoever was inconvenient, and the result would be indistinguishable from an honest conversion, which is the adversarial selection the model forbids. Ages are carried into declared classes and a member fitting none refuses the plan, so nobody is quietly moved or dropped for having nowhere to go. Reserves are summed per class and never redistributed, so the distribution M4.1 exists to keep survives the move. Conservation runs through the ledger rather than beside it: one atomic transaction, one leg per member, each moving that member's entire reserve, so the conserved total is unchanged by construction. Dual representation is closed from both ends. A member must be emptied exactly, and a reservoir holding anything other than what was sampled makes the plan stale rather than partly applicable. The destination is proved available before anything moves, so no rejection can strand biomass in a reservoir nothing owns. Reversing that order is detected by the tests, which is the point: the ordering prevents the failure rather than a comment claiming it cannot happen. Two gaps are stated rather than implied covered. This cannot tell whether the members offered were all there were, so completeness is the caller's obligation. And emptying a reservoir is not withdrawing the right to use it, because the ledger has no removal. ReservoirId and Transfer gain the defaulted comparisons every other value type here already has, so a plan's legs can be compared. Additive, and ADR-0037 says so rather than claiming no M1 change. All ten guards were confirmed load-bearing by removing each and rerunning. One of my own expectations was wrong rather than the code: a replayed commit reported stale_plan where I expected destination_occupied. Both are pure checks made before anything moves, so only the diagnosis differed; the destination check runs first now, because "this already happened" says more about a replay. Release 35/35, analysis, ASan 35/35 and clang-format all ran and passed here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2.5 KiB
Architecture decision records
Locked requirements outrank these records. Review architecture, ADRs, public contracts, tests, then implementation. Stop expanding implementation on conflict.
Adopted for proof applies only to the bounded initial headless slice. Proposed recommends without adopting a dependency. Deferred requires a named experiment. Later Accepted and Superseded preserve rationale. Proof choices do not silently settle gameplay or production infrastructure.
Records 0001–0015 cover language, build, dependencies, tests/benchmarks, ECS, ticks, randomness, serialization, units, errors, threads, logging, PostgreSQL, messaging and metrics. 0016–0019 cover durability/ownership, networking/security, infrastructure and voxels. 0020 scopes Gitea delivery and the stateless dev Job. Each record has the eight required sections. 0021 authorizes the opt-in ECS comparison only, not a production dependency. 0022 adopts the bounded sequential lifecycle-command scheduler for the proof. 0023 defines local periodic neighborhood queries and a measured linear baseline. 0024 adopts finite, typed energy/matter inventory transfers for M2.1. 0025 scopes finite capture, growth recipes and residual accounting for M2.2. 0026 adds shared community ownership and bounded synthetic feeding for M2.3. 0027 adds terminal inventory ownership and budgeted nutrient return for M2.4. 0028 adopts funded reproduction, bounded slot capacity and retained lineage IDs. 0029 scopes the deterministic ecosystem driver and bounded measured episodes. 0030 adopts the immutable genome v1 record, validation and canonical encoding. 0031 adopts deterministic development, derived phenotype and bounded plans. 0032 derives non-uniform metabolic budgets and the first genome/ledger path. 0033 adopts the bounded mutation catalog and uniform seeded candidate draws. 0034 adopts the permanent lineage archive and absence that is never extinction. 0035 derives strategies from genomes and measures them over a split-half gradient. 0036 defines the tier 2 cohort, its declared resolution and exclusive ownership. 0037 collapses individuals into a cohort as one sampled, ledger-exact transaction.
Every dependency adoption records exact version/commit and integrity hash, transitive license obligations, maintenance/security review, owner and removal boundary. Candidate performance and binary-size comparisons are hypotheses until benchmarked. Primary sources were reviewed during the initial September 2026 design. No unadopted candidate is a link dependency of the proof.