nx_mcp_stdio_samepool_gate_t161.nx
buildroot/runtime/nx_mcp_stdio_samepool_gate_t161.nx
about
nx_mcp_stdio_gate.nx -- lane conn, 2026-09-11.
PROVES the connector's per-request failure semantics with REAL child processes, in-process (the
connector's main-bearing file cannot be imported, so the recovery + emit logic it drives lives in
nx_mcp_pending, which this gate imports directly):
* a worker that dies WITHOUT self-reporting (a crash, or the SIGALRM deadline that kills it) becomes
a CORRELATED JSON-RPC error for THAT id and the loop CONTINUES (mp_recover_pump returns >= 0);
* the emitted error carries the RIGHT id and the JSON-RPC error shape;
* a LATER request still succeeds after the failure;
* the deadline (death by SIGALRM) maps to the -32012 deadline error, not a generic one;
* mo_prefix_id extracts a top-level id from a truncated request prefix (string, number, truncated,
nested-only) -- the input to the oversized/malformed -32600 path;
* a NEG-CONTROL: a SUCCESSFUL worker is forwarded verbatim and NEVER decorated with an error.
BITE-PROVED MANUALLY (recorded in the lane transcript, not via a forked subject elf since the subject
is in-process): reverting the failed_slot mechanism so mp_recover_pump returns -1 on any rp_pump -1
makes failing-child-continues + later-request-succeeds go RED; restoring the fix returns them GREEN.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 2 imports · 0 importers
imports: nx_mcp_pending.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 g_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 25 | func g_contains(buf: *u8, n: i64, pat: *u8) -> i64 |
| 42 | func g_run_planted(p: *NxRequestPool, rows: *u8, control: *NxMcpControl, line: *u8, mode: i64, payload: *u8, buf: *u8, cap: i64, outn: *i64) -> i64 |
| 81 | func main() -> i64 |