code wiki / (root) / nx_tools_api_regression_gate_t316.nx

nx_tools_api_regression_gate_t316.nx

buildroot/runtime/nx_tools_api_regression_gate_t316.nx

26273 B350 linesdepth 9pulls 35 transitivereach 0 importersview sourcekind tooltopic tools
docsdependenciesstructsconstsfunctions

about

nx_tools_api_gate.nx -- drives ta_handle_pfx IN-PROCESS (no socket, no curl): register two test tools, then assert the REST surface (/api/tools) and the MCP surface (/mcp: tools/list, initialize, error) are well-formed. Proves R0 = MCP-compatible + superset, sovereignly. license_tier: ORIGINAL D001 MIGRATION 2026-08-25. This gate used to hand-roll pass/tot and sys_exit(0|1) while printing NO verdict= line at all, so nx_gate_green read it UNJUDGEABLE and /api/gate_run could not report on it. It now inherits nx_gate_verdict: one gv_check per tooth, so declared == executed BY CONSTRUCTION and the counter moves by itself when a tooth is added. Every tooth condition is byte-for-byte the one it had before the migration; only the counting and the verdict emission changed. WHY THIS MATTERED MORE THAN THE USUAL D001 ROW: the migration forces a rebuild, and a rebuild is the only thing that relinks nx_tools_api.nx. The PROMOTED binary (331,191 B) still carried the pre-fix job-start text "poll: nx_fs read _jobs/job_<id>.done (absent = RUNNING)" while the production daemon has been emitting "Do NOT wait on .done: current jobs do not write it." -- so the live gate was scoring 25/25 against a STALE in-process copy of the very library it exists to test. *A GATE LINKED AGAINST A FROZEN COPY OF ITS SUBJECT REPORTS ON THE COPY, AND ITS GREEN NAMES THE WRONG SUBJECT.* The freshness of an in-process gate is a property of its BUILD, not of its source.

dependencies 3 imports · 0 importers

nx_tools_api_recovery_candidate_t3 nx_gate.nx nx_gate_verdict.nx nx_tools_api_regression_gate_t

imports: nx_tools_api_recovery_candidate_t316.nxnx_gate.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 ↻ tool_register_pfx tr_cat tr_tab reg_put reg_put_x sts_lock sts_mm sys_mmap ↻ sts_werr sys_exit ↻ ss_cat sys_openat_append sts_werr ↻ sys_flock reg_key reg_cat ss_get sys_mmap ↻ ss_scan sys_mmap ↻

structs

none

consts

none

functions

22func tg_has(out: *u8, n: i64, needle: *u8) -> i64 { if ta_indexof(out, n, needle) >= 0 { return 1 } return 0 }
called by 1: main calls 1: ta_indexof
24func tg_count(out: *u8, n: i64, needle: *u8) -> i64
called by 1: main
39func tg_streq(p: i64, expect: *u8) -> i64
called by 1: main
47func tg_slice_eq(buf: *u8, o2: *i64, expect: *u8) -> i64
called by 1: main
55func tg_write(path: *u8, content: *u8) -> i64
called by 1: main
63func main() -> i64