Files
aevolution/docs/adr/0125-cellular-budding-and-wildlife-descendants.md
T
dingoandClaude Opus 5.5 f22a540135
Foundation / checks (ecs) (push) Successful in 2m30s
Foundation / checks (deploy) (push) Successful in 4m0s
Foundation / checks (tsan) (push) Successful in 10m37s
Foundation / checks (client) (push) Failing after 13m56s
Foundation / checks (network) (push) Successful in 19m9s
Foundation / checks (checks) (push) Successful in 42m54s
Foundation / checks (postgres) (push) Successful in 44m9s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
Carry bud actions and the v5 bundle through protocol and persistence
M11.5c (ADR-0125): v10 cellular actions, the canonical input and the trace carry
target kind 3 (bud), matched to durable actions; below rules 4 the owner
ignores it. The v5 version bundle is admitted in C++ and by schema v36, which
also admits kind 3 in SQL action inputs; the provisioner offers cellular-v3.
A PostgreSQL test publishes a bud from a fed founder and recovers it after a
host restart. The publication tests now use commit ids no other suite produces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 06:42:41 -04:00

130 lines
6.8 KiB
Markdown

# ADR-0125: Cellular budding and wildlife descendants
## Status
Accepted engineering contract for M11.5 (2026-10-13), implementing ADR-0098
decisions 1 and 3 and the wildlife controller boundary. Every quantity marked
**trial** is a versioned, playtestable value for 11.9 to revise, not a balance rule.
## Context
ADR-0098 fixes budding as the one M11 reproductive strategy: the parent survives
and keeps control, pays an explicit matter-and-energy investment, and the bud is
unowned wildlife from its first tick with an exact copy of the parent's current
genome. Reproduction is an action with a stable id and a durable outcome; the
server decides prerequisites, cost, placement and the child's genome. Wildlife
uses a bounded deterministic controller over the same intentions players use, with
no special biological rules.
The profile-4 cellular owner (rules 3, format 4) already has durable v7+ actions
with a canonical 24-byte input whose byte 12 is a target kind (0 none, 1 patch,
2 engulf, ADR-0124), a life-ordered replay trace with one intention per living
cell, an archive with append-only genome revisions (ADR-0122), and ADR-0032's
`reproduction_investment`: the genome's reproduction fraction of the body's
matter, priced at the parent's own construction rate.
## Decision
### Action
- A bud is target kind **3** of the canonical cellular action input and of the
trace intention, with zero coordinates, carried by v10 sessions only. It is
exclusive with an intake target and with engulfment, like kind 2. It rides the
existing durable action path: stable account-scoped id, receipt, committed
outcome, exact retry. The client supplies only the intention.
- The same kind in a wildlife intention is how the controller buds. There is no
second path.
- Below rules 4 the owner ignores a bud intention and reports no bud result, as
rules 2 ignore engulfment. Refusing it would let one v10 client's bud fail the
whole tick for every life in an older region.
### Funding (rules 4)
A bud is attempted after the tick's mutation phase and before player births, for
lives in stable life-id order, using the state entering that phase:
- The parent must be alive, carry the reproduction capability, be fully realized
(growth 1000 per thousand) and undamaged. A bud born this tick cannot bud.
- **Investment** is the parent's ADR-0032 `reproduction_investment`: matter per
channel plus construction energy, which goes to region heat (construction
overhead, ADR-0028).
- The bud is born at the largest realized growth (per thousand, at most 1000)
whose developed body fits inside the investment matter on every channel. The
remaining investment matter becomes the bud's reserve matter: nothing is lost.
- **Provision (trial):** the parent also transfers energy for 30 seconds of the
bud's own full demand (maintenance plus full-speed movement) at its birth
growth, the founder's reserve rule (ADR-0100), into the bud's reserve.
- Everything is paid from the parent's **reserve**, never its body. A parent that
cannot pay the whole investment and provision on every channel is refused and
nothing is spent: abundant energy never pays for missing matter.
### Placement
- The bud is placed touching the parent, at centre distance parent extent + bud
extent + 1 micrometre, trying eight directions in fixed order (east, then
counter-clockwise in 45-degree steps). The first position inside the habitat
and separated from every living cell is used.
- If none is free the bud is refused for placement and nothing is spent.
Placement never grants a free or reduced bud.
### Identity and heredity
- A bud's life, organism and event identity is
`2^63 + region * 2^32 + sequence`, where `sequence` is a per-region counter in
the owner state, starting at 1. It is server-derived, durable in the checkpoint,
never reused, and replay derives it without a database round trip. Regions above
`2^31 - 1` cannot bud. A rules-4 owner refuses a founder whose allocated identity
is at or above `2^63`, so allocated and budded identities can never collide. The
world allocator keeps its full u64 range (its tests exercise it); it starts far
below the namespace (`10^12` in DEV) and advances by one per life.
- The bud carries its parent's current genome (the same genome record, an exact
copy). The archive records the bud organism's birth with that genome and tick;
the owner records the parent life on the bud and keeps it after death.
- Wildlife never accrues mutation eligibility or offers in M11.
### Wildlife
- A wildlife life has the zero account. No session, action or perception targets
it; it is otherwise an ordinary cell: it pays maintenance, moves, feeds, can be
engulfed and dies.
- The server's controller is a pure, bounded function of the committed state and
the tick: bud when the parent can fund a bud; else move toward and feed from the
nearest perceived patch holding energy (the same 5 mm perception as players);
else wander in a direction derived from the life id and the tick, changed every
two seconds. It never engulfs in M11.5. Its output is recorded in the trace like
any intention, so replay never runs the controller.
- Descendants survive their parent's death and the parent's logout. Wildlife
progress is bounded by region ticks: the region simulates only while a player
is present (M11.3), so wildlife pauses with it. M11.7 revisits this together
with the offline freeze.
### Versions
- Owner format 5, rules 4 (`cellular-v3` opening): format 5 adds the bud sequence
and a parent life per life and corpse; rules 4 enable kind 3, funding,
placement and wildlife.
- Cellular version bundle v5. The replay trace stays format 3: kind 3 is an
intention byte value. Schema v36 admits kind 3 in action inputs, the v5 bundle
for revision-format publication and births.
## Alternatives
- **Automatic budding when funded:** rejected. ADR-0098 makes reproduction a
player action; only the wildlife controller decides automatically.
- **Allocating bud identities from the world allocator:** rejected for M11.5.
It needs a reservation and publication binding per bud, including wildlife buds
that no account owns. A region namespace is durable, unique and replayable.
- **Paying the investment from the body:** rejected. It would need growth
regression and a second development path; feeding into the reserve is how the
funding analysis (ADR-0098 decision 7) already counts.
- **A bud with no starting energy:** rejected. It would starve on its first tick,
so the investment would buy only a corpse.
## Consequences
Players can grow a lineage of wildlife that competes with them for food. Founders
remain the only way a new player life starts; a bud is never playable. Budding
adds a trace intent value, an owner format, a version bundle and a migration, and
no new SQL publication function. Wildlife pausing with an empty region is a known
M11.5 limit.