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
66
// Copyright 2024-2026 Jonathan Shook
// SPDX-License-Identifier: Apache-2.0
//! The nodes that ship with the runtime: the adapters, passthroughs,
//! constants, assertions, and tile nodes the compiler synthesizes, the
//! formatting/JSON/data-file/diagnostic/context/logging nodes, and the
//! library-internal support.
//!
//! - The standard function nodes (`arithmetic`, `string`, `hash`, …)
//! live in `polydat-nodes` and register through inventory at link
//! time; they are [`crate::ast::PolydatNode`] implementations like
//! the ones here.
//! - [`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.