code wiki / _hdl_build / nx_runpath.nx

nx_runpath.nx

buildroot/runtime/_hdl_build/nx_runpath.nx

4146 B78 linesdepth 2pulls 2 transitivereach 47 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_runpath.nx -- ISOLATION primitive for conflict-free PARALLEL workstreams (operator 2026-06-20: ~21 parallel Claude workstreams shared ONE /tmp and stepped on each other -- F-class coordination). Instead of hardcoded /tmp/<file> (shared, raced, shredded by siblings, AND churned by systemd-tmpfiles), every transient file goes in a PER-WORKSTREAM namespace under a STABLE dir: <RUNDIR>/<wsid>/<name>. RUNDIR = /home/elderwesto/.nishi/run (ext4, NOT /tmp -> not systemd-tmpfiles-managed -> stable) wsid = the workstream id (a process/session id); siblings get different wsids -> CANNOT collide. This is the hardware-rung-up fix: isolation BY CONSTRUCTION (OS dir namespace), not retry-through-hope. WIRING PLAN (the coordinated install -- do NOT hot-swap while siblings are live): replace the hardcoded /tmp/nxpass + /tmp/nxsecret.out + /tmp/<organ>.sov.elf in nx_machine_key / nx_vault / nx_aw_push / nx_sov_build_run (the chain passes ONE wsid down so the forked machine-key+vault agree) with rp_path(wsid,..). No main -- library. license_tier: ORIGINAL

dependencies 1 imports · 47 importers

nx_syscalls.nx nx_runpath.nx nx_arbiter_gate.nx nx_arbiter_race_gate.nx nx_docpub_publish.nx nx_docpub_ship.nx nx_hostop_apply_gate.nx nx_hostop_dns_gate.nx nx_hostop_law_gate.nx nx_hostop_obs_gate.nx nx_hostop_progressive_gate.nx nx_hostop_receive_gate.nx

diagram shows first 10 each side; +0 more imports, +37 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: nx_arbiter_gate.nxnx_arbiter_race_gate.nxnx_docpub_publish.nxnx_docpub_ship.nxnx_hostop_apply_gate.nxnx_hostop_dns_gate.nxnx_hostop_law_gate.nxnx_hostop_obs_gate.nxnx_hostop_progressive_gate.nxnx_hostop_receive_gate.nxnx_hostop_recover_gate.nxnx_hostop_serve_gate.nxnx_hostop_state_gate.nxnx_hostop_watchdog_gate.nxnx_lan_signup_socket_gate.nxnx_pub_audit_gate.nxnx_pub_bluegreen_gate.nxnx_pub_bypass2_gate.nxnx_pub_bypass_gate.nxnx_pub_canary_gate.nxnx_pub_cd2_gate.nxnx_pub_daemon2_gate.nxnx_pub_daemon_gate.nxnx_pub_deploy_gate.nxnx_pub_dns_gate.nxnx_pub_drain_diag.nxnx_pub_exceed_gate.nxnx_pub_game_e2e_gate.nxnx_pub_govern2_gate.nxnx_pub_governed_gate.nxnx_pub_hostop_e2e_gate.nxnx_pub_loop_gate.nxnx_pub_metrics_gate.nxnx_pub_nobypass_gate.nxnx_pub_obs_gate.nxnx_pub_pd_exceed_gate.nxnx_pub_policy_gate.nxnx_pub_promote_gate.nxnx_pub_q_gate.nxnx_pub_rel_gate.nxnx_pub_serve_gate.nxnx_pub_ship_meet_gate.nxnx_pub_smoke_gate.nxnx_pub_submit_gate.nxnx_pub_tls_gate.nxnx_publish_account_admin.nxnx_runpath_gate.nx

structs

none

consts

14const RP_MAGIC_65536: i64 = 65536
15const RP_MAGIC_65535: i64 = 65535
17const RP_RUNDIR: *u8 = "/home/elderwesto/.nishi/run"

functions

19func rp_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
20func rp_itoa(v: i64, dst: *u8) -> i64 { var m: i64=v; let t: *u8=sys_mmap(24); var k: i64=0; if m==0{t[0]=48 as u8;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{dst[i]=t[k-1-i];i=i+1} dst[k]=0 as u8; return k }
calls 1: sys_mmap
23func rp_match(buf: *u8, at: i64, n: i64, lit: *u8) -> i64
called by 1: rp_wsid
31func rp_wsid(wsid_out: *u8) -> i64
56func rp_path(wsid: *u8, name: *u8, out: *u8) -> i64
called by 44: mainmainmainmainmainmain+38
69func rp_ensure(wsid: *u8) -> i64
called by 44: mainmainmainmainmainmain+38 calls 1: sys_mmap