nx_stubmain_gate.nx
buildroot/runtime/nx_stubmain_gate.nx
about
nx_stubmain_gate.nx -- proves the stub-main ruler separates three states and does not invent a fourth.
PLANTED FIXTURES ALONE WOULD NOT CALIBRATE THIS. The estate has already measured that a detector
bite-proven on planted fixtures can carry a 941-permil false-positive rate on real data. So T5-T8 run
the ruler against REAL SOURCES IN THIS TREE whose correct answer is independently known:
nx_https_get.nx -> SM_STUB_MAIN (its own comment says `Compile-only smoke.`; measured 2026-09-03
to build 14,880 bytes against a 468,929-byte live binary)
nx_https_fetch.nx -> SM_NO_MAIN (nx_catalog independently reports `KIND LIB -- no top-level main()`)
nx_npy_gate.nx -> SM_REAL_MAIN (a program shipped and run GREEN on the NAS this session)
nx_stubmain_lib.nx -> SM_NO_MAIN (this ruler's own subject is a library)
A ruler that cannot classify the four sources whose answers are already known has no business
classifying the other 12,063.
THE FALSE-POSITIVE TOOTH IS T4, and it is the one that matters: a REAL main whose LAST statement is
`return 0` and which contains a nested block must read REAL. A "first closing brace" body-finder would
end the body early and report STUB -- turning a working program into a false ARMED row, and a false
ARMED on this axis sends a seat to disarm something that is fine, which is how detectors get ignored.
license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_stubmain_lib.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
| 24 | const SG_CAP: i64 = 8192 |
functions
| 26 | func sg_put(b: *u8, o0: i64, s: *u8) -> i64 called by 1: main |
| 33 | func main() -> i64 |