feat(admin): end a stranded life from the portal (schema 69)
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 6s
Foundation / checks (deploy) (push) Successful in 6s
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 5s
Foundation / postgres-tools (push) Successful in 5m17s
Foundation / image (push) Successful in 6m23s
Foundation / server-image (push) Successful in 8m26s

ADR-0182 section 18. Region 16 refused every birth for an account with
"Existing cell is already bound to this account" although no cell in it
held the account: a published reservation was never ended, and the only
remedy was tools/ops/end-account-life.sql as the database owner.

- Account action POST /api/accounts/<uuid>/end-life?request=N. The admin
  API reads the life's region from the account's lives and refuses while
  that region's live view lists a cell holding the account (also a bud,
  split offspring or organism control moved to), a region it cannot view,
  an incomplete view, an unpublished request or a life no longer open.
- Schema 69: admin_end_account_life_v1 (admin role only) ends it at the
  region's latest commit and appends who and why to admin_life_endings.
- The account page shows End life for each published life not ended.
- A region refusing a birth because the account holds a cell (life_exists)
  could never record it: reject_primitive_life accepted reasons 1..3 only.
  The reservation stayed open and unpublished and refused every later
  birth. Schema 69 and the C++ wrapper accept existing_life (4).
- A region with no ticking cells ignored queued admin commands (such as a
  spawn) until something else woke it; a queued command now keeps it
  ticking until applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-29 07:32:08 -04:00
co-authored by Claude Opus 5.5
parent 8085392122
commit 6de2b7b1ca
15 changed files with 274 additions and 18 deletions
+8
View File
@@ -1,5 +1,13 @@
# Project status and next steps
## Ending a stranded life - 2026-10-29
The portal's account page can end a published life whose reservation was never ended, which
refused every new birth ("Existing cell is already bound to this account"). The admin API first
checks the region's live view for any cell holding the account; schema 69 records who ended it
and why. A region with no ticking cells now still applies queued admin commands, such as a
spawn. See [ADR-0182](adr/0182-admin-portal-and-world-tuning.md) section 18.
## Larger region ticks for testing - 2026-10-28
A region tick may hold up to 4,096 lives (was 256), for testing limits only, and
@@ -403,6 +403,38 @@ was capped at it.
250 lives, so a region near the bound will run far below real time. The client snapshot is
budgeted (nearest changes first), so it degrades rather than fails.
### 18. Ending a stranded life (delivered 2026-10-29, schema 69)
Region 16 playtest: the region refused every birth for an account with "Existing cell is
already bound to this account", although no cell in it held the account. The database refuses
a birth while the account has an open life reservation anywhere in the world; this one was
published and never ended. How it was left open is not yet known. Until 2026-10-29 the only
remedy was `tools/ops/end-account-life.sql` as the database owner.
- **Account action.** `POST /api/accounts/<uuid>/end-life?request=N[&reason=R]`. The admin API
reads the life's region from the account's lives, fetches that region's live view and refuses
(409 `life_in_region`) while any listed cell holds the account, including a bud, a split's
offspring or an organism that control moved to. It also refuses a region it cannot view, a
view that does not list every cell, a request never published (404) and a life no longer open
(409 `not_open`).
- **Schema 69.** `admin_end_account_life_v1` (admin role only) ends the reservation at the
region's latest commit, as `end_cellular_lives` does, and appends who and why to
`admin_life_endings` (immutable). Unpublished reservations stay with the region, which still
holds them as queued births. Checkpoints and history are unchanged.
- **Safety.** If the check were wrong, the region still refuses a birth for an account that holds
a cell in its state (`life_exists`), which records an existing-life refusal.
- **Existing-life refusals are recorded.** That refusal could never be recorded:
`reject_primitive_life` (schema 15) accepted only reasons 1 to 3, and existing_life is 4.
The region dropped the birth from its queue but left the reservation open and unpublished,
which then refused every later birth for the account. Schema 69 accepts 4, both in the
function and in its C++ wrapper.
- **Portal.** The account page shows an End life button for each published life that has not
ended.
- **Idle regions take commands.** A region ticks only while something needs it: a player, a
waiting birth, a cell not suspended, or ecological work. A command queued in an empty region,
such as a spawn of wildlife, waited until something else woke it. A queued admin command now
keeps the region ticking until it is applied.
## Delivery order
1. Read-only portal: login, accounts (from existing data), regions, region view (schema 61,