130 lines
7.4 KiB
Markdown
130 lines
7.4 KiB
Markdown
[Reviewed]
|
|
# ADR-0028: Funded reproduction and retained lineage identity
|
|
|
|
## Status
|
|
|
|
Adopted for the M2.5 synthetic community fixture. No genome content, mutation,
|
|
player account, control grant, spatial placement or gestation model is selected.
|
|
Lineage identity here is an opaque parent reference, not the M3.1 genome record.
|
|
|
|
## Context
|
|
|
|
M2.1-M2.4 conserve inventory through capture, growth, feeding, terminal events
|
|
and bounded decomposition. No operation creates an actor, so every community
|
|
decays monotonically and M2.6's long-run ecology fixture cannot observe anything
|
|
but extinction. Reproduction is the missing transfer in ENERGY_MODEL's table.
|
|
|
|
Offspring must be funded. A child credited from nothing would break conservation;
|
|
a child credited by the host would make founder admission implicit. ADR-0024's
|
|
ledger fixes its reservoir set at construction and exposes no append operation,
|
|
so actor creation cannot allocate storage mid-run without reopening that contract.
|
|
|
|
## Decision
|
|
|
|
Extend `FeedingCommunity::advance` with a fourth bounded span of immutable
|
|
`ReproduceIntent{sequence, parent, investment}` records. Like FeedIntent these are
|
|
trusted co-located fixture intentions, not client commands or autonomous decisions.
|
|
Admit at most `max_consumers` per tick, require nonzero unique host sequences,
|
|
sort by sequence and permit at most one intent per parent per tick.
|
|
|
|
`ReproductionConfig{capacity, construction_per_thousand, minimum_endowment}` is
|
|
fixed at `create`. Capacity reserves that many additional consumer reservoirs
|
|
after the configured consumers and before waste. Configured consumers plus
|
|
capacity must not exceed `max_consumers`. Capacity defaults to zero, so existing
|
|
fixtures keep an identical reservoir layout, waste index, action sequence and
|
|
golden results. Reproduction is intent-driven; a tick without intents is a M2.4 tick.
|
|
|
|
Process state becomes unborn, active or corpse. Reserved slots begin unborn: they
|
|
hold an empty reservoir, never act, are never valid feeding targets, are not
|
|
corpses and are not decomposed. `active(id)` is false for unborn and corpse alike;
|
|
`corpse(id)` and the ancestry queries reject a reserved slot with a distinct
|
|
`unborn_actor` error rather than reporting an empty corpse. Reproduction allocates the
|
|
lowest-numbered unborn slot. A slot never returns to unborn, so IDs are never
|
|
reused and a dead child's identity persists exactly as ADR-0027 requires.
|
|
|
|
The intent names the withdrawal from the parent reservoir, mirroring feeding's
|
|
bite semantics. A fixed `construction_per_thousand` fraction splits it with the
|
|
same overflow-safe quotient decomposition: the quotient endows the child, the
|
|
energy remainder goes to heat and the matter remainder goes to waste. Construction
|
|
overhead is real inventory, not rounding loss. A value of 1000 endows everything;
|
|
0 sends the whole investment to heat and waste and therefore always fails the
|
|
endowment floor unless that floor is zero. No fractional entitlement is carried
|
|
between reproductions.
|
|
|
|
Reject the whole tick when the parent is not an active consumer, when the
|
|
investment is zero or exceeds the parent's balance, when no unborn slot remains,
|
|
or when the resulting endowment does not meet `minimum_endowment` on every
|
|
channel. Capacity exhaustion is backpressure: it rejects, it never grants a free
|
|
or reduced offspring. The producer cannot reproduce in this increment; capture is
|
|
its funding path and conflating the two would make an abiotic source a parent.
|
|
|
|
A child duplicates its parent's consumer configuration verbatim. With no genome,
|
|
offspring differ from their parents only in inventory. This is duplication, not
|
|
heredity, and M3 replaces it with developmental capabilities.
|
|
|
|
Record an immutable `parent` and `origin` tick per process. Founders record parent
|
|
zero and origin zero. Both survive the death of the child and of the parent, and
|
|
remain readable after decomposition empties the reservoir.
|
|
|
|
Tick phases: terminal facts -> producer activity -> ordered feeding -> reproduction
|
|
-> decomposition -> atomic publish. Reproduction after feeding lets a consumer fund
|
|
offspring with what it ingested this tick; this is a deliberate fixture choice, not
|
|
a biological claim about digestion latency. Terminal facts run first, so a process
|
|
terminated this tick cannot reproduce. Intents validate parents against the state
|
|
entering the reproduction phase, so a child born this tick cannot itself be a
|
|
parent, feed, be fed upon or be decomposed until the next tick.
|
|
|
|
All phases run on the existing private candidate. Any rejected intent rolls back
|
|
reproduction, feeding, producer progress, decomposition and diagnostics together.
|
|
Receipts report the sequence, allocated child ID, endowment and overhead, and are
|
|
published by noexcept move with the rest of the committed state.
|
|
|
|
## Alternatives Considered
|
|
|
|
Appending reservoirs on birth would reopen ADR-0024's fixed opening totals and
|
|
shift the waste index mid-run, invalidating inspection spans and existing goldens
|
|
for no benefit at fixture scale. Binary fission would force a decision on parent
|
|
continuity and control identity that REPRODUCTION_MODEL explicitly leaves open.
|
|
Charging overhead on top of the investment needs a second bounds check and can
|
|
overflow a parent that could otherwise afford the child. Eggs, cohorts and
|
|
broadcast spores require gestation timers and statistical allocation that this
|
|
increment has no fixture for. Reusing dead IDs would save slots and destroy
|
|
ancestry. Host-credited offspring would break conservation outright.
|
|
|
|
## Benefits
|
|
|
|
The energy cycle closes: nutrients fund growth, growth funds feeding, feeding
|
|
funds offspring, death and decomposition return matter. Offspring are provably
|
|
paid for, capacity is explicit and bounded, ancestry outlives its organisms, and
|
|
M2.6 can run a seeded long-run ecosystem that is not a guaranteed decay.
|
|
|
|
## Costs
|
|
|
|
A fixed pre-allocated slot budget is not a population model; a community cannot
|
|
outgrow its configured capacity and has no aggregation path until M4. Lowest-slot
|
|
allocation is deterministic but arbitrary. Whole-community copies per tick remain
|
|
the correctness baseline. Ancestry is a parent reference and an origin tick, not
|
|
heredity: nothing is inherited, because nothing heritable exists before M3.
|
|
|
|
## Risks
|
|
|
|
Do not read this as a reproductive strategy, a fecundity rule or a funded founder
|
|
admission for a persistent world. Construction overhead, the endowment floor and
|
|
the post-feeding phase position are synthetic parameters that must be reviewed
|
|
before any biological tuning, and must not become gameplay by being measured.
|
|
No account owns a process; a parent reference grants no control and no wildlife
|
|
ownership. Capacity rejection must never be softened into a reduced endowment.
|
|
|
|
## Consequences
|
|
|
|
Test hand-calculated endowment and overhead splits, the endowment floor, per
|
|
channel insufficiency with abundant energy, capacity exhaustion, unborn slots
|
|
rejected as targets and as corpses, terminated and unknown parents, duplicate and
|
|
zero sequences, more than one intent per parent per tick, whole-tick rollback
|
|
including producer progress and decomposition, order permutation equality across
|
|
seeds, absent ID reuse, ancestry surviving both deaths, construction endpoints,
|
|
u64 extremes and independently recomputed conservation. Default zero capacity must
|
|
leave every M2.4 result unchanged. A later process snapshot must serialize states,
|
|
parents, origins and capacity together; M1's codec serializes none of it. No
|
|
database, renderer, network or deployment change follows from this record.
|