1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright 2024-2026 Jonathan Shook
// SPDX-License-Identifier: Apache-2.0
//! Standard Polydat function-node library + sampling primitives + library-internal support.
//!
//! - Function-node modules (`arithmetic`, `string`, `hash`, …):
//! the 250+ built-in [`crate::ast::PolydatNode`] implementations
//! workload authors compose into kernels.
//! - `polydat_nodes::sampling`: alias tables, LUT interpolation, ICD —
//! variate-sampling building blocks consumed by
//! distribution-emitting nodes (weighted, probability, etc.).
//! - [`support`]: library-internal infrastructure
//! ([`support::cache`], [`support::audit`]) used by nodes
//! like `vectors` for caching dataset handles and
//! diagnosing data-source mismatches.
/// Env-gated debug-level diagnostic for selection / matching nodes.
///
/// Returns true when `NBRS_DEBUG_NODES` is set to a non-empty,
/// non-`"0"` value. Cached on first read so the variable can be set
/// once at process start and the per-cycle check is a load.
///
/// Used by `regex_match`, `exactly_one_value`, and `pick` to emit
/// pre-eval / pre-panic context (input shape, match result, selector
/// states) when probe phases produce surprising values. The user's
/// expected workflow:
///
/// ```sh
/// NBRS_DEBUG_NODES=1 nbrs run my-workload …
/// ```
///
/// then read the stderr trace to see what each matching node saw.