fix(server): end a player's life under the reservation's root identity
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m27s
Foundation / postgres-tools (push) Successful in 26s
Foundation / server-image (push) Successful in 4m18s
Foundation / image (push) Successful in 5m4s

Playtest: after becoming a split's offspring and being engulfed, every new
birth was refused ("Existing cell is already bound to this account"). The
region recorded the ending under the dead cell's own identity, which was never
reserved, so the database ignored it and the founder's reservation stayed
open. After Adhesion the opposite happened: the merged founder's ending closed
the reservation while the player lived on as the organism.

An account's life now ends only when no life holds the account, and the ending
names the lineage root (cellular_lineage_root): the life born from the
reservation, reached through parent links in lives and corpses.

tools/ops/end-account-life.sql lets the operator end one stranded account's
reservation (dry run unless confirm=yes; exactly one match required).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-26 13:24:06 -04:00
co-authored by Claude Opus 5.5
parent 5dab8e4018
commit 736bf98aaa
6 changed files with 129 additions and 7 deletions
+4
View File
@@ -429,6 +429,10 @@ void a_choice_splits_the_cell(bool become) {
require(become ? child.account == account(2) && founder.account == LifeAccount{}
: child.account == LifeAccount{} && founder.account == account(2),
"control did not follow the choice");
// The account's reservation names the founder it was born as, wherever control went.
require(cellular_lineage_root(*state, identity) == 101 &&
cellular_lineage_root(*state, 101) == 101,
"the lineage root is not the founder born from the reservation");
require(state->habitat().patches().size() >= deposits + 1, "the paid cost was not reclaimed");
closed(*state);
// A half-grown founder cannot split again, so its next offer waits until it has regrown.