# 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 | 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.