Expand description
Context state nodes: non-deterministic, session-scoped values.
These nodes produce values from the execution environment rather than the coordinate space. They break the deterministic model and should be used deliberately.
SRD-80b Phase E migration. All authoring goes through
#[polydat_node]. Three shapes appear here:
- Pure clock / OS reads (
current_epoch_millis,thread_id) — plain body, markedNondeterministic. - Construction-frozen captures (
session_start_millis,elapsed_millis,tmp_dir,env_or) — use#[poly_const(setup_fn, from = ())](orfrom = <const_arg>when the capture depends on a const) to compute the cached value once at construction. The body just reads the cache. - Fallible construction (
env) — body returnsResult<String, String>. The macro emitstry_newand propagatesErras a workload-compile error via the build closure.
Structs§
- Counter
- Monotonic counter (non-deterministic). SRD-80 PR B.11 migration.
- Current
Epoch Millis - Current wall-clock time in epoch milliseconds.
- Cursor
Limit - Cursor limit node: passes through the input value unchanged.
- Elapsed
Millis - Elapsed milliseconds since session start.
- Env
- Environment variable read, frozen at construction.
- EnvOr
- Environment variable read with default, frozen at construction.
- Session
Start Millis - Session start time in epoch milliseconds, frozen at construction.
- Thread
Id - Current OS thread numeric identifier.
- TmpDir
- System temp directory, frozen at construction.
Functions§
- signatures
- Signature for the cursor-limit passthrough.