nx_mgmt_gaterun_gate.nx source
↩ module page · 304 lines · 18527 B
1// nx_mgmt_gaterun_gate.nx -- GATE for the control plane's two lane-J fixes (2026-08-23):
2// D1 /api/gate_run PROMOTES a gate that outruns its deadline onto the job lane (JOB-STARTED + .claim +
3// .out, the worker kept ALIVE and reaped by the handler for its REAL exit code) instead of SIGKILLing
4// it and answering verdict=TIMEOUT -- the absence of a verdict dressed as one. Measured 2026-08-23:
5// nx_chkarith_gate / nx_boundscheck_gate read TIMEOUT under load while nx_job_run of the same
6// binaries returned 17/17 and 11/11 GREEN.
7// D2 /api/promote refuses ONE CONJUNCT AT A TIME, by name (NOTHING-STAGED with the path it looked at;
8// UNDECLARED-KIND with the conf to edit; DECLARED-DAEMON with the deploy call), where one 400 text
9// used to cover all of them and a consumed stage read as "undeclared kind" (lane F, same day).
10// SHAPE: the incumbent nx_mgmt_api_gate's -- SOVEREIGN and IN-PROCESS. It imports the daemon's own
11// source and drives the HANDLER FUNCTIONS (ma_do_gate_run / ma_do_promote / ma_promote_refuse /
12// ma_gate_run_finish) with crafted request bytes: TEST THE SUBJECT, NOT THE ROUTE THAT HAPPENS TO REACH
13// IT (a synthetic session has level 0 in production and every privileged route 403s before its handler).
14// FIXTURES never touch a production plane: the daemon's seam ma_gr_set_fixture points the elf root at
15// _build/nxgr_<pid>/ (runnable: NAS /tmp is noexec), the jobs dir and the window conf at /tmp/<gate>/.
16// ONE fixture organ (runtime/nx_gaterun_fixture_test.nx) is compiled once and copied under four names;
17// it keys on its own name because gate_run passes no argv.
18// license_tier: ORIGINAL
19import "nx_mgmt_api.nx"
20import "nx_gate_verdict.nx"
21import "nx_ccgate_lib.nx" // ccg_build / ccg_path / ccg_file_has / ccg_anchor_root / ccg_pid -- THE compiler-gate driver
22
23const GJ_DIR: *u8 = "/tmp/nx_mgmt_gaterun_gate\x00" as *u8
24const GJ_SHORT_DEADLINE_MS: i64 = 1000 // == the handler's deadline floor; the slow fixture sleeps 2500 ms, so it is mid-run here
25const GJ_FIX_WINDOW_MS: i64 = 3000 // fixture edge_window.conf: window
26const GJ_FIX_RESERVE_MS: i64 = 500 // fixture edge_window.conf: reserve -> the handler must print window - reserve, src conf
27const GJ_OUTCAP: i64 = 65536
28const GJ_REQCAP: i64 = 4096
29
30func gj_has(hay: *u8, n: i64, needle: *u8) -> i64 {
31 var nl: i64 = 0
32 while needle[nl] != (0 as u8) { nl = nl + 1 }
33 if nl == 0 { return 0 }
34 var i: i64 = 0
35 while i + nl <= n {
36 var k: i64 = 0
37 var m: i64 = 1
38 while k < nl { if hay[i + k] != needle[k] { m = 0; k = nl } else { k = k + 1 } }
39 if m == 1 { return 1 }
40 i = i + 1
41 }
42 return 0
43}
44// first integer after `key` inside buf[0..n), or -1
45func gj_int_after(buf: *u8, n: i64, key: *u8) -> i64 {
46 var kl: i64 = 0
47 while key[kl] != (0 as u8) { kl = kl + 1 }
48 var i: i64 = 0
49 while i + kl <= n {
50 var k: i64 = 0
51 var m: i64 = 1
52 while k < kl { if buf[i + k] != key[k] { m = 0; k = kl } else { k = k + 1 } }
53 if m == 1 {
54 var p: i64 = i + kl
55 var v: i64 = 0
56 var seen: i64 = 0
57 var go: i64 = 1
58 while go == 1 {
59 if p >= n { go = 0 } else {
60 let c: i64 = buf[p] as i64
61 if c >= 48 { if c <= 57 { v = v * 10 + (c - 48); seen = 1; p = p + 1 } else { go = 0 } } else { go = 0 }
62 }
63 }
64 if seen == 1 { return v }
65 return 0 - 1
66 }
67 i = i + 1
68 }
69 return 0 - 1
70}
71func gj_write(path: *u8, s: *u8) -> i64 {
72 let fd: i64 = sys_openat_wr(path, MODE_0644)
73 if fd < 0 { return 0 - 1 }
74 var n: i64 = 0
75 while s[n] != (0 as u8) { n = n + 1 }
76 sys_write(fd, s, n)
77 sys_close(fd)
78 return 0
79}
80// copy a built fixture under another name, executable (mode is part of the file, not decoration)
81func gj_copy_exec(src: *u8, dst: *u8) -> i64 {
82 let szp: *i64 = sys_mmap(16) as *i64
83 let b: *u8 = sys_read_file(src, szp)
84 if (b as i64) == 0 { return 0 - 1 }
85 let fd: i64 = sys_openat_wr(dst, MODE_0644)
86 if fd < 0 { return 0 - 2 }
87 sys_write(fd, b, szp[0])
88 sys_close(fd)
89 nx_chmod(dst, MODE_0755)
90 return 0
91}
92func gj_req(buf: *u8, route: *u8, body: *u8) -> i64 {
93 var n: i64 = gv_cat(buf, 0, "POST " as *u8)
94 n = gv_cat(buf, n, route)
95 n = gv_cat(buf, n, " HTTP/1.1\r\nHost: x\r\n\r\n" as *u8)
96 n = gv_cat(buf, n, body)
97 buf[n] = 0 as u8
98 return n
99}
100// "<pfx><pid><sfx>" with the pid rendered by gv_catn (ccg_path does the same; this one takes a base dir too)
101func gj_name(base: *u8, pfx: *u8, pid: i64, sfx: *u8) -> *u8 {
102 let b: *u8 = sys_mmap(512)
103 var o: i64 = gv_cat(b, 0, base)
104 o = gv_cat(b, o, pfx)
105 o = gv_catn(b, o, pid)
106 o = gv_cat(b, o, sfx)
107 b[o] = 0 as u8
108 return b
109}
110func gj_read_small(path: *u8, cap: i64, out: *u8) -> i64 {
111 let szp: *i64 = sys_mmap(16) as *i64
112 let b: *u8 = sys_read_file(path, szp)
113 if (b as i64) == 0 { return 0 }
114 var n: i64 = szp[0]
115 if n > cap { n = cap }
116 var i: i64 = 0
117 while i < n { out[i] = b[i]; i = i + 1 }
118 return n
119}
120
121func main() -> i64 {
122 ccg_anchor_root()
123 let pid: i64 = ccg_pid()
124 sys_mkdir(GJ_DIR, MODE_0755)
125 let root: *u8 = gj_name("_build/nxgr_\x00" as *u8, "" as *u8, pid, "/\x00" as *u8)
126 let rootdir: *u8 = gj_name("_build/nxgr_\x00" as *u8, "" as *u8, pid, "\x00" as *u8)
127 sys_mkdir(rootdir, MODE_0755)
128 let jobs: *u8 = gj_name(GJ_DIR, "/jobs_\x00" as *u8, pid, "\x00" as *u8)
129 let conf: *u8 = gj_name(GJ_DIR, "/edge_window_\x00" as *u8, pid, ".conf\x00" as *u8)
130 let confabs: *u8 = gj_name(GJ_DIR, "/edge_window_absent_\x00" as *u8, pid, ".conf\x00" as *u8)
131 let conftxt: *u8 = sys_mmap(256)
132 var ct: i64 = gv_cat(conftxt, 0, "# fixture of nx_mgmt_gaterun_gate -- NOT the production edge_window.conf\nedge_window_ms \x00" as *u8)
133 ct = gv_catn(conftxt, ct, GJ_FIX_WINDOW_MS)
134 ct = gv_cat(conftxt, ct, "\nreply_reserve_ms \x00" as *u8)
135 ct = gv_catn(conftxt, ct, GJ_FIX_RESERVE_MS)
136 ct = gv_cat(conftxt, ct, "\n\x00" as *u8)
137 conftxt[ct] = 0 as u8
138 gj_write(conf, conftxt)
139
140 let ctr: *i64 = gv_ctr()
141 gv_head("=== nx_mgmt_gaterun_gate -- /api/gate_run promotes past its deadline (real exit code, no TIMEOUT-kill); /api/promote refuses one named conjunct at a time ===" as *u8)
142
143 // ---- build the ONE fixture organ with the live toolchain, then copy it under the names the teeth need ----
144 let cc: *u8 = "_offc/nx_cc_sovereign.elf\x00" as *u8
145 let p_s: *u8 = ccg_path("/tmp/nx_mgmt_gaterun_gate/fx_\x00" as *u8, pid, ".s\x00" as *u8)
146 let p_e: *u8 = ccg_path("/tmp/nx_mgmt_gaterun_gate/fx_\x00" as *u8, pid, ".err\x00" as *u8)
147 let p_asm: *u8 = ccg_path("_build/nxgr_asm_\x00" as *u8, pid, ".elf\x00" as *u8)
148 let nm_fast: *u8 = gj_name("" as *u8, "nxgr_xfastx_\x00" as *u8, pid, "_test\x00" as *u8)
149 let nm_slow: *u8 = gj_name("" as *u8, "nxgr_xslowx_\x00" as *u8, pid, "_test\x00" as *u8)
150 let nm_red: *u8 = gj_name("" as *u8, "nxgr_xredx_\x00" as *u8, pid, "_test\x00" as *u8)
151 let nm_slowred: *u8 = gj_name("" as *u8, "nxgr_xslowx_xredx_\x00" as *u8, pid, "_test\x00" as *u8)
152 let elf_fast: *u8 = gj_name(root, "nxgr_xfastx_\x00" as *u8, pid, "_test.elf\x00" as *u8)
153 let elf_slow: *u8 = gj_name(root, "nxgr_xslowx_\x00" as *u8, pid, "_test.elf\x00" as *u8)
154 let elf_red: *u8 = gj_name(root, "nxgr_xredx_\x00" as *u8, pid, "_test.elf\x00" as *u8)
155 let elf_slowred: *u8 = gj_name(root, "nxgr_xslowx_xredx_\x00" as *u8, pid, "_test.elf\x00" as *u8)
156 let bfx: i64 = ccg_build(cc, 0 as *u8, "runtime/nx_gaterun_fixture_test.nx\x00" as *u8, p_s, elf_fast, p_e, p_asm)
157 ccg_val("fixture_build_rc" as *u8, bfx)
158 var copied: i64 = 0
159 if bfx == 0 {
160 if gj_copy_exec(elf_fast, elf_slow) == 0 { copied = copied + 1 }
161 if gj_copy_exec(elf_fast, elf_red) == 0 { copied = copied + 1 }
162 if gj_copy_exec(elf_fast, elf_slowred) == 0 { copied = copied + 1 }
163 }
164 ccg_val("fixture_copies" as *u8, copied)
165 var t0: i64 = 0
166 if bfx == 0 { if copied == 3 { t0 = 1 } }
167 gv_check("T0 fixture-organ-builds-and-copies (the subject can be exercised at all)" as *u8, t0, ctr)
168 ma_gr_set_fixture(root, jobs, conf)
169
170 let req: *u8 = sys_mmap(GJ_REQCAP)
171 let out: *u8 = sys_mmap(GJ_OUTCAP)
172
173 // ---- T1 FAST: a gate that finishes inside the window answers inline, path named ----
174 var body1: *u8 = gj_name("target=\x00" as *u8, "nxgr_xfastx_\x00" as *u8, pid, "_test\x00" as *u8)
175 var n1: i64 = gj_req(req, "/api/gate_run\x00" as *u8, body1)
176 let o1: i64 = ma_do_gate_run(req, n1, out)
177 var t1: i64 = 0
178 if gj_has(out, o1, "HTTP/1.1 200\x00" as *u8) == 1 { if gj_has(out, o1, "\"path\":\"FAST\"\x00" as *u8) == 1 { if gj_has(out, o1, "\"verdict\":\"GREEN\"\x00" as *u8) == 1 { if gj_has(out, o1, "FAST-OK\x00" as *u8) == 1 { t1 = 1 } } } }
179 gv_check("T1 fast-gate-answers-inline-path-FAST-verdict-GREEN-transcript-present" as *u8, t1, ctr)
180 if t1 == 0 { gv_puts(" DIAG-T1 >>> " as *u8); var d1: i64 = o1; if d1 > 600 { d1 = 600 } sys_write(1, out, d1); gv_puts(" <<<\n" as *u8) }
181
182 // ---- T6 the deadline is the one-owner pair from the conf: (3000 - 500) = 2500, src=conf ----
183 let exp6c: *u8 = sys_mmap(128)
184 var e6c: i64 = gv_cat(exp6c, 0, "\"deadline_ms\":\x00" as *u8)
185 e6c = gv_catn(exp6c, e6c, GJ_FIX_WINDOW_MS - GJ_FIX_RESERVE_MS)
186 e6c = gv_cat(exp6c, e6c, ",\"deadline_src\":\"conf\"\x00" as *u8)
187 exp6c[e6c] = 0 as u8
188 var t6: i64 = 0
189 if gj_has(out, o1, exp6c) == 1 { t6 = 1 }
190 gv_check("T6 deadline-derived-from-edge_window.conf-window-minus-reserve-and-src-named-conf (no second constant)" as *u8, t6, ctr)
191 // neg-control: with the conf ABSENT the handler must say so (src=default) and print the lib's own fallback number
192 ma_gr_set_fixture(root, jobs, confabs)
193 let srcp: *i64 = sys_mmap(16) as *i64
194 let dflt: i64 = tea_sync_promote_ms_from(confabs, srcp)
195 let exp6: *u8 = sys_mmap(128)
196 var e6: i64 = gv_cat(exp6, 0, "\"deadline_ms\":\x00" as *u8)
197 e6 = gv_catn(exp6, e6, dflt)
198 e6 = gv_cat(exp6, e6, ",\"deadline_src\":\"default\"\x00" as *u8)
199 exp6[e6] = 0 as u8
200 let o6: i64 = ma_do_gate_run(req, n1, out)
201 var t6b: i64 = 0
202 if gj_has(out, o6, exp6) == 1 { if srcp[0] == TEA_SRC_DEFAULT { t6b = 1 } }
203 gv_check("T6b neg-control-absent-conf-announces-src-default-with-the-lib-fallback (a silent fallback is a fallback nobody can see)" as *u8, t6b, ctr)
204 ma_gr_set_fixture(root, jobs, conf)
205
206 // ---- T3 neg-control: a RED gate is reported RED inline (the fast path still carries the exit code) ----
207 var body3: *u8 = gj_name("target=\x00" as *u8, "nxgr_xredx_\x00" as *u8, pid, "_test\x00" as *u8)
208 var n3: i64 = gj_req(req, "/api/gate_run\x00" as *u8, body3)
209 let o3: i64 = ma_do_gate_run(req, n3, out)
210 var t3: i64 = 0
211 if gj_has(out, o3, "\"path\":\"FAST\",\"exit_code\":1\x00" as *u8) == 1 { if gj_has(out, o3, "\"verdict\":\"RED\"\x00" as *u8) == 1 { t3 = 1 } }
212 gv_check("T3 neg-control-red-gate-reported-RED-inline-exit-code-1" as *u8, t3, ctr)
213
214 // ---- T2 PROMOTED: a gate still running at the deadline gets a job handle, is NOT killed, and its REAL exit code lands ----
215 var body2: *u8 = gj_name("target=\x00" as *u8, "nxgr_xslowx_\x00" as *u8, pid, "_test&deadline_ms=1000\x00" as *u8)
216 var n2: i64 = gj_req(req, "/api/gate_run\x00" as *u8, body2)
217 let tstart: i64 = sys_now_ms()
218 let o2: i64 = ma_do_gate_run(req, n2, out)
219 let treply: i64 = sys_now_ms() - tstart
220 ccg_val("t2_reply_ms" as *u8, treply)
221 let jid: i64 = gj_int_after(out, o2, "\"job\":\x00" as *u8)
222 ccg_val("t2_job_id" as *u8, jid)
223 var t2: i64 = 0
224 if gj_has(out, o2, "\"path\":\"PROMOTED\"\x00" as *u8) == 1 { if gj_has(out, o2, "\"verdict\":\"PROMOTED\"\x00" as *u8) == 1 { if gj_has(out, o2, "\"deadline_src\":\"caller\"\x00" as *u8) == 1 { if jid > 0 { t2 = 1 } } } }
225 gv_check("T2 slow-gate-at-deadline-answers-JOB-STARTED-path-PROMOTED-with-a-job-id (the pre-fix daemon SIGKILLs it and answers TIMEOUT)" as *u8, t2, ctr)
226 if t2 == 0 { gv_puts(" DIAG-T2 >>> " as *u8); var d2: i64 = o2; if d2 > 700 { d2 = 700 } sys_write(1, out, d2); gv_puts(" <<<\n" as *u8) }
227 let pclaim: *u8 = sys_mmap(512)
228 let pout: *u8 = sys_mmap(512)
229 ma_gr_jobpath(pclaim, jid, ".claim\x00" as *u8)
230 ma_gr_jobpath(pout, jid, ".out\x00" as *u8)
231 var t2b: i64 = 0
232 if treply < 2 * GJ_SHORT_DEADLINE_MS { if ccg_file_has(pclaim, "state=CLAIMED\x00" as *u8) == 1 { t2b = 1 } }
233 gv_check("T2b reply-returned-at-the-deadline-not-after-the-gate-and-claim-reads-CLAIMED (the handle exists while the worker is alive)" as *u8, t2b, ctr)
234 // the HANDLER CHILD's tail, called here exactly as main's child calls it after the reply is on the wire
235 let frc: i64 = ma_gate_run_finish()
236 ccg_val("t2_finish_rc" as *u8, frc)
237 var t2c: i64 = 0
238 if frc == 0 { if ccg_file_has(pout, "SLOW-TAIL-OK\x00" as *u8) == 1 { t2c = 1 } }
239 gv_check("T2c promoted-gate-finished-alive-tail-sentinel-in-out-artifact-exit-0 (a killed worker can never write that byte)" as *u8, t2c, ctr)
240 var t2d: i64 = 0
241 if ccg_file_has(pclaim, "state=DONE rc=0 verdict=GREEN exit=REAPED\x00" as *u8) == 1 { t2d = 1 }
242 gv_check("T2d claim-rewritten-DONE-with-the-REAL-exit-code-and-verdict (reaped by the parent, never PROMOTED-UNREAPED)" as *u8, t2d, ctr)
243 var t2e: i64 = 0
244 if ma_gate_run_finish() == (0 - 1) { t2e = 1 }
245 gv_check("T2e neg-control-finish-with-nothing-pending-returns-minus-one (the tail cannot run twice)" as *u8, t2e, ctr)
246
247 // ---- T2f the load-bearing difference: a promoted gate that exits RED is recorded RED, not 0 ----
248 var body2f: *u8 = gj_name("target=\x00" as *u8, "nxgr_xslowx_xredx_\x00" as *u8, pid, "_test&deadline_ms=1000\x00" as *u8)
249 var n2f: i64 = gj_req(req, "/api/gate_run\x00" as *u8, body2f)
250 let o2f: i64 = ma_do_gate_run(req, n2f, out)
251 let jid2: i64 = gj_int_after(out, o2f, "\"job\":\x00" as *u8)
252 let frc2: i64 = ma_gate_run_finish()
253 ccg_val("t2f_finish_rc" as *u8, frc2)
254 let pclaim2: *u8 = sys_mmap(512)
255 ma_gr_jobpath(pclaim2, jid2, ".claim\x00" as *u8)
256 var t2f: i64 = 0
257 if jid2 > 0 { if frc2 == 1 { if ccg_file_has(pclaim2, "state=DONE rc=1 verdict=RED exit=REAPED\x00" as *u8) == 1 { t2f = 1 } } }
258 gv_check("T2f neg-control-promoted-RED-gate-records-rc-1-verdict-RED (the exit code survives promotion)" as *u8, t2f, ctr)
259
260 // ---- T4 promote: an oracle-suffixed name with NOTHING staged names the stage and the path, not the kind ----
261 var body4: *u8 = gj_name("target=\x00" as *u8, "nxgr_zz_\x00" as *u8, pid, "_test&confirm=yes\x00" as *u8)
262 var n4: i64 = gj_req(req, "/api/promote\x00" as *u8, body4)
263 let o4: i64 = ma_do_promote(req, n4, out)
264 let exp4: *u8 = gj_name("\"staged_path\":\"\x00" as *u8, "nxgr_zz_\x00" as *u8, pid, "_test.sov.elf.new\"\x00" as *u8)
265 var t4: i64 = 0
266 if gj_has(out, o4, "HTTP/1.1 400\x00" as *u8) == 1 { if gj_has(out, o4, "\"refusal\":\"NOTHING-STAGED\"\x00" as *u8) == 1 { if gj_has(out, o4, exp4) == 1 { if gj_has(out, o4, "/api/build target=\x00" as *u8) == 1 { t4 = 1 } } } }
267 gv_check("T4 promote-absent-stage-refuses-NOTHING-STAGED-naming-the-staged-path-and-the-build-fix" as *u8, t4, ctr)
268 if t4 == 0 { gv_puts(" DIAG-T4 >>> " as *u8); var d4: i64 = o4; if d4 > 700 { d4 = 700 } sys_write(1, out, d4); gv_puts(" <<<\n" as *u8) }
269 var t4b: i64 = 0
270 if gj_has(out, o4, "undeclared\x00" as *u8) == 0 { if gj_has(out, o4, "UNDECLARED\x00" as *u8) == 0 { t4b = 1 } }
271 gv_check("T4b neg-control-nothing-staged-never-mentions-undeclared-kind (the conflation is dead)" as *u8, t4b, ctr)
272
273 // ---- T5 promote: an undeclared, unsuffixed name names the KIND conjunct and the conf to edit ----
274 var body5: *u8 = gj_name("target=\x00" as *u8, "nxgr_zz_\x00" as *u8, pid, "_nokind&confirm=yes\x00" as *u8)
275 var n5: i64 = gj_req(req, "/api/promote\x00" as *u8, body5)
276 let o5: i64 = ma_do_promote(req, n5, out)
277 var t5: i64 = 0
278 if gj_has(out, o5, "HTTP/1.1 400\x00" as *u8) == 1 { if gj_has(out, o5, "\"refusal\":\"UNDECLARED-KIND\"\x00" as *u8) == 1 { if gj_has(out, o5, "knowledge/status/organ_kind.conf\x00" as *u8) == 1 { if gj_has(out, o5, "oneshot\x00" as *u8) == 1 { t5 = 1 } } } }
279 gv_check("T5 promote-undeclared-kind-refuses-UNDECLARED-KIND-naming-organ_kind.conf-and-the-row-to-add" as *u8, t5, ctr)
280 if t5 == 0 { gv_puts(" DIAG-T5 >>> " as *u8); var d5: i64 = o5; if d5 > 700 { d5 = 700 } sys_write(1, out, d5); gv_puts(" <<<\n" as *u8) }
281 var t5b: i64 = 0
282 if gj_has(out, o5, "staged\x00" as *u8) == 0 { if gj_has(out, o5, "STAGED\x00" as *u8) == 0 { t5b = 1 } }
283 gv_check("T5b neg-control-undeclared-kind-never-blames-the-stage (nothing on disk was inspected)" as *u8, t5b, ctr)
284 // the remaining conjuncts through the ONE renderer the route calls (a declared daemon cannot be declared
285 // without writing a production conf, so the renderer is the subject here)
286 let o5c: i64 = ma_promote_refuse(out, "nxgr_fixture_daemon\x00" as *u8, OK_DAEMON, OK_DAEMON)
287 var t5c: i64 = 0
288 if gj_has(out, o5c, "\"refusal\":\"DECLARED-DAEMON\"\x00" as *u8) == 1 { if gj_has(out, o5c, "/api/deploy target=nxgr_fixture_daemon&confirm=yes\x00" as *u8) == 1 { t5c = 1 } }
289 gv_check("T5c declared-daemon-refusal-names-DECLARED-DAEMON-and-the-exact-deploy-call" as *u8, t5c, ctr)
290 let o5d: i64 = ma_promote_refuse(out, "nxgr_fixture_lib\x00" as *u8, OK_LIB, OK_LIB)
291 var t5d: i64 = 0
292 if gj_has(out, o5d, "\"refusal\":\"DECLARED-LIB\"\x00" as *u8) == 1 { t5d = 1 }
293 gv_check("T5d declared-lib-refusal-names-DECLARED-LIB" as *u8, t5d, ctr)
294 let o5e: i64 = ma_promote_refuse(out, "nxgr_secret_fixture\x00" as *u8, OK_UNKNOWN, OK_UNKNOWN)
295 var t5e: i64 = 0
296 if gj_has(out, o5e, "\"refusal\":\"CREDENTIAL-CLASS\"\x00" as *u8) == 1 { t5e = 1 }
297 gv_check("T5e credential-class-name-refusal-names-CREDENTIAL-CLASS-non-overridable" as *u8, t5e, ctr)
298
299 // ---- teardown: the runnable fixtures live under _build/ and are reaped here (data under /tmp stays for diagnosis) ----
300 fio_unlink(elf_fast); fio_unlink(elf_slow); fio_unlink(elf_red); fio_unlink(elf_slowred)
301 let rc: i64 = gv_verdict("MGMT-GATERUN-LANEJ" as *u8, ctr, "gate_run promotes past its deadline; promote refusals name their conjunct" as *u8)
302 sys_exit(rc)
303 return rc
304}