loom_epoch - the deterministic between-session Epoch world-tick (Rust core).
v3.0 Phase 3 (Living Persistent World). The native sibling of the TS
src/runtime/world-epoch.ts. While a player is offline the world must keep
moving - factions act, regions shift - WITHOUT the session/combat PRNG and
WITHOUT any non-determinism, so the browser client and the authoritative
server arrive at the BYTE-IDENTICAL world-state hash for the same epoch.
THE THREE GUARANTEES (all cross-language byte-parity, pinned by test_vectors/v3_3_epoch_tick.json):
-
PRNG ISOLATION. The Epoch PRNG is seeded from SHA-256(UTF8(world_id) || LE64(epoch_number)) - a fresh, PUBLIC derivation that never touches the session PRNG. digest[0..8] LE -> state, digest[8..16] LE |1 -> inc, built straight into
Pcg32::from_rawwith NO seeding steps. -
DETERMINISTIC ORDER + FAIL-CLOSED RESOLUTION. Offline actors are the entities carrying an actor tag; they resolve in
compare_idsorder. A proposal naming an unknown action, or failing AST validation, or erroring mid-eval is REJECTED and consumes ZERO prng + ZERO state change (prng snapshot/restore + the AST's clone-not-mutate contract). Reason codes are assigned HERE at fixed decision points - never parsed from error text - so they are identical on every surface. -
BOUNDED COST.
tick_epochcaps SUCCESSFUL resolutions atmax_actions;catch_up_epochscaps replayed epochs atmax_catchup. Both are PARAMETERS, never hardcoded.