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
+39
View File
@@ -4237,3 +4237,42 @@ tests; format check; Windows MSVC 19.44 preset `quic` build and CTest 4/4 (binar
timestamps checked).
Not done: durable action records and crash resolution (10.4b), evo-server wiring and
process kill tests (10.4c).
## 2026-10-03 — M10.4b durable action records (ADR-0092, schema v11)
Implemented migration v11 (`region_actions`, `region_commit_actions`, `check_action_block`,
`commit_actions`, three-argument publication, six-argument resolution,
`find_region_action`; apply chain and audit), `encode_actions`, the store overloads,
actions in `PreparedCommit`/publication/resolution, host `submit_action` with
`ActionAck`/`DroppedAction`, `ActionLedger` in admission and `PostgresActionLedger`.
Database tests (`tests/region_action_tests.cpp`, regions 7/131-135, commit ids tagged 0xA7):
publication with actions and lookups (including another account's and an absent id);
exact retry and resolution with the block; a changed block conflicting (retry and
resolution); nine invalid blocks refused (tick outside, tick 0, kind, zero account, zero id,
unsorted, duplicate, one id at two ticks, wrong length) and the encoder refusing the same;
a later batch carrying an already recorded id committing with the first record kept; a
batch without actions; lookups fenced with an old lease; the PostgreSQL action ledger.
Host: acknowledgement with the tick each action rode, late action riding the next tick,
duplicate, invalid and full submissions, not ready; crash before the transaction (successor
finds no record), crash after the commit before any acknowledgement (record durable,
successor at commit 1); unknown publication outcome resolved by exact bytes including the
actions. Unit tests: duplicate from the record, unavailable record refusing admission,
refused attempts costing no lookup, exact commit tick, final and unknown drops, unknown
decided once ready (committed or not committed), evicted outcome found on record.
`postgres-check.sh`: history 1..11, future-version probe 12, v11 checksum drift, audit
refusing SELECT on both new tables and EXECUTE on `check_action_block`.
Found and fixed during development: updating `region_commits` with the block was refused by
the immutable-history trigger (blocks now live in their own append-only table); a repeated
action id would have failed the later commit and quarantined a healthy region (now the first
record is kept and outcomes come from it); the encoder and SQL accepted one id at two ticks
in one block; test fixtures colliding with other tests' world, commit ids and accounts.
Executed: Linux GCC 14 `tools/ci/postgres-check.sh` complete (18 integration and rehearsal
suites, migration and audit probes); clang-tidy 19 on the changed persistence, host,
ledger, session and test sources (Clang builds with network+PostgreSQL and with quic);
format check; GCC preset `quic` CTest 4/4, session tests 10/10 repeated; Clang 19 ASan/UBSan
session and network tests; Windows MSVC 19.44 preset `quic` build and CTest 4/4 (binaries
rebuilt, timestamps checked).
Not done: evo-server wiring, headless client and process kill tests with real sessions
(10.4c); ASan of the PostgreSQL suite; a real two-region move with a pending action.