nx_catn_kat_gate.nx
buildroot/runtime/nx_catn_kat_gate.nx
about
nx_catn_kat_gate.nx -- THE NUMBER FORMATTER RENDERS NEGATIVES. PROVEN, NOT EDITED-AND-ASSUMED.
ta_catn had `while m > 0` with no negative branch, so a negative emitted ZERO CHARACTERS and the
MCP transport produced malformed JSON: `"exit_code":,"bytes":0`. A timed-out exec returns a
negative rc, so the one value it could not print was the one that appears only when something has
already gone wrong -- and the caller could not tell "timed out" from "dead tool".
This KAT calls the REAL ta_catn from nx_tools_api.nx (a lib, no main, so it is importable) and
pins its output. It proves the SOURCE is correct independently of whether the daemon carrying it
has been deployed -- two different claims that were being conflated.
★ THE DECISIVE TOOTH IS THE LENGTH ONE: the defect produced exactly ZERO bytes, so asserting that
-1 renders as TWO characters is the direct regression assertion. A tooth that only checked the
digits would pass on an empty buffer left over from a previous test.
license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: syscalls.nxnx_tools_api.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
| none |
functions
| 20 | func kat_eq(b: *u8, n: i64, want: *u8) -> i64 called by 1: main |
| 29 | func main() -> i64 |