Persist primitive life outcomes across control moves
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m57s
Foundation / checks (client) (push) Successful in 12m36s
Foundation / checks (network) (push) Successful in 13m43s
Foundation / checks (tsan) (push) Successful in 8m14s
Foundation / checks (postgres) (push) Failing after 17m26s
Foundation / checks (checks) (push) Successful in 33m23s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped

This commit is contained in:
dingo
2026-10-10 13:52:43 -04:00
parent f92198fd50
commit ea07d7c1f5
17 changed files with 303 additions and 83 deletions
@@ -211,45 +211,28 @@ admission and retry behavior, not end-to-end recoverability or deployable gamepl
Death, respawn, offline timers, biological tick integration and life transfer are
outside 11.2 and remain governed by later gates.
## 11.2d contract gap: durable request outcomes and moved control
## 11.2d request outcomes and control movement
The first v5 request/receipt/outcome/query codec is implemented, but server
execution must remain disabled until the durable request contract is closed.
Inspection of schema v15/v16 and the C++ read adapter found two gaps:
Schema v17 closes the request contract without transferring a pending biological
operation between regions. A conflicting new request gets a durable
`existing_life` refusal row, so exact retry and query return the same final
result. The authenticated current controller can query by world/account/request
independently of the reservation's region; results include the owner and, after
publication, the immutable born tick and commit receipt. Missing rows resolve as
unknown, while a reserved row remains pending and is never called a birth.
- `reserve_primitive_life` raises `EVL16` when the account already has another
reserved or living life. It inserts no row for the incoming request, so that
request has no durable final outcome for exact retry or query. The current v5
result vocabulary cannot express this refusal.
- `load_primitive_lives` reads successful bindings for one region. There is no
authenticated world/account/request query that resolves a refusal or a
pending reservation across regions. A repeated reservation can identify the
original owner region, but the runtime has no completed routing/recovery
contract for it.
- A pending reservation is pinned to its original region. If account control
moves before publication, admission in the new region returns that owner
region, while publication still requires current control. Without an explicit
ownership transition, the request can remain stranded; allowing the new
region to publish independently would risk two bodies.
When account control changes region or region epoch, the same fenced control
transaction marks unpublished reservations in the old region cancelled.
Published bindings are untouched. The cancelled request remains immutable and a
new request is required to try again. This avoids cross-region transfer of
speculative body state and prevents the old reservation becoming publishable
under a new controller. V5 now gives `existing_life` and `cancelled` durable
result values distinct from query-only `pending` and `unknown`.
These are contract blockers for 11.2d, not permission to infer new game rules.
Before implementing session execution, settle and record a schema/API contract
that gives every accepted new-life request a durable, immutable queryable
outcome, including an existing-life refusal, and resolves pending ownership
across control movement. One candidate is a world-scoped operation record keyed
by `(world, account, request_id)`, with durable pending/final state, owner region,
and the successful commit binding/sequence where applicable. Query must be
available to the authenticated current controller independently of its region.
An ownership move must either atomically transfer the pending operation under
the relevant fencing checks, or durably finalize it and require a new request;
two regions must never be able to publish it. Extend the versioned result
vocabulary for any accepted durable refusals, keeping query-only `pending` and
`unknown` distinct from final outcomes.
The candidate above is a recommendation for review, not an accepted game rule.
Add PostgreSQL concurrency and process-crash evidence for exact retries,
cross-region queries, control movement during reservation/publication, and
immutable refusal results before enabling the v5 handler or primitive host.
Migration v17, its typed query adapter and PostgreSQL tests implement this
contract. Host/session execution, concurrent-process crash qualification and
readiness integration remain outstanding; v5 stays refused by the running
server until those gates pass.
## 11.2c-2d: Object-store publication and recovery adapter