code wiki / _hdl_build / nx_inputprobe.nx
nx_inputprobe.nx
buildroot/runtime/_hdl_build/nx_inputprobe.nx
about
nx_inputprobe.nx -- WOULD THIS PRODUCER MEASURE A REAL WORLD FROM HERE?
★WHY (earned the hard way 2026-08-08, TWICE IN ONE SESSION, the second time after writing the law
down). A producer that reads CWD-RELATIVE resource paths does not fail loudly when run from the wrong
context -- it writes a CONFIDENT FALSE MEASUREMENT, and every freshness instrument then certifies that
false row as healthy:
nx_security_census wrote coverage_permil=87 over a true 456 (security FUNCTIONAL->TOY, 450->442)
because sc_have was a bare relative open.
nx_game_gen2 wrote types_available=0 verdict=RED over a true 6/GREEN
because gg_build_fsm reads knowledge/specs/build_<typ>.spec.
Both were caught only AFTER they had appended to the very log the maturity rollup grades from.
★★A STALE-BUT-TRUE ROW IS WORTH MORE THAN A FRESH-BUT-FALSE ONE, AND ONLY A PRECHECK CAN TELL YOU
WHICH ONE YOU ARE ABOUT TO WRITE. Refreshing evidence is not automatically an improvement.
So: extract every relative path literal from a producer's SOURCE and ask ar_resolve -- the estate's ONE
artifact-root resolver -- whether it resolves FROM THIS PROCESS'S WORKING DIRECTORY, which is the same
context the producer will run in.
⚠SCOPE, STATED RATHER THAN HIDDEN: this CANNOT distinguish an INPUT the organ must read from an OUTPUT
it will create -- an append target legitimately need not exist yet. It therefore reports EVERY relative
path with its status and leaves the judgement to the caller. Erring toward flagging is deliberate: the
failure it prevents is a false PUBLISHED GRADE; the cost of a false flag is one human read.
⚠It reads the SOURCE, so it sees literals, not computed paths. A path assembled at runtime from pieces
is invisible to it. That is a floor on what it can catch, not a claim of completeness.
nx_inputprobe <source.nx>
exit: 0 ALL-RESOLVE | 1 UNRESOLVED (do not trust a measurement written from here)
2 usage | 3 NO-CONCLUSION (source unreadable, or the literal cap was hit -- never reported clean)
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_artifact_root.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 33 | const IP_SRC_CAP: i64 = 1048576 |
| 34 | const IP_PATH_CAP: i64 = 512 |
| 35 | const IP_MAX_LIT: i64 = 1024 |
| 36 | const IP_EXIT_UNRESOLVED: i64 = 1 |
| 37 | const IP_EXIT_USAGE: i64 = 2 |
| 38 | const IP_EXIT_NOCONCLUDE: i64 = 3 |
functions
| 40 | func ip_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 41 | func ip_putn(v: i64) -> i64 |
| 57 | func ip_is_relpath(s: *u8, n: i64) -> i64 called by 1: main |
| 77 | func main(argc: i64, argv: *i64) -> i64 |