Files
aevolution/docs/adr/0107-cellular-starvation-and-corpse-transfer.md
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

50 lines
2.4 KiB
Markdown

# ADR-0107: Cellular starvation and corpse transfer trial
## Status
Accepted for the M11.3 exploratory slice (2026-10-10). It implements the
maintenance failure already specified by ADR-0104 and the inventory-retention
requirement from ADR-0098; the player-facing starvation message and later corpse
decay remain open.
## Context
ADR-0104 says maintenance is paid first and an organism that cannot pay must die
in the same tick. ADR-0098 says death retains a corpse or detritus with the
organism's inventory. The cellular tick must not leave a permanently starving
life active, partially debit it, or lose usable reserve/body mass. Movement costs
already credited to heat need a destination distinct from the corpse's usable
inventory.
## Decision
- If starting reserve cannot pay the full rounded-up maintenance cost, the life
dies before movement or intake in that tick. No partial maintenance is charged.
- Transfer body matter and reserve energy/matter exactly once into one corpse
candidate at the death position. The body contains matter only.
- Transfer the life's accumulated energy-only heat separately to the region heat
owner. Heat is not made ingestible corpse energy.
- Resolve all survivors, corpses, patch updates and heat outputs in one detached
region candidate. Any invalid identity, overflow or other refused life step
returns no candidate, so the host publishes nothing.
- This trial adds no decay, scavenging, engulfment or corpse timer. The life owner
records terminal lineage and atomically publishes the candidate later.
## Alternatives considered
- **Leave an unpaid life active:** rejected because it skips the selected upkeep
rule and permits free offline survival.
- **Charge a partial upkeep:** rejected because it gives maintenance a new
partial-payment rule and creates ambiguity about what the organism dies with.
- **Put heat in the corpse:** rejected because that would make already-spent
movement/maintenance energy usable again through feeding.
- **Discard heat:** rejected because ADR-0058 requires accounted heat to remain in
the closed inventory total.
## Consequences
The pure candidate can close starvation without mutating the source habitat or
life inputs. The durable owner still needs a heat destination and a transaction
that publishes life death, corpse, patch changes, heat, checkpoint and outcomes
together. No persistence or player-facing behavior is claimed here.