nx_build_firsttry_gate.nx
buildroot/runtime/nx_build_firsttry_gate.nx
about
nx_build_firsttry_gate.nx -- CE2 (codeeffectiveness ce_build_firsttry): the build pillar's two rates read from a
ship journal, PROVEN on planted journals with hand-computed answers. In-process over nx_build_firsttry_lib (the ONE
ruler nx_organ_ship's firsttry verb calls), with a FIXED now so every expected count was decided before the run.
Neg-controls the rung demands: a known revert raises rework AND reverts by EXACTLY ONE over the single-ship
control; a window with nothing in it reads UNOBSERVABLE and writes NO spine row; the production spine is unchanged
by any fixture run; an unreadable journal is UNREADABLE, never a zero rate. Rows are written with real TAB bytes
by a row writer, never by a string literal, so the fixture is the wire shape the loop writes.
exit: 0 GREEN . 1 RED . 3 SKIP license_tier: ORIGINAL No hw writes.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_build_firsttry_lib.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
| 13 | const BFG_ROOT: *u8 = "/tmp/nx_build_firsttry_gate" |
| 14 | const BFG_F0: *u8 = "/tmp/nx_build_firsttry_gate/f0.jrnl" |
| 15 | const BFG_F1: *u8 = "/tmp/nx_build_firsttry_gate/f1.jrnl" |
| 16 | const BFG_F2: *u8 = "/tmp/nx_build_firsttry_gate/f2.jrnl" |
| 17 | const BFG_F3: *u8 = "/tmp/nx_build_firsttry_gate/f3.jrnl" |
| 18 | const BFG_F4: *u8 = "/tmp/nx_build_firsttry_gate/f4.jrnl" |
| 19 | const BFG_F5: *u8 = "/tmp/nx_build_firsttry_gate/f5.jrnl" |
| 20 | const BFG_F1_SPINE: *u8 = "/tmp/nx_build_firsttry_gate/f1.jrnl.firsttry.spine" |
| 21 | const BFG_F5_SPINE: *u8 = "/tmp/nx_build_firsttry_gate/f5.jrnl.firsttry.spine" |
| 22 | const BFG_MISSING: *u8 = "/tmp/nx_build_firsttry_gate/does-not-exist.jrnl" |
| 23 | const BFG_F6: *u8 = "/tmp/nx_build_firsttry_gate/f6.jrnl" |
| 24 | const BFG_NOW: i64 = 1788656000 |
| 25 | const BFG_WINDOW: i64 = 14 |
| 26 | const BFG_MODE_RWX: i64 = 493 |
| 27 | const BFG_MODE_RW: i64 = 420 |
| 28 | const BFG_LINE: i64 = 512 |
| 29 | const BFG_MIN: i64 = 60 |
| 31 | const BFG_B_FIRST: i64 = 1000 |
| 32 | const BFG_B_REVERT: i64 = 900 |
| 33 | const BFG_B_GROW: i64 = 1100 |
| 34 | const BFG_F4_ROWS: i64 = 10 |
| 35 | const BFG_F4_ROWS_IN: i64 = 8 |
| 36 | const BFG_F4_EPISODES: i64 = 3 |
| 37 | const BFG_F4_FIRST_PERMIL: i64 = 500 // first_pass 1 of (first_pass 1 + code_fail 1); the box refusal is outside the denominator |
| 38 | const BFG_F4_SHIPPED: i64 = 3 |
| 39 | const BFG_F4_TARGETS: i64 = 3 |
functions
| 41 | func bfg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: bfg_w |
| 42 | func bfg_w(fd: i64, s: *u8) -> i64 { return sys_write(fd, s, bfg_slen(s)) } |
| 43 | func bfg_tab(fd: i64) -> i64 { let b: *u8 = sys_mmap(4); b[0] = BFT_TAB as u8; return sys_write(fd, b, 1) } |
| 44 | func bfg_nl(fd: i64) -> i64 { let b: *u8 = sys_mmap(4); b[0] = BFT_NL as u8; return sys_write(fd, b, 1) } |
| 45 | func bfg_n(fd: i64, v: i64) -> i64 { let b: *u8 = sys_mmap(BFG_LINE); let o: i64 = bft_catn(b, 0, v); return sys_write(fd, b, o) } |
| 47 | func bfg_row(fd: i64, epoch: i64, target: *u8, stage: *u8, verdict: *u8, detail: *u8) -> i64 |
| 51 | func bfg_open(path: *u8) -> i64 { sys_unlinkat(path); return sys_openat_wr(path, BFG_MODE_RW) } |
| 53 | func bfg_ship(fd: i64, at: i64, target: *u8, b: i64) -> i64 |
| 66 | func bfg_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 } |
| 67 | func bfg_size(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 - 1 } let s: i64 = sys_lseek(fd, 0, 2); sys_close(fd); return s } |
| 69 | func bfg_lines(path: *u8) -> i64 |
| 79 | func main(argc: i64, argv: *i64) -> i64 |