code wiki / _hdl_build / nx_vacuity_census.nx
nx_vacuity_census.nx
buildroot/runtime/_hdl_build/nx_vacuity_census.nx
about
nx_vacuity_census.nx -- WHICH RENDER-GATES CANNOT SEE A MISSING FEATURE AT ALL.
THE DEFECT IT MEASURES, from a real one caught 2026-08-14. nx_wasm_craft_gate passed 58/58 while the
game had NO CHARACTERS IN THE PICTURE. Its mob teeth (T16/T17/T28/T29) assert the girls exist in
STATE; its frame teeth (T3/T19/T23) assert the frame has colour VARIETY. Both are true of a frame
with every character missing, because the terrain alone satisfies them. The renderer had started
writing one pixel per ray while mob_draw still projected into the framebuffer CEILING, so every girl
landed outside the written region -- and not one tooth could tell.
THE EXACT PREDICATE, and it is a PROOF rather than a heuristic: to detect that feature X is absent
from a picture, a gate must hold TWO frames that differ only in X and compare them. A gate that
renders EXACTLY ONCE cannot do that -- there is no second frame to compare against.
⚠WHAT THIS IS AND IS NOT. It is a STRONG CANDIDATE FILTER, not a proof. v1 of this header called
render_calls==1 a sound certificate with no false negatives; that was wrong twice over, and both
corrections are recorded here rather than quietly edited away:
1. a call SITE is not a render -- one site inside a helper main invokes N times is N renders
(nx_wasm_mineworld_gate, which v1 wrongly accused). FIXED: each site is multiplied by its
enclosing function's invocation count.
2. an invocation inside a LOOP is one static site but many runtime renders, and this organ does
no brace matching, so such a gate still reads as 1. That is the remaining false-positive
class and it is NOT fixed -- read the gate before acting on its row.
The converse was never claimed and still is not: a gate that renders MANY times can be just as
blind. nx_wasm_craft_gate rendered dozens of times and still could not see that every character
was missing, because it never compared two frames differing only in the characters.
Both directions land in the same place: this names candidates, and nx_gate_bite decides.
WHY THIS IS TRIAGE AND NOT A SECOND RULER: nx_gate_bite mutates the SUBJECT and rebuilds it. For
nx_wasm_craft that is ~30 minutes per mutant, so it can never sweep a fleet. This census is static
and instant, and its whole job is to tell the expensive instrument where to spend. Composition,
not duplication -- the same reason the estate has one line-differ and many tallies.
DECLARED IMPRECISION (so the next reader does not trust it as exact):
- a gate that renders through a wrapper it defines itself counts as 0 render calls
- a backslash-escaped quote inside a string literal is not tracked, so a token inside such a
string could be counted as code
- the token list below is the render entries this estate actually uses; a new render entry must
be added here or its gates read as NOT-A-RENDER-GATE
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 41 | const VC_DIRBUF: i64 = 131072 |
| 42 | const VC_NAMEBUF: i64 = 4096 |
| 43 | const VC_MAXSHOW: i64 = 60 // printed worklist head; the COUNTS are always the full population |
| 44 | const VC_CH_NL: i64 = 10 |
| 45 | const VC_CH_SP: i64 = 32 |
| 46 | const VC_CH_QUOTE: i64 = 34 |
| 47 | const VC_CH_SLASH: i64 = 47 |
| 51 | const VC_MIN_GATES: i64 = 200 |
| 55 | const VC_CONF: *u8 = "knowledge/status/vacuity.conf" |
| 124 | const VC_MAXFN: i64 = 1024 |
functions
| 57 | func vc_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 58 | func vc_num(v: i64) -> i64 |
| 76 | func vc_is_gate(nm: *u8) -> i64 called by 1: vc_scan_dir |
| 92 | func vc_match(b: *u8, n: i64, p: i64, t: *u8) -> i64 called by 1: vc_scan_buf |
| 108 | func vc_after_func(b: *u8, p: i64) -> i64 |
| 130 | func vc_tables() -> i64 |
| 139 | func vc_name_end(b: *u8, n: i64, s: i64) -> i64 called by 1: vc_scan_buf |
| 151 | func vc_eq(b: *u8, a: i64, alen: i64, p: i64, n: i64) -> i64 called by 1: vc_invocations |
| 159 | func vc_isword(c: i64) -> i64 called by 1: vc_invocations |
| 169 | func vc_invocations(b: *u8, n: i64, a: i64, alen: i64) -> i64 |
| 203 | func vc_is_main(b: *u8, a: i64, alen: i64) -> i64 called by 1: vc_scan_buf |
| 222 | func vc_scan_buf(b: *u8, n: i64, out: *i64) -> i64 called by 1: vc_scan_file calls 6: vc_tablesvc_matchvc_name_endvc_after_funcvc_is_mainvc_invocations |
| 304 | func vc_scan_file(path: *u8, out: *i64) -> i64 |
| 313 | func vc_scan_dir(dir: *u8, nbuf: *u8, out: *i64, tal: *i64, shown: *i64) -> i64 |
| 364 | func vc_write_fixture(path: *u8, body: *u8) -> i64 |
| 377 | func vc_selftest() -> i64 |
| 456 | func vc_read_floor() -> i64 |
| 472 | func vc_write_floor(v: i64) -> i64 |
| 490 | func main(argc: i64, argv: *i64) -> i64 |