Foundation / checks (client) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 39s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 47s
Foundation / checks (tsan) (push) Canceled after 24s
Foundation / checks (ecs) (push) Canceled after 59s
170 lines
11 KiB
Markdown
170 lines
11 KiB
Markdown
# M11.2: Primitive lives and persistent control
|
|
|
|
2026-10-09. Server-side continuation of M11.1 at `93e1ab0`.
|
|
[ADR-0100](../adr/0100-primitive-lives-and-persistent-control.md) is accepted in
|
|
direction: the maintainer authorized recommendations and implementation choices
|
|
for later review. This plan does not close 11.2.
|
|
|
|
## Contract review
|
|
|
|
Reviewed PROJECT_VISION, ENGINEERING_CONSTITUTION, SYSTEM_OVERVIEW,
|
|
SIMULATION_ARCHITECTURE, PERSISTENCE_ARCHITECTURE, REGION_DURABILITY,
|
|
REPRODUCTION_MODEL, ENERGY_MODEL and ADRs 0062, 0091, 0092, 0098 and 0099.
|
|
Inspected founder, development/metabolism, lineage/archive, host, checkpoint,
|
|
batch and account-control headers and lineage-region/account-control tests.
|
|
|
|
`closure_is_required` in lineage_region_tests correctly rejects an extra living
|
|
organism outside the two fixture bindings. Migration 0011 / ADR-0092 permits
|
|
duplicate no-effect publications; biological effects need the losing checkpoint
|
|
rejected in full. ADR-0100 proposes explicit contract replacements for gameplay.
|
|
ADR-0099's full-grown founder analysis is an assumption, not funded creation.
|
|
|
|
## Delivery segments
|
|
|
|
Validate each segment, record evidence/limits in VALIDATION.md, then commit and
|
|
push its scoped changes. Gate completion needs all applicable rows; library
|
|
tests alone are not a durability proof.
|
|
|
|
| Segment | Modules | Acceptance |
|
|
|---|---|---|
|
|
| 11.2a: contract and funded creation | Biology budget helpers if needed; server lifecycle; accounting callers; docs/tests | Settle funding, growth/reserve, placement and ADR-0100; equal old/new-account starts; atomic source/body/reserve/heat/provenance; insufficient channels, allocation, placement and overflow leave state unchanged |
|
|
| 11.2b: recoverable cellular state | Cellular state owner; codecs; persistence profile; lineage closure | New profile/history declaration; exact timers/reservations/retries; hostile bounds/versions/bindings refused; old profile goldens unchanged; no synthetic actors adopted as wildlife |
|
|
| 11.2c: durable ownership | Migration/adapters; account control; publication; host | Real PostgreSQL concurrent spawn/takeover, stale generations/leases, exact/changed retries; one nonterminal life across regions; losing candidate never publishes inventory; uncertain commit reconciliation; no runtime-role bypass |
|
|
| 11.2d: server integration | Session/host; versioned protocol; headless probe; process tests | Explicit spawn; reconnect to existing life; route to owner; no marker as organism; no offline progress; kills before/after transaction and final answer; same result after restart; network callers/codecs updated |
|
|
|
|
11.3-11.7 add the biological action loop and complete death/logout behavior.
|
|
This plan adds no renderer, UI, deployment or dependency.
|
|
|
|
## Fault and equivalence matrix
|
|
|
|
- New and historical accounts get identical biological starts for identical rule
|
|
and habitat inputs; historical identities may differ.
|
|
- Competing requests in one/two regions publish at most one nonterminal life.
|
|
Different accounts cannot overdraw the same finite source.
|
|
- Exact retry resolves once; changed content conflicts; retry of an old successful
|
|
spawn after its death returns the old result, never a new life.
|
|
- Failed allocation/funding/placement spends nothing and publishes no ancestry.
|
|
Allocation gaps are allowed; identity reuse is not.
|
|
- Kill before upload, before transaction, after commit and after final answer.
|
|
Recover only the committed cut and exact result.
|
|
- Race refresh/takeover with publication; stale control cannot publish a body or
|
|
replace life ownership.
|
|
- Missing body/archive/source debit/provenance/binding prevents readiness.
|
|
- Timers/reserves remain exact across restart/offline intervals; terminal history
|
|
remains terminal, never resurrected by recreating a session.
|
|
- Run under NDEBUG, verify channel conservation and canonical round trips.
|
|
|
|
## Validation lanes
|
|
|
|
Use README commands/presets: Windows debug/release and affected network/QUIC;
|
|
Linux debug/release, ASan+UBSan, clang-tidy and format-check; real PostgreSQL
|
|
migration/ownership and process-kill checks when those segments exist. Run network
|
|
presets whenever a replicated type changes. Record unavailable environments.
|
|
Local checks do not close ADR-0097's reference-worker qualification.
|
|
|
|
## Progress
|
|
|
|
- 11.2a: funded in-memory creation, committed as `69101a7`.
|
|
- 11.2b: creation-state codec, committed as `48684d3`. Published checkpoint profile
|
|
registration is still required with 11.2c-2; this codec alone is not durability.
|
|
- 11.2c-1: schema v15 reservations/identity allocation and durable refusals. These
|
|
spend nothing and do not publish an organism. Focused PostgreSQL tests and the
|
|
full migration/process, backup/restore, upgrade and privilege regressions pass.
|
|
- 11.2c-1 adapter: typed C++ reserve/refuse API, full unsigned identity range and
|
|
uncertain-response reconciliation validated in Release and ASan+UBSan.
|
|
- 11.2c-2a: bounded creation-batch codec and detached funded replay. Empty batches
|
|
preserve all biology. Host/manifest chain authorization remains required.
|
|
- 11.2c-2b: portable primitive checkpoint profile 3, history profile 2, complete
|
|
payload closure and bounded birth traces. SQL admission remains disabled until
|
|
guarded publication atomically binds bodies and reservations.
|
|
- 11.2c-2c: schema v16 guarded primitive publication atomically validates control,
|
|
reservations and birth bindings with the checkpoint head. Exact retries
|
|
converge, conflicting evidence and stale control refuse, and runtime can read
|
|
immutable life bindings. Full PostgreSQL migrations, process, recovery,
|
|
backup/restore, host-loss, upgrade and privilege checks pass.
|
|
- 11.2c-2d: C++ object-store publication, verified predecessor replay, exact-byte
|
|
retry and profile-3 recovery adapter with SQL life-binding reconciliation. Full
|
|
PostgreSQL/process/recovery and upgrade qualification passes.
|
|
- 11.2d-1: versioned v5 new-life request/receipt/outcome/query wire codec, keeping
|
|
v4 the default and rejecting v5 at the current server until negotiation and life
|
|
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.
|
|
- 11.2d-2 implementation: schema v17 records an immutable `existing_life`
|
|
refusal for each conflicting request, offers an authenticated world/account/
|
|
request query, and cancels unpublished reservations atomically when control
|
|
changes region/epoch. Published bindings remain unchanged; v5 now distinguishes
|
|
`existing_life` and `cancelled` from query-only `pending`/`unknown`. Typed adapter,
|
|
migration, codec and PostgreSQL tests/docs are updated. The maintainer confirmed
|
|
CI passed after `4c4ab36`, including the v17 migration and reservation contract
|
|
checks; the database gate is closed.
|
|
- 11.2d-3 implementation: a separate primitive host acquires/renews the fenced
|
|
region lease, recovers profile 3 before readiness, and executes one authenticated
|
|
new-life request as a detached replay plus atomic publication. Exact published
|
|
retries query the durable result; unknown publication retains and retries the
|
|
exact prepared commit, while uncertain/corrupt state withholds readiness. The
|
|
host does not advance biology and is not connected to `evo-server` or QUIC yet.
|
|
Release/NDEBUG compilation, clang-format/tidy checks and the full PostgreSQL CI
|
|
gate passed; the maintainer confirmed success after `4c4ab36`.
|
|
- 11.2d-4 implementation: `evo-world-clone provision --opening primitive-v1`
|
|
requires owner-supplied frame/source IDs, all five finite funding channels and
|
|
ordered habitat sites. It writes profile-3 genesis using the primitive payload
|
|
bound and refuses an existing region whose profile/frame or full opening differs. A real-
|
|
PostgreSQL process test covers runtime-role refusal, owner provisioning, exact
|
|
retry, changed frame/opening and recovered values. No deployed world was
|
|
touched. The PostgreSQL CI gate remains to be confirmed.
|
|
- 11.2d-5 implementation: `evo-server --profile primitive` selects only the
|
|
profile-3 creation host, uses its payload bound and becomes ready only after
|
|
lease acquisition and full profile-3 recovery. Missing genesis is quarantined;
|
|
this mode refuses synthetic ticks and the M9/M10 session listeners, and never
|
|
provisions or advances biology. The process test checks ready-after-recovery,
|
|
missing-genesis refusal, no tick advance and clean lease release. Linux CI
|
|
compilation and PostgreSQL process evidence remain pending.
|
|
- 11.2d-6 implementation: primitive profile can opt into QUIC v5; that listener
|
|
requires durable account control and accepts v5 only, while other region
|
|
listeners remain v4-only. Life requests are tied to the admitted session,
|
|
current epoch and authenticated account-control generation, then call the
|
|
primitive host; query calls its read-only path. The session client and headless
|
|
probe have opt-in v5 request/query calls; v4 remains the default, and primitive
|
|
v5 refuses the M10 action/movement/interest path. QUIC contract tests cover v5
|
|
Hello, Welcome, durable-generation binding, receipt, outcome and read-only query.
|
|
The Linux/PostgreSQL process suite now provisions an isolated primitive region,
|
|
creates a life over v5, restarts the host and checks the same durable result;
|
|
execution remains pending CI.
|
|
- 11.2d-7a implementation: migration 24 and the typed persistence adapter add
|
|
a lease-fenced world/account lookup for the unique unrejected reservation.
|
|
It finds the owner before account control can move; pending unpublished
|
|
reservations route to their original region and a refused/cancelled-only
|
|
history has no active owner. PostgreSQL and migration CI execution remain
|
|
pending.
|
|
- 11.2d-7b implementation: grant login resolves the active life owner after
|
|
signature/scope checks and before durable control claim. A different owner
|
|
uses the v4+ SessionRedirect from an explicit `--life-route` per world region,
|
|
then closes as moved. Cellular startup requires a route catalog containing
|
|
this region; malformed, duplicate, unavailable, and missing-owner routes fail
|
|
closed. QUIC tests cover redirect-before-claim and missing-route refusal.
|
|
PostgreSQL and migration CI and process-kill qualification remain pending.
|
|
Client switching is covered by 11.2d-7d below. Do not claim 11.2 complete
|
|
until redirect/restart gates pass.
|
|
- 11.2d-7c qualification: the PostgreSQL-backed region-session process test now
|
|
creates a life in region 35, logs the account into region 36 with an explicit
|
|
two-region catalog, checks the redirect and unchanged account-control owner,
|
|
kills region 35, restarts it, verifies the same life, and checks routing again.
|
|
Execution remains pending Linux/PostgreSQL CI.
|
|
- 11.2d-7d client follow: the two-region remote-client test now gives its
|
|
account an active life owner in region 2 and checks that the redirect chooses
|
|
a region-2 grant without claiming control in region 1. Runtime execution
|
|
remains pending CI.
|
|
|
|
No deployed world has been provisioned or changed by this work.
|
|
|
|
## Profile-4 entry dependency
|
|
|
|
M11.2's primitive host provisions profile 3, whose region profile is immutable.
|
|
M11.3 cannot use that checkpoint as a cellular opening, and profile 4 must start
|
|
empty. The 11.3e player-entry dependency and proposed resolution are recorded
|
|
in [ADR-0114](../adr/0114-cellular-first-life-publication.md). Do not treat a
|
|
profile-3-to-4 conversion or a manually seeded founder as an implementation
|
|
shortcut. Cross-region routing and reconnect-to-owner remain separate open 11.2
|
|
gates.
|