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 (
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.
- Env
- Environment variable read, frozen at construction.
- EnvOr
- Environment variable read with default, frozen at construction.
- Limit
- Cursor limit: passes the input value through unchanged.
- Thread
Id - Current OS thread numeric identifier.
- TmpDir
- System temp directory, frozen at construction.