code wiki / (root) / nx_organ_ship_gate.nx

nx_organ_ship_gate.nx

buildroot/runtime/nx_organ_ship_gate.nx

50800 B770 linesdepth 6pulls 10 transitivereach 0 importersview sourcekind gate/prooftopic organ
docsdependenciesstructsconstsfunctions

about

nx_organ_ship_gate.nx -- THE SHIP LOOP MUST NOT SKIP ITS OWN PROOF STAGE. WHY (measured 2026-08-20): nx_organ_ship's PROVE stage searched exactly ONE name, "<target>_gate", and on a miss announced GATE=NONE and carried on. Shipping nx_gate_roster_run therefore proved NOTHING -- its gate is nx_gate_roster_gate -- while the loop reported SHIPPED. That is the vacuous-test defect living inside the one organ every other ship depends on, so the resolver that replaced it needs teeth of its own. SUBJECT: osl_gate_resolve (nx_organ_ship_lib), driven IN-PROCESS. Deliberately NOT end-to-end: nx_organ_ship's main() BUILDS before it proves, so a gate that drove main() would fork real compiles on a shared host. The resolver takes its artifact roots as (dir, suffix) PARAMETERS for exactly this reason, so every rule is exercised against /tmp/<gate>/ fixtures built at runtime and NOTHING here touches a production surface -- a gate must never share its fixture with a production beat. TEETH T0 precondition: every fixture artifact this gate asserts against actually exists (gv_need -> SKIP, never a false RED, and never an outcome asserted over a fixture that never landed) T1 ANTI-VACUITY: the MEASURED defect -- osg_roster_run resolves to osg_roster_gate by one-segment strip. A resolver that knows only <target>_gate CANNOT pass this tooth. T2 the plain convention still resolves, and reports itself as the convention T3 DISCRIMINATION, both signals present at once: a target that has BOTH a conf declaration AND a conventional <target>_gate artifact resolves to the DECLARED one. Two teeth that each isolate one signal would not prove precedence between them. T4 an explicit gate= beats the declaration AND the convention T5 a target that IS a gate proves itself (shipping a gate used to skip PROVE for the same reason) T6 the second artifact root (buildroot/_build, .sov.elf) resolves T7 neg-control-no-gate-is-NAMED-not-silent: a target with no gate anywhere returns 0, reports OSL_WHY_NONE, and its search transcript NAMES the paths it probed -- the whole point of the fix T8 neg-control-declared-gate-absent-refuses-without-falling-through: gate=<absent> resolves to 0 even though a derivable gate exists for that target, and the transcript proves it never probed it. Proving a DIFFERENT gate than the one the caller named would be a false proof. T9 BITE: the strip rule FIRES on the off-convention name and is SILENT when the stripped name has no artifact -- a rule that matched everything would resolve gates that do not exist. T10-T13 several declared gates for ONE target (2026-08-23): count, nth in file order, a commented row and an empty name never count (neg-control), and osl_conf_gate is exactly nth(0). T14-T20 WHICH COPY OF THE GATE RUNS (2026-08-25). Every tooth above picks a NAME; these pick the ARTIFACT, and until today nothing tested that at all. T14 and T15 differ in EXACTLY ONE argument, with the artifact present at BOTH roots, so they prove a preference between two real candidates rather than the ability to find one. T16 is the neg-control that freshness is matched by NAME. T17 keeps the swap a PREFERENCE, so a first promote can never become a false

dependencies 3 imports · 0 importers

nx_gatekit_lib.nx nx_gate_verdict.nx nx_organ_ship_lib.nx nx_organ_ship_gate.nx

imports: nx_gatekit_lib.nxnx_gate_verdict.nxnx_organ_ship_lib.nx

imported by: nobody (leaf or entry point)

structs

none

consts

60const OSG_DIR: *u8 = "/tmp/nx_organ_ship_gate/"
61const OSG_DIRA: *u8 = "/tmp/nx_organ_ship_gate/root/"
62const OSG_DIRB: *u8 = "/tmp/nx_organ_ship_gate/build/"
63const OSG_SUFA: *u8 = ".elf"
64const OSG_SUFB: *u8 = ".sov.elf"
65const OSG_CONF: *u8 = "/tmp/nx_organ_ship_gate/organ_gate.conf"
66const OSG_BODY: *u8 = "fixture artifact -- existence is all the resolver reads\n"
70const OSG_A_CONV: *u8 = "/tmp/nx_organ_ship_gate/root/osg_conv_gate.elf"
71const OSG_A_ROST: *u8 = "/tmp/nx_organ_ship_gate/root/osg_roster_gate.elf"
72const OSG_A_DECL: *u8 = "/tmp/nx_organ_ship_gate/root/osg_decl_elsewhere.elf"
73const OSG_A_DGAT: *u8 = "/tmp/nx_organ_ship_gate/root/osg_decl_gate.elf"
74const OSG_A_SELF: *u8 = "/tmp/nx_organ_ship_gate/root/osg_self_gate.elf"
75const OSG_B_BLD: *u8 = "/tmp/nx_organ_ship_gate/build/osg_bld_gate.sov.elf"
80const OSG_A_BOTH: *u8 = "/tmp/nx_organ_ship_gate/root/osg_both_gate.elf"
81const OSG_B_BOTH: *u8 = "/tmp/nx_organ_ship_gate/build/osg_both_gate.sov.elf"
86const OSG_PROD_A: *u8 = "./"
87const OSG_PROD_B: *u8 = "./buildroot/_build/"
93const OSG_SRC_HDL: *u8 = "/tmp/nx_organ_ship_gate/src_hdl/"
94const OSG_SRC_RT: *u8 = "/tmp/nx_organ_ship_gate/src_rt/"
95const OSG_QT: i64 = 34
96const OSG_FXHDR: *u8 = "// nx_organ_ship_gate fixture source: only its import lines are read\n"
101const OSG_FX_LINES: i64 = 4

functions

102func osg_fxcap() -> i64 { return OSG_FX_LINES * (OSL_NAMECAP + OSL_NAMECAP) }
106func osg_imp(dst: *u8, o: i64, lead: *u8, module: *u8) -> i64
120func osg_srcpath(dir: *u8, name: *u8, dst: *u8) -> i64
126func osg_wsrc(dir: *u8, name: *u8, body: *u8) -> i64
135func osg_rmsrc(dir: *u8, name: *u8) -> i64
142func osg_clo(gate: *u8, target: *u8, tr: *u8, sd: *u8, seenp: *i64) -> i64
146func osg_run(target: *u8, expl: *u8, tried: *u8, gpath: *u8, why: *i64) -> i64
150func osg_run_fresh(target: *u8, expl: *u8, fresh: *u8, tried: *u8, gpath: *u8, why: *i64) -> i64
153func osg_has(tried: *u8, needle: *u8) -> i64 { return gk_out_has(tried, osl_slen(tried), needle) }
155func main() -> i64