pub enum Mode {
Normal,
Sandbox,
}Expand description
Execution mode of a FlowLocal, baked in at construction/fork time and
read by ContextView to decide how it routes every unit.
Mode is orthogonal to WorldPolicy/ResolvedPolicy: policy homes a
unit (a global, a knot’s visit count, …) to World or Local; Mode
decides, for this flow, whether that homing is honored at all.
Variants§
Normal
Route every unit by policy, exactly as ContextView’s F2.2/F3.1
docs describe: World-scoped units go straight to World,
Local-scoped units chain-read-through/write to FlowLocal. Every
construction path before F3.2 produces Mode::Normal — this is what
keeps the oracle corpus byte-identical.
Sandbox
Treat every unit as Local, regardless of policy: the shared
World becomes a read-only base for this flow. Reads still
chain-read-through to World’s current value on a total miss (so a
sandboxed flow sees live world state), but writes always land in
this flow’s own top-layer overrides — World (and any Normal
ancestor) is never mutated. Combined with FlowLocal::fork’s
frozen base, this is the side-effect-proof primitive watch/eval
needs: run a flow against current state, observe its output, then
discard it (drop) with the shared world untouched.