Add fenced durable primitive life reservations (M11.2c-1)
Foundation / checks (deploy) (push) Successful in 14s
Foundation / checks (ecs) (push) Successful in 2m3s
Foundation / checks (postgres) (push) Canceled after 0s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 5m17s
Foundation / checks (client) (push) Canceled after 5m17s
Foundation / checks (network) (push) Canceled after 2m57s
Foundation / checks (deploy) (push) Successful in 14s
Foundation / checks (ecs) (push) Successful in 2m3s
Foundation / checks (postgres) (push) Canceled after 0s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 5m17s
Foundation / checks (client) (push) Canceled after 5m17s
Foundation / checks (network) (push) Canceled after 2m57s
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
# Primitive life identity reservations (database schema v15)
|
||||
|
||||
ADR-0100, M11.2c-1. A reservation has no biological body or resource debit.
|
||||
It is not a successful spawn and must never be acknowledged as one.
|
||||
|
||||
The owner provisions `life_allocators(world_id, next_identity)` only after
|
||||
auditing an unused range above every retained identity in the life, organism,
|
||||
genome and origin-event namespaces for that world. There is no runtime initializer,
|
||||
reset or automatic provisioning. This subsection does not provision a dev world.
|
||||
Every allocation uses one value in each of those distinct namespaces. The counter
|
||||
is shared across the world's regions, never wraps, and retains gaps from rejected
|
||||
requests. Future birth/mutation allocators must share this allocation authority;
|
||||
independent counters cannot issue overlapping identities.
|
||||
|
||||
`life_reservations` retains world/account/request ID, allocated identity, owning
|
||||
region, founder-life rules and rejection. These new-life request IDs form a
|
||||
separate operation namespace from M10 no-effect probe action IDs. The future
|
||||
protocol must expose that distinction explicitly; a generic ActionQuery cannot
|
||||
resolve a life request by assumption.
|
||||
|
||||
| Rejection | Meaning |
|
||||
|---|---|
|
||||
| 0 | Reserved only; not yet a published organism |
|
||||
| 1 | Insufficient funding |
|
||||
| 2 | No placement/capacity |
|
||||
| 3 | Cancelled |
|
||||
|
||||
One unrejected reservation per world/account is enforced by a partial unique
|
||||
index. Rejected rows remain permanently queryable by retry. A different request
|
||||
may follow rejection and gets a new identity. There is no deletion API.
|
||||
|
||||
`reserve_primitive_life` requires the exact region lease and current durable
|
||||
account-control generation. Exact retry returns the original identity, owner and
|
||||
rejection without another allocation. A different pending request is `EVL16`.
|
||||
Unsupported rules/invalid arguments are `22023`; missing provisioning is `EVL04`;
|
||||
exhaustion is `EVL05`; stale/expired control or lease is `EVL02`.
|
||||
|
||||
`reject_primitive_life` durably records the first refusal, requiring current
|
||||
control in the reservation's owning region. Repeating it returns the first reason.
|
||||
This operation will need an additional guard against rejecting a published body
|
||||
when publication is introduced; v15 alone cannot publish bodies.
|
||||
|
||||
The lock order is upgrade lock, region lease, account control, reservation and
|
||||
allocator. Allocation checks lease and control expiry again after the allocator
|
||||
lock wait. Runtime has EXECUTE only on the two guarded operations, never the
|
||||
tables or internal control helper. Migration's effective privilege audit covers
|
||||
these additions, including no-op migration runs.
|
||||
|
||||
A takeover may inspect its old reservation before its session wait expires, but
|
||||
gets no biological control from it. The owner region stays unchanged. Session
|
||||
admission must still honor ADR-0091's takeover wait before originating gameplay.
|
||||
Final spawn success, checkpoint publication and reconciliation are 11.2c-2/d.
|
||||
|
||||
Validation: `tools/ci/postgres-check.sh --life-reservations-only` starts a fresh
|
||||
local socket-only PostgreSQL test cluster. The full postgres-check also executes
|
||||
these tests, alongside migration, backup, restore and existing process checks.
|
||||
Reference in New Issue
Block a user