nx_paramplumb.nx
buildroot/runtime/nx_paramplumb.nx
about
nx_paramplumb.nx -- FIND PARAMETERS THAT WERE ADDED BUT NEVER PLUMBED THROUGH.
THE DEFECT CLASS, measured three times in one day and invisible to every gate each time:
* nx_gsplat's viewport became a parameter (gs_render_aniso_at) -- but nx_gsplat_tile_lib's
gt_render kept reading gs_w()/gs_h(), the MODULE DEFAULTS, in six places. The tiled path could
only ever partition a 512x384 frame. Its gate was 12/12 GREEN the whole time, because every
test ran at the default.
* nx_skeleton's evaluator was gated GREEN at 32 bones against a 104-370 joint corpus.
* a surface gate's mutant survived because its fixture never exercised the changed path.
****** A PARAMETER THAT WAS ADDED BUT NOT PLUMBED IS INVISIBLE TO EVERY GATE, BECAUSE EVERY TEST
STILL PASSES AT THE DEFAULT -- THE PROOF IS TRUE AND SCOPED TO A SIZE NOBODY SHIPS. That is worse
than an absent capability: an absent one is counted as missing, this one is counted as DONE.
WHAT IT DETECTS -- the estate's own parameterisation idiom, so the signature is exact rather than
a guess. When a module-scope default becomes a parameter, this tree writes:
func X_at(..., <the new parameters>) -> i64 { ...the real body... }
func X(...) -> i64 { return X_at(..., <the module defaults>) } // thin wrapper
The wrapper is correct and keeps existing callers working. The DEFECT is a caller that had the
quantity available and still called X. So: for every confirmed X / X_at pair, count the call sites
of the DEFAULTED name X. Each one is a path through which the new capability is unreachable.
WHY "_at" ALONE IS NOT THE TEST. "_at" is also this tree's index-accessor idiom
(nx_artifact_store_path_at(s, rowid)), which is a different thing entirely. A pair only counts
when BOTH func X( and func X_at( are declared, so an accessor with no defaulted twin is never
reported. That exclusion is the difference between a detector and a grep.
COVERAGE IS PART OF THE ANSWER. The walk reports files seen, files read and files it could not
read, and those must sum. An absence claimed from a partial scan is not an absence -- this organ
was written because a lane (mine) claimed one from a filtered grep earlier today and was wrong.
NOTHING HERE IS RANKED BY A PICKED THRESHOLD: the report is ordered by defaulted-call count, which
IS the blast radius, and every count is printed so the reader adjudicates rather than trusting a cutoff.
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.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
| 38 | const PB_W64: i64 = 8 |
| 39 | const PB_DIRBUF: i64 = 65536 |
| 40 | const PB_NAMEMAX: i64 = 64 // longest function name this tree actually uses; over-long names are COUNTED and reported, never silently dropped |
functions
| 42 | func pb_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: main |
| 45 | func pb_ident(c: i64) -> i64 called by 1: main |
| 54 | func pb_find(hay: *u8, hlen: i64, ned: *u8, nlen: i64, from: i64) -> i64 called by 1: main |
| 71 | func pb_lookup(bases: *u8, nbases: i64, buf: *u8, s: i64, l: i64) -> i64 called by 1: main |
| 94 | func main(argc: i64, argv: *i64) -> i64 |