code wiki / (root) / nx_catn_kat_gate.nx

nx_catn_kat_gate.nx

buildroot/runtime/nx_catn_kat_gate.nx

3852 B79 linesdepth 9pulls 34 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

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

syscalls.nx nx_tools_api.nx nx_gate_verdict.nx nx_catn_kat_gate.nx

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ ta_catn gv_check gv_puts ↻ kat_eq gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n gv_at ↻ gv_puts ↻ gv_num ↻ gv_puts ↻ gv_num ↻ gv_journal

structs

none

consts

none

functions

20func kat_eq(b: *u8, n: i64, want: *u8) -> i64
called by 1: main
29func main() -> i64