diff --git a/docs/adr/0100-primitive-lives-and-persistent-control.md b/docs/adr/0100-primitive-lives-and-persistent-control.md index e9b9c31..43732a3 100644 --- a/docs/adr/0100-primitive-lives-and-persistent-control.md +++ b/docs/adr/0100-primitive-lives-and-persistent-control.md @@ -211,6 +211,46 @@ 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 + +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: + +- `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. + +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. + ## 11.2c-2d: Object-store publication and recovery adapter The C++ persistence adapter writes the canonical primitive payload and batch trace diff --git a/docs/engineering/M11_2_DELIVERY_PLAN.md b/docs/engineering/M11_2_DELIVERY_PLAN.md index 21c7a67..783ff4a 100644 --- a/docs/engineering/M11_2_DELIVERY_PLAN.md +++ b/docs/engineering/M11_2_DELIVERY_PLAN.md @@ -90,8 +90,13 @@ Local checks do not close ADR-0097's reference-worker qualification. handling are implemented. Network and QUIC suites pass; targeted manual compile and link were needed because the normal Ninja build invocation idles. Host admission and durable execution are a separate slice. -- Remaining 11.2d: primitive-capable region host, server admission/execution, - crash-boundary qualification and readiness integration. The generic two-profile - host still cannot serve profile 3. +- 11.2d contract review: stopped before host/session execution after tracing + reservation, publication and query paths. ADR-0100 records the missing durable + outcome for an existing-life refusal, lack of region-independent request query, + and unresolved pending-reservation behavior when account control moves. Resolve + and validate this request/ownership contract before expanding implementation. +- Remaining 11.2d after contract closure: primitive-capable region host, server + admission/execution, crash-boundary qualification and readiness integration. + The generic two-profile host still cannot serve profile 3. No deployed world has been provisioned or changed by this work.