Foundation / checks (ecs) (push) Successful in 2m27s
Foundation / checks (deploy) (push) Successful in 4m15s
Foundation / checks (network) (push) Successful in 21m4s
Foundation / checks (client) (push) Successful in 22m22s
Foundation / checks (tsan) (push) Successful in 31m40s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 45m38s
Foundation / checks (checks) (push) Canceled after 45m43s
77 lines
4.3 KiB
Markdown
77 lines
4.3 KiB
Markdown
# ADR-0164: Fund offspring from a distinct inherited genome
|
|
|
|
## Status and scope
|
|
|
|
Accepted for the first portable biology implementation segment of ADR-0163,
|
|
2026-10-19. Extends ADR-0032/0125/0137. This is a complete pure funding proposal,
|
|
not admission of new owner rules, stored heritable state or player succession.
|
|
|
|
## Decision
|
|
|
|
Add `fund_offspring(parent, offspring, growth, reserve, temperature, share)` and
|
|
`offspring_cost(parent, offspring, temperature, share)` to the existing biology
|
|
budding API. Both genomes are immutable validated records. Require equal schema
|
|
and development versions in this first adapter. Refuse a reused genome ID with
|
|
different contents. Archive ancestry, authority, placement and durable publication
|
|
remain the caller's responsibility; a cost proposal grants none of those rights.
|
|
|
|
The expressed parent determines reproductive capability, grown/undamaged
|
|
eligibility, and the existing reproduction investment, including construction
|
|
heat and any admitted reproduction-skill coefficient. Divide that investment
|
|
channelwise by `share` exactly as existing twins do; remainders stay with the parent.
|
|
The offspring genome determines its own body, birth growth and energy provision.
|
|
Select the largest growth in 1..1000 whose body fits every investment matter
|
|
channel. Remaining invested matter is child reserve. The parent additionally
|
|
funds 30 seconds of that child's own full demand at its birth growth. This uses
|
|
the existing trial provisioning constant, not an adult-body or survival grant.
|
|
|
|
As before, refuse if the largest body's full provision is unaffordable; do not
|
|
silently select a smaller child to reduce that energy bill. A non-reproducing
|
|
offspring is permitted if the reproductive parent can construct it. A parent
|
|
without reproduction cannot use a reproductive child's capabilities to bud.
|
|
Cross-schema/development reproduction is explicitly unsupported pending a later
|
|
versioned conversion contract, rather than mixing construction laws implicitly.
|
|
|
|
Every channel closes exactly:
|
|
|
|
`parent reserve before = parent reserve after + child body + child reserve + heat`
|
|
|
|
Heat has energy only and body has matter only. The parent body is never spent or
|
|
rebuilt. Inputs remain unchanged, and refusals return no partial transition.
|
|
Cost uses the same funding path against a bounded ample reserve; exact shown
|
|
cost funds the proposal and one-unit shortage in any required channel refuses.
|
|
The shared investment and fixed tissue composition bound all supported genomes
|
|
well below that ample value. Unsupported or impossible proposals have no cost.
|
|
|
|
Existing `fund_bud` and `bud_cost` delegate with the same genome in both roles.
|
|
All old signatures, numerical behavior, rule meanings and golden bytes remain.
|
|
No dependency, library boundary or existing codec changes.
|
|
|
|
## Alternatives, benefits, costs and risks
|
|
|
|
Rebuilding the parent into the selected child form violates ADR-0163. Pricing
|
|
the entire proposal from the child would let it supply reproductive capability
|
|
or change the parent's already expressed investment. Copying the old parent body
|
|
into a differently shaped child can fail elemental composition and geometry.
|
|
Separating the two derivations supplies an actual funded biological operation
|
|
without introducing a second balance or arbitrary mutation fee.
|
|
|
|
The cost is two explicit genome inputs and an incompatible-genome refusal.
|
|
This adapter retains existing reproduction/rounding limitations; it does not
|
|
select final balance, new morphology, heredity timing or a future hybrid species
|
|
model. Funding a possible newborn does not prove mature ecological viability.
|
|
|
|
## Qualification and next boundaries
|
|
|
|
Check old same-genome equality across supported founders, distinct membrane/size
|
|
and demand variants, maximal feasible growth, all-channel closure and shortages,
|
|
twins, sterile children, parent eligibility, incompatible versions and reused IDs.
|
|
Retain real archive parent/child links through a codec round-trip without changing
|
|
the parent's expressed genome. Tests run under NDEBUG, analysis and ASan/UBSan.
|
|
|
|
Next define and implement versioned expressed/heritable owner state, operator
|
|
expression timing and retained plan history, then atomic birth/control choice,
|
|
bounded persistent NPC behavior and readable birth UI. Current default/DEV rules
|
|
continue exact-copy budding; SQL admission, census, migration and old snapshots
|
|
do not acquire these features by accepting this pure operation.
|