Add M10.4b durable action records (schema v11)
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m47s
Foundation / checks (network) (push) Successful in 9m30s
Foundation / checks (client) (push) Successful in 12m19s
Foundation / checks (tsan) (push) Successful in 7m43s
Foundation / checks (checks) (push) Successful in 31m29s
Foundation / checks (postgres) (push) Successful in 36m39s
Foundation / postgres-tools (push) Successful in 19s
Foundation / image (push) Successful in 2m15s
Foundation / server-image (push) Successful in 20m37s

Each batch's actions are recorded in the same statement as its checkpoint: one
region_actions row per (world, account, action id) and the block in an append-only
table, compared on exact retries and resolution. The region host attaches actions to
the ticks they ride and reports acknowledgements and drops, keeping unknown-outcome
batches unresolved. Outcomes come from the durable record via ActionLedger, so
crashes before or after a commit, unknown publications and cross-region moves all
resolve to one answer; a repeated id keeps its first record instead of stalling a
region. ADR-0092.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-03 22:53:38 -04:00
co-authored by Claude Opus 5.5
parent e2f6208433
commit 69f3ad7cf8
32 changed files with 1289 additions and 75 deletions
@@ -59,3 +59,33 @@ the wire field must never be cast from it).
- The simulated watermark says the targeted tick ran while the intention was scheduled;
with no movement rule it changed nothing. 10.6 gives intentions an effect.
- Nothing is wired into evo-server yet (10.4c); nothing deploys M10 sessions.
## M10.4b durable action records (2026-10-03)
Schema v11 (`migrations/0011_region_actions.sql`, [region-actions-v1](../../schemas/region-actions-v1.md)):
- **Same transaction as the checkpoint.** The region host attaches each submitted action to
the first simulated tick at or after its scheduled tick and publishes the batch's action
block with the three-argument `publish_region_checkpoint`; the records exist exactly when
the checkpoint does. Committed history stays immutable: blocks live in their own
append-only table, and an exact retry or resolution must repeat the block.
- **Outcomes come from the record.** `find_region_action` (under the caller's exact region
lease) returns the committed record of (world, account, action id). Found: final
`committed_no_effect` with that record's tick and commit. Absent once this authority is
recovered and ready: never committed by any earlier epoch (its commits are final).
- **One record per id, without stalling a region.** Found during testing: an account that
moves regions while its action is pending in the old one can have the same id admitted by
the new region (the record does not exist yet). Refusing the second commit would have
quarantined a healthy region. The database instead keeps the first record and lets the
later batch commit; `IntentAdmission::committed` reports each outcome from the record, so
every region answers the same tick and commit for an id.
- **Host semantics.** `submit_action` (bounded: 256 queued plus riding), `ActionAck` per
committed action, `DroppedAction` with `final` = certainly never committed. Actions of a
batch whose publication outcome was unknown when authority was lost are not final; the
session layer keeps them pending until the record decides.
- **Session layer.** `ActionLedger` (interface) with `PostgresActionLedger`; admission
checks the record before admitting an id not in memory (`duplicate` with its outcome, or
`not_ready` when the record cannot be read); queries resolve unknown-outcome and evicted
actions from the record once ready. `RegionSessions::committed/dropped` take the host's
reports.
- Limits: action rows are retained (no pruning policy yet); clones (ADR-0067) do not copy
them; the two-argument publication of a commit that has an action block would still
return its receipt (the adapter never does this).