code wiki / _hdl_build / nx_lane_rename_register.nx

nx_lane_rename_register.nx source

↩ module page · 41 lines · 3165 B

1// nx_lane_rename_register.nx -- records the lane temp-rename fix + the 2// R1-T1-004 bisect campaign result. Engineer gate = the 18-check attempt 3// gate re-run GREEN through the NEW staged lane at register time (the lane 4// is the substrate every gate rides). Librarian alloc + dual-write. 5// license_tier: ORIGINAL 6import "nx_cap_register.nx" 7import "nx_capreg_librarian.nx" 8import "nx_syscalls.nx" 9 10func lrr_run(path: *u8) -> i64 { 11 let pid: i64 = sys_fork() 12 if pid == 0 { 13 let dn: i64 = sys_openat_wr("/dev/null" as *u8, 0x1a4) 14 if dn >= 0 { sys_dup3(dn, 1, 0); sys_dup3(dn, 2, 0) } 15 let argv: *i64 = sys_mmap(32) as *i64; argv[0] = path as i64; argv[1] = 0 16 let envp: *i64 = sys_mmap(16) as *i64; envp[0] = 0 17 sys_execve(path, argv, envp); sys_exit(127) 18 } 19 let st: *i64 = sys_mmap(16) as *i64 20 sys_wait4(pid, st, 0) 21 return st[0] 22} 23 24func main() -> i64 { 25 var allok: i64 = 1 26 if lrr_run("/tmp/_attempt_loop_gate_authored.sov.elf" as *u8) != 0 { allok = 0 } 27 cr_w(1, "ENGINEER: 18-check attempt gate via NEW lane all-pass=" as *u8); cr_wn(1, allok); cr_w(1, "\n" as *u8) 28 let eng: i64 = ig_engineer(1, 1, 1, allok) 29 let dec: i64 = ig_decision(eng, ig_council(eng, 1, 1, 2), 1) 30 if dec != IG_INGEST { cr_w(1, "HELD\n" as *u8); sys_exit(1) } 31 if cr_can_register(5, 2, 6, dec) != 1 { cr_w(1, "REFUSED\n" as *u8); sys_exit(1) } 32 let lp: *u8 = "/tmp/nishi_cap_registry.log" as *u8 33 let jp: *u8 = "knowledge/status/cap_registry_durable.log" as *u8 34 let idx: i64 = cl_next_idx(lp, jp) 35 let ok: i64 = cl_register_dual(lp, jp, idx, 5, 36 2, "HEAL LANE-TEMP-RENAME + RC6-INTERACTION-PINNED (R1-T1-004 bisect campaign, wake 4) -- the legendary intermittent NXASM rc=6 is NOT random: _nxasm_bisect 6-case matrix x2 runs proves a PARENT-CONTEXT x OUTPUT-PATH-STRING interaction: from sovereign parents, assembling md5-identical .s to /tmp/nx_autorun_daemon.sov.elf fails 100pct (12+ observations) while a neutral output name passes 100pct; the IDENTICAL full replica from bash (exact argv0/env/paths, fd3-occupied variant too, existing-output variant too) passes 100pct -- consistent ONLY with an uninit-read in nxasm whose garbage VALUE depends on parent stack residue and whose RELEVANCE depends on which internal slot the output path string hits (R1-T1-006 lineage; root bisect inside nxasm_x86 = the remaining NOVEL work, row updated). OPERATIONAL FIX SHIPPED: nx_sov_build_run assembles to /tmp/_sbr_asm_out.<name> then sys_renameat over the target (atomic; also retires the overwrite-running-binary class); lane SELF-REBUILT through old lane, repro FLIPPED (daemon builds run-exit=0 after 8+ fails), regressions green (toy/reconcile/ALGATE 18-18/pulse all-green-but-standing-browser-red), staged durable w/ .bak-preTmpRename rollback. Evidence law note: rc=6 'unencoded' lane label corrected (it was a guess; nxasm exit-6 is silent)" as *u8) 37 if ok != 1 { cr_w(1, "DUAL-WRITE FAILED\n" as *u8); sys_exit(1) } 38 cr_w(1, "CAPREG idx=" as *u8); cr_wn(1, idx); cr_w(1, " REGISTERED -- the lane no longer rolls dice on output names\n" as *u8) 39 sys_exit(0) 40 return 0 41}