diff --git a/apps/evo-server/main.cpp b/apps/evo-server/main.cpp index 5300bb2..35cb756 100644 --- a/apps/evo-server/main.cpp +++ b/apps/evo-server/main.cpp @@ -1021,7 +1021,19 @@ int serve_cellular(Options& o) { } } } - const bool birth_waiting = !host.queued_births().empty(); + // A queued birth publishes only while its account holds a session here: the + // publisher checks current account control, and a departed account's birth would + // fail every batch with the lease-fence code, so the region would fence itself in a + // loop. The birth stays queued and resumes when the account returns. + std::vector held_births; + for (const auto& birth : host.queued_births()) { + network::AccountId account; + account.bytes = birth.account; + if (held_births.size() < biology::max_cellular_tick_lives && + bridge->sessions().holder(account)) + held_births.push_back(birth); + } + const bool birth_waiting = !held_births.empty(); if (status.ready && state && (player_present || birth_waiting)) { const auto now = std::chrono::steady_clock::now(); if (!next_tick) @@ -1039,9 +1051,7 @@ int serve_cellular(Options& o) { if (!builder) { bridge->dropped(actions, true); } else { - const auto births = host.queued_births().first( - std::min(host.queued_births().size(), biology::max_cellular_tick_lives)); - const auto appended = builder->append(tick, baseline, actions, births); + const auto appended = builder->append(tick, baseline, actions, held_births); if (!appended) { bridge->dropped(actions, true); } else { diff --git a/deploy/kubernetes/region/dev-session-route/listener.yaml b/deploy/kubernetes/region/dev-session-route/listener.yaml index 8840cc2..f746f56 100644 --- a/deploy/kubernetes/region/dev-session-route/listener.yaml +++ b/deploy/kubernetes/region/dev-session-route/listener.yaml @@ -12,7 +12,7 @@ spec: env: - {name: REGION_SESSION, value: "dev"} - {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"} - - {name: REGION_SESSION_WINDOW, value: "dev-20261013T191802-66969:1791929882"} + - {name: REGION_SESSION_WINDOW, value: "dev-20261013T202231-51334:1791933751"} - {name: REGION_M10_MAX_GRANT_LIFETIME, value: "14400"} ports: # QUIC (ADR-0090): UDP only; nothing listens on TCP 7400. diff --git a/docs/adr/0123-dev-cellular-region-and-life-allocator-provisioning.md b/docs/adr/0123-dev-cellular-region-and-life-allocator-provisioning.md index f3d9184..0655dd2 100644 --- a/docs/adr/0123-dev-cellular-region-and-life-allocator-provisioning.md +++ b/docs/adr/0123-dev-cellular-region-and-life-allocator-provisioning.md @@ -86,6 +86,16 @@ region in DEV. Bringing one up exposed four gaps: client sends one every tick. The default probe admission (4 actions per 8-tick window) refused every other one. The cellular bridge allows two per tick of window, which leaves headroom for arrival jitter. +- **A departed account's birth waits instead of fencing the region.** A + second account requested a birth and disconnected. Its queued birth kept + the host ticking, and the cellular publisher's `check_life_control` refused + the batch with SQLSTATE EVL02. That is the same code as a lost region lease, + so the host fenced itself, reacquired and failed again every 20 seconds, + refusing logins (region 3, 2026-10-13 20:18 UTC). + - The host now includes and ticks only births whose account holds a session. + - Other births stay queued until the account returns. + - Restarting the pod cleared the in-memory queue. The reservation is + durable, and the client's query re-queues it. - **Grants for region 3 must be minted with `--region 3 --lifetime 300` or less.** Longer probe sessions require a separate, reviewed change to the cellular grant ceiling; this ADR does not make it. diff --git a/docs/engineering/VALIDATION.md b/docs/engineering/VALIDATION.md index 0b1c7af..627ba05 100644 --- a/docs/engineering/VALIDATION.md +++ b/docs/engineering/VALIDATION.md @@ -7186,4 +7186,12 @@ opening starved the cell. Only patch energy feeds the reserve, and founder intake (1,148,000 pJ/s) emptied its 4M and 16M pJ patches in seconds. DEV moves to region 100/3 with 200M and 50M pJ patches (ADR-0123). Checked locally: g++-14 `-Werror` and clang-tidy-19 on `apps/evo-server/main.cpp` with -`EVO_SERVER_M10`, plus the deploy policy suite. \ No newline at end of file +`EVO_SERVER_M10`, plus the deploy policy suite. +Region 3 then livelocked. A second account's birth was queued, the account +disconnected, and every following batch failed `check_life_control` with +EVL02, which the host reads as a lost region lease. It fenced, reacquired and +failed again every 20 s, refusing logins with `shutdown`. A restart of +`Deployment/evo-region` (permitted by the agent contract) cleared the +in-memory queue, and the region held `ready 1` at epoch 8 from 20:20:44 UTC. +`serve_cellular` now includes, and ticks for, only births whose account holds +a session. Checked locally: g++-14 `-Werror`, clang-tidy-19 and clang-format. \ No newline at end of file