Files
aevolution/docs/adr/0104-cellular-single-life-tick-order.md
T
dingo 9984f78940
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 39s
Foundation / checks (ecs) (push) Successful in 1m53s
Foundation / checks (tsan) (push) Canceled after 0s
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 50s
Foundation / checks (client) (push) Canceled after 2m59s
Foundation / checks (network) (push) Canceled after 2m22s
Close cellular starvation into corpse transfer
2026-10-10 21:55:07 -04:00

62 lines
3.2 KiB
Markdown

# ADR-0104: Cellular single-life tick order trial
## Status
Accepted direction for the M11.3 exploratory slice (2026-10-10). This orders a
single-life proposal only; the region transaction must resolve shared patch
claims and durable actions before the rule is used for multiple organisms.
## Context
ADR-0098 selects phenotype-derived maintenance, movement and intake with
movement and engulf intentions. ADR-0099 defines rate conversion at the fixed
50 ms tick boundary. ADR-0101 and ADR-0102 supply finite resources, bounded
movement and footprint contact. These independent proposals need an explicit
order so energy acquired during a tick cannot retroactively fund actions earlier
in that tick.
## Decision
For the first one-life cellular trial step, the authoritative resolver produces
one detached candidate in this order:
1. Charge one tick of maintenance from the starting reserve to heat, rounded up.
If it cannot be paid, return `insufficient_maintenance`; the later life/death
owner must resolve starvation in this same tick before publication.
2. Resolve bounded movement from the post-maintenance reserve. If the move is
unaffordable, the organism remains in place and the tick continues; it cannot
spend resources it will acquire later in the tick. Paid movement energy goes
to heat.
3. If an intake target was supplied, validate its patch exists and the resulting
footprint contacts it. A missing or out-of-contact target is reported without
intake, while the already-proposed maintenance and movement remain in the
candidate. A valid target receives the one-tick channel-limited transfer.
4. Publish position, reserve, heat, patch stock and tick together. Every resource
channel is conserved. This resolver does not grow the body, replenish patches,
resolve a second life's claim, or commit state itself.
An intake in this trial addresses one provisioned patch per life per tick. The
perception projection is the only intended way for a client to learn target
addresses; the server still validates range at view creation and contact at
resolution. Later multi-life resolution must arbitrate all claims against one
shared candidate habitat before invoking or replacing this single-life helper.
## Alternatives considered
- **Intake before movement:** rejected because newly absorbed energy could fund
movement in the same tick, making costs depend on action ordering.
- **Refuse the whole tick when movement is underfunded:** rejected because a
cell may still maintain itself and feed while stationary.
- **Silently skip unaffordable maintenance:** rejected because it would allow a
nonviable cell to remain active without paying upkeep.
## Consequences
The pure biology resolver composes rate conversion, movement affordability,
heat transfer and one contact-gated patch intake into a detached value.
ADR-0106 adds shared-stock arbitration around this single-life proposal. Neither
helper is a complete region owner. ADR-0107 closes maintenance failure with a
same-tick corpse candidate. Life ownership, heat publication, the cellular
checkpoint, network intention consumption and durable outcomes remain open.
Those integrations are required before the exploratory hands-on probe.