nx_tools_api_regression_gate_t316.nx
buildroot/runtime/nx_tools_api_regression_gate_t316.nx
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
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
structs
| none |
consts
| none |
functions
| 22 | func tg_has(out: *u8, n: i64, needle: *u8) -> i64 { if ta_indexof(out, n, needle) >= 0 { return 1 } return 0 } |
| 24 | func tg_count(out: *u8, n: i64, needle: *u8) -> i64 called by 1: main |
| 39 | func tg_streq(p: i64, expect: *u8) -> i64 called by 1: main |
| 47 | func tg_slice_eq(buf: *u8, o2: *i64, expect: *u8) -> i64 called by 1: main |
| 55 | func tg_write(path: *u8, content: *u8) -> i64 called by 1: main |
| 63 | func main() -> i64 |