Files
aevolution/schemas/probe-handoff-v1.md
dingoandClaude Opus 5.5 265163a9a6
Foundation / checks (deploy) (push) Successful in 3m20s
Foundation / checks (ecs) (push) Successful in 1m57s
Foundation / checks (client) (push) Failing after 10m4s
Foundation / checks (network) (push) Successful in 13m3s
Foundation / checks (tsan) (push) Successful in 7m53s
Foundation / checks (checks) (push) Successful in 32m18s
Foundation / checks (postgres) (push) Successful in 43m26s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
Add M10.8d two-process handoff fault matrix and recovery fixes
ADR-0096. Two real evo-server processes on PostgreSQL (regions 7/161 and
7/162, adjacent areas) run crossings and crossings back, SIGKILL of the
source after prepare and of the destination after stage and after commit,
duplicate and stale ticket retries, a client that never arrives and a
destination that is down. After every scenario SQL checks one owner per
probe, the conserved inventory and frozen-iff-open-transfer.

The matrix found two recovery gaps, now fixed:
- a source restarted after a prepare left the probe frozen for good (its
  abort deadline was in memory): schema v14 overdue_probe_transfers and a
  session-layer sweep abort open outgoing transfers past the ticket
  lifetime plus 10 s by the database clock;
- a ticket replayed at a restarted destination after the probe moved on
  took control back: admission of a committed transfer now requires the
  record as that commit left it.

M10.8 is complete. Refreshes the dev session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:17:49 -04:00

2.5 KiB

Probe records and handoff, version 1

EXPERIMENT (ADR-0094, ADR-0096; schema v12, migrations/0012_probe_handoff.sql). Durable state of the non-biological probes and their cross-region transfers. It is reached only through the fenced functions, and C++ callers use include/evo/persistence/probe_store.hpp.

Probe record (evolution.probe_records, one per world and account)

Field Type Rule
region_id u64 The single owning region
generation u64 > 0; + 1 at each committed transfer
x, y bigint Micrometres
z bigint Cell slice
inventory u64 EXPERIMENT test inventory; never copied, only moved with ownership
transfer_id uuid or NULL The open transfer while frozen

Transfer (evolution.probe_transfers)

States:

  • prepared: source froze the record.
  • staged: destination accepted it under destination_epoch.
  • committed: ownership switched.
  • aborted: before commit only; the source resumes.

Each transfer keeps the record's generation at preparation, the source and destination regions, the source epoch and the final state (x, y, z, inventory). At most one transfer is open (prepared or staged) per record.

Calls

Each call is made under the caller's exact unexpired region lease.

Call By Effect
open_probe any region Creates the record owned by the caller if none exists; returns it
save_probe owner Position of the active (not frozen) record at its generation
prepare_probe_transfer owner Freezes the record and records the transfer (prepared)
stage_probe_transfer destination prepared or staged becomes staged under the caller's epoch
commit_probe_transfer destination staged by the caller's current epoch becomes committed: owner = destination, generation + 1, final state
abort_probe_transfer source or destination prepared or staged becomes aborted; the record is active at the source
find_probe_transfer any region The transfer as recorded
handoff_account_control destination Account control (v10) for a transfer committed to the caller
incoming_probe_transfers (v13) any region Open transfers addressed to the caller (ghosts), at most 256
overdue_probe_transfers (v14) source Caller's open outgoing transfers prepared more than the given age (1 s to 1 day) ago by the database clock, at most 256 (recovery aborts)

A retry with the same transfer id returns the recorded outcome. SQLSTATE: EVL13 fenced, EVL14 unknown transfer, EVL15 not staged by this epoch, EVL12 control handoff refused.