feat(lifecycle): retain inherited offspring plans separately from bodies
Foundation / checks (ecs) (push) Successful in 2m26s
Foundation / checks (deploy) (push) Successful in 4m6s
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 9m29s
Foundation / checks (tsan) (push) Canceled after 7m4s
Foundation / checks (network) (push) Canceled after 9m28s
Foundation / checks (postgres) (push) Canceled after 9m28s
Foundation / checks (checks) (push) Canceled after 9m34s

This commit is contained in:
dingo
2026-10-19 13:55:29 -04:00
parent 5d8aa4d2e3
commit 2c3a3c65a6
16 changed files with 887 additions and 71 deletions
+15
View File
@@ -1,5 +1,20 @@
# Project status and next steps
## Portable retained offspring plans - 2026-10-19
[ADR-0165](adr/0165-retained-cellular-offspring-plans.md) implements an opt-in
stored-plan owner, format 8/rules 10. Earned selections edit the inherited plan;
the parent's expressed body and biological charges stay unchanged. Repeated
funded births use that plan, later selections preserve earlier siblings, and
reloads/death history retain the distinction. Older saves retain their meaning.
MSVC/GCC full Release suites pass **85/85**; exact separate-process inherited
continuations agree across compilers. [Validation](engineering/VALIDATION.md)
records analysis/sanitizer evidence and scope. Current durable bundles, census,
population, migration and old batch replay refuse the new owner. Durable plan
integration, the in-life expression catalog, birth-time control succession,
retained NPC behavior and choice UI remain open. M12 remains in progress.
## Distinct-genome offspring funding - 2026-10-19
[ADR-0164](adr/0164-distinct-genome-offspring-funding.md) implements the first
@@ -0,0 +1,83 @@
# ADR-0165: Retained cellular offspring plans
## Status and scope
Accepted for the portable stored-plan segment of ADR-0163/0164, 2026-10-19.
No default/DEV upgrade, SQL admission, player succession or NPC behavior policy.
This is an explicit offspring-plan editing mode, not a final classification of
which future mutation operators may also be expressed during an existing life.
## Decision
Add cellular owner format 8/rules 10 through a detached no-tick upgrade from
format 7/rules 9. Preserve all biology, inventories, identities, offers, boundary
flows and archive history. Initialize each living/corpse offspring plan to its
currently expressed genome. Older formats retain zero in the new in-memory
fields and omit them from their unchanged canonical bytes.
`identity.genome` and archive `current_genome` keep their expressed-body meaning.
The separate `offspring_genome` names the inherited developmental plan. Every
newborn starts with both references naming the actual inherited plan. Existing
body derivation, maintenance, movement, feeding, growth, damage, predation and
spatial exclusion always use the expressed genome. Corpses retain the last
offspring plan as history, with no reproductive viability granted to dead tissue.
In this opt-in editing mode, the existing earned mutation choice edits the
offspring plan. Draw from the current plan using the existing recorded context
and eligibility credit. Revalidate selections exactly; admit the successor genome
without adding an expressed-genome revision or constructing parent tissue.
Consume the offer once. Record `(life,previous_plan,successor_plan,tick)` in an
append-only log, bounded by the existing genome archive capacity. Operator zero
still declines. NPCs still earn no mutation offers. No extra mutation fee is
invented: physical construction is funded when an actual offspring is made.
The live-expression path for nonstructural traits requires a later operator
catalog/transaction contract; this mode supplies only offspring-plan selections.
Use ADR-0164 mixed-genome funding for buds and their exact twin eligibility.
Retain existing phase order: surviving-parent plan selection precedes budding;
newborns do not grow or bud in their birth tick. Thus a selected plan can affect
that tick's offspring while the parent's expressed body remains unchanged. The
child's birth archive record names its actual inherited genome. Later selections
affect later offspring only. Wildlife reproduction uses the actual plan cost.
## State and restore invariants
Format 8 extends the format-7 header by a u32 plan-history count and zero u32
reserved field (316 bytes total). Each living/corpse row appends one u64 plan
reference (512/132 bytes). After habitat, archive and nonresident IDs, append
32-byte history rows in increasing `(tick,life)` order, then the existing FNV
trailer. Preserve the 16 MiB owner bound and existing archive limits. The magic is
`AEVCLV08`; only rules 10 uses this format. No native-layout serialization.
Validate counts/size before allocation, all plan references, compatible schema/
development versions, and each complete per-life chain from its expressed genome.
History successors have one genome parent matching the recorded previous plan
and their recorded origin matches the selected successor identity. Require unique
successors, live-at-selection timing, retained actor identity, and final references
matching the log. Selections must follow any legacy expressed-body revision used
as their initial plan. Regenerate outstanding offers from the retained current plan.
Missing, conflicting, forged, over-bound or noncanonical state refuses atomically.
## Alternatives, benefits, costs and risks
Overwriting the parent's expressed genome would rebuild it and misprice its body.
Treating an unexpressed plan as an archive living carrier invents an organism.
Keeping only a final reference loses which parent selected earlier sibling plans.
The distinct reference/log preserves body and ancestry meanings at bounded cost.
A plan without expressed carriers may still be reproductively available in a
living parent. Existing census, migration, population and persistence allowlists
must refuse this new owner until they have complete plan/viability semantics and
versioned replay; absence of expressed carriers cannot prove its extinction.
No old snapshot or golden is rewritten. This portable checkpoint is not durable
publication authority, and no existing SQL bundle admits it.
## Qualification
Require real earned plan selections, unchanged parent anatomy/biological charges,
different funded sibling plans, later choices leaving earlier children unchanged,
exact save/restore and separate-process continuation, death/history retention,
offline exclusion, all-channel closure, unsupported old paths and forged codecs.
Run Release/NDEBUG, analysis, formatting and relevant ASan/UBSan checks. Retained
plans do not implement the birth-time control choice, persistent NPC behavior,
new limb/plant traits, UI, environmental producers or M12 completion.
+2
View File
@@ -1,5 +1,7 @@
# Architecture decision records
- [ADR-0165: Retained cellular offspring plans](0165-retained-cellular-offspring-plans.md) - portable owner format 8/rules 10 keeps expressed bodies separate from earned inherited plans, repeated births and selection history; durable/control/UI integration pending.
- [ADR-0164: Distinct-genome offspring funding](0164-distinct-genome-offspring-funding.md) - pure funded reproduction separates the expressed parent's investment from the inherited child's anatomy and provision; old same-genome behavior retained, owner/control integration pending.
- [ADR-0163: Structural inheritance and one-way offspring succession](0163-structural-inheritance-and-offspring-succession.md) - maintainer-accepted target gameplay: offspring structural traits, irreversible birth-time control choice and NPC-parent behavior/reproductive continuity; implementation pending.
+23 -7
View File
@@ -16,10 +16,10 @@ are living is a different event. Each organism keeps its own identity, inventory
development, ancestry and terminal death. Only the currently controlled organism
freezes on logout; independent parents and siblings continue living normally.
Implementation remains pending. Separate expressed/heritable state and bounded
NPC behavior, versioned mutation timing and a durable birth/control choice must
be implemented before this behavior is offered. Choice timing and pause policy
remain explicit implementation decisions. The M11 decisions and diagram below
Portable expressed/heritable state is now implemented below. Bounded NPC
behavior and a durable birth/control choice must be implemented before this
behavior is offered. Choice timing and pause policy remain explicit implementation
decisions. The M11 decisions and diagram below
describe the old baseline, not a prohibition on the accepted target behavior.
## Implemented portable offspring funding
@@ -34,9 +34,25 @@ refuse. Two share-funded children cannot manufacture the parent's invested matte
Tests cover changed anatomy and demand, sterile children, exact cost/shortages,
twins and retained archive identities. Existing same-genome helpers delegate to
this operation with identical parent/child inputs. This is a pure proposal;
stored heritable state, mutation expression timing, succession, NPC behavior and
birth UI remain unimplemented. Current live rules still produce exact-copy buds.
this operation with identical parent/child inputs. Current live rules still
produce exact-copy buds.
## Implemented portable retained plans
[ADR-0165](../adr/0165-retained-cellular-offspring-plans.md) adds opt-in owner
format 8/rules 10. Expressed genome IDs keep describing existing tissue. Earned
mutation choices in this mode edit a separate offspring plan, without rebuilding
the parent or charging for unconstructed tissue. Physical construction is funded
at birth. Subsequent offspring use that plan until another selection changes it;
earlier children keep their original form. Save/reload retains plan selections
and dead-parent history, and logout freezes the controlled parent's biology.
This scoped mode edits inherited plans only. The future operator catalog still
needs to distinguish traits that can also change during an existing life. Existing
durable bundles, census, population, migration and batch replay refuse the new
owner until their plan semantics are qualified. The birth-time control choice,
persistent NPC behavior and UI remain unimplemented; default/DEV rules do not
opt into this owner.
## Historical M11 baseline and open strategies
+9 -5
View File
@@ -7,15 +7,19 @@ Completed scoped commits do not mean their entire roadmap gates have passed.
The maintainer's 2026-10-19 [gameplay clarification](../adr/0163-structural-inheritance-and-offspring-succession.md)
accepts offspring structural expression, a one-way birth-time control choice and
NPC-parent behavior/reproductive continuity. Current mutation, controller, birth,
control and census state do not implement that target. These require coordinated
versioned biology, authority, recovery and UI work; earlier exact-copy generation
NPC-parent behavior/reproductive continuity. Portable retained plans implement
part of that target; durable mutation/birth, behavior, control and census still
require coordinated versioned biology, authority, recovery and UI work. Earlier
exact-copy generation
evidence does not close that gap or establish the intended generational gameplay.
[ADR-0164](../adr/0164-distinct-genome-offspring-funding.md) now implements the
pure biological funding step with distinct parent/offspring genomes and exact
closure. Existing same-genome behavior remains. Persistent heritable plans,
expression timing, authority handoff and NPC/UI integration are still required.
closure. [ADR-0165](../adr/0165-retained-cellular-offspring-plans.md) adds portable
retained plans and earned selections, unchanged expressed parents and repeated
funded births. Existing same-genome behavior remains. Durable plan/trace/bundle,
population/migration/census admission, the in-life expression catalog, authority
handoff and NPC/UI integration are still required.
## Persistence boundary resolved by 12.3b
+59
View File
@@ -1,5 +1,64 @@
# Validation report
## 2026-10-19 - Portable retained cellular offspring plans
[ADR-0165](../adr/0165-retained-cellular-offspring-plans.md) adds opt-in owner
format 8/rules 10, an explicit no-tick upgrade, separate expressed/inherited
genomes and append-only plan selections. Earned selections change inherited
plans without rebuilding/charging parent tissue; actual births fund the child's
plan. Existing raw/population/durable versions keep their meaning. Old raw batch
replay now explicitly refuses this new unsupported owner.
Executed locally:
- MSVC 19.44 Release full CTest **85/85 passed, 21.91 s**, with NDEBUG.
- GCC 14.2 Release full CTest **85/85 passed, 16.83 s**, with NDEBUG.
- Clang 19.1 Debug inheritance contract and actual separate-process restart
**2/2 passed, 11.74 s**, built with clang-tidy 19 enabled. All changed C++
implementations and the new test compiled under that analysis configuration.
Repository clang-format 19 and diff whitespace checks pass.
- Clang 19.1 ASan/UBSan budding, inherited funding, retained plans, inheritance
process restart and funded maturation **5/5 passed, 70.52 s**, without reports.
After strengthening valid-trace refusal, the two inheritance tests passed again
under ASan/UBSan, **2/2, 40.26 s**; production C++ was unchanged.
- Optional GCC cellular session adapter rebuilt; `cellular-session-batch`
**1/1 passed, 0.14 s**. No private PostgreSQL integration rerun: schema,
SQL admission and durable bundles are unchanged and do not admit this owner.
Tests exercise actual earned structural offers, declines, stale/reused selection
refusal without state changes, unchanged parent body/reserve/heat versus an
unselected control, no fictitious archive carriers, repeated funded siblings,
later plans preserving earlier children, exact reload, suspended-parent exclusion,
ordinary ecological death and retained corpse plans. A legacy expressed mutation
survives upgrade, and a forged selection predating that expression refuses.
Checksummed hostile references, actor/history timing, counts, reserved fields,
version mismatch and checksum damage refuse; unsupported population/census/
migration/replay paths also refuse. The replay test uses a valid encoded/decoded
old trace and requires the version refusal specifically. Inventory closes in
every channel.
The restart fixture writes a selected plan and actual offspring, continues 64
ticks with the controlled parent frozen and offspring metabolism active, and
compares against a separate process restoring that cut. MSVC and GCC final bytes
also have identical SHA-256
`1e2c254df2d38b6cca1444c272a05563eec934e4381653240280958eee107837`.
The initial restart assertion incorrectly required juvenile growth even though
maximal funded birth can already be fully grown. It was corrected to require
real offspring metabolism and plan retention; all checks above ran afterward.
No golden or biological rule was changed to satisfy it.
This is portable checkpoint evidence, not durable publication, live deployment,
controller behavior continuity, control succession or UI qualification. No
target-host/TSan/actual-days evidence or M12 completion is claimed. The fixtures
use finite food and scripted intentions to isolate owner semantics; they do not
replace the separate unscripted ecology matrix. The in-life trait expression
catalog and broader plan viability semantics remain open integration work.
The DEV window in this push expires **2026-10-19 21:34:17 UTC**. Rendered policy
passes: 75 objects in 74 files, 138 rendered objects in 17 overlays, zero failures.
The unchanged policy self-test matrix was not repeated. No deployment or World0
operation occurred; unrelated untracked files were preserved.
## 2026-10-19 - Distinct-genome offspring funding
[ADR-0164](../adr/0164-distinct-genome-offspring-funding.md) adds a complete pure