code wiki / _hdl_build / nx_shipjoin_gate.nx

nx_shipjoin_gate.nx

buildroot/runtime/_hdl_build/nx_shipjoin_gate.nx

9734 B158 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_shipjoin_gate.nx -- THE REFEREE for nx_dora `shipjoin` (DM6, devmgmt rung). END-TO-END: forks the DEPLOYED nx_dora elf, so it grades the artifact callers run. The accept rule, verbatim from devmgmt.plan: "deploy-frequency and lead-time computed from organ_ship.jrnl match a hand count over one week of journal." A hand count is only possible if every joined row is PUBLISHED, so the first thing this gate asserts is that the per-row worklist exists at all -- an average with no rows behind it cannot be checked by anybody. The fixture is built to break the three joins that would each produce a confident wrong number: * INTERLEAVING -- another target is BUILT between alpha's build and alpha's ship, so a join that takes "the previous BUILD row" instead of "the previous BUILD row FOR THIS TARGET" reports lead=15 where the truth is 20. Both numbers look plausible; only the fixture separates them. * AN UNMATCHED SHIP -- a SHIPPED with no BUILD for its target. Averaging over a set you cannot reconstruct is how a lead time stops being auditable, so it must land in its own bucket. * A REFUSAL COUNTED AS A FAILURE -- a refused ship never reached production. Naming it a change-failure inverts the sign of the one metric an operator reads as bad news. Plus a row before the window (must not be counted), and a malformed row (must be COUNTED as unparsed, never silently dropped -- a parser that discards in silence reports a smaller, cleaner, wrong population). The window anchor is asserted explicitly: window_end must equal the FIXTURE'S newest epoch, which is years away from wall clock, so a gate that passed on a clock-anchored implementation could not. Fixtures live under /tmp/nx_shipjoin_gate/ and are rewritten O_TRUNC each run (idempotent). license_tier: ORIGINAL Read-only outside /tmp. No hw writes (Rule 26).

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_sovjson_lib.nx nx_gate_verdict.nx nx_tool_run.nx nx_shipjoin_gate.nx

imports: nx_syscalls.nxnx_sovjson_lib.nxnx_gate_verdict.nxnx_tool_run.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ sj_cat sj_allow_path sys_mmap ↻ sys_openat_rd sys_read sys_close sj_le sj_col sj_lit_eq sys_mkdir sg_wr sys_openat_wr sys_write ↻ sys_close ↻ sys_unlinkat gv_check gv_puts ↻ sg_run sys_mmap ↻

structs

none

consts

30const SG_MODE_644: i64 = 420
31const SG_MODE_755: i64 = 493
32const SG_PATH: i64 = 512
33const SG_FIX: i64 = 65536
34const SG_OUT: i64 = 1048576
35const SG_EXIT_SKIP: i64 = 3
36const SG_RC_REFUSE: i64 = 3

functions

38func sg_wr(path: *u8, buf: *u8, n: i64) -> i64
45func sg_run(subj: *u8, a1: *u8, a2: *u8, a3: *u8, out: *u8, cl: *i64) -> i64
called by 1: main calls 2: sys_mmaptr_run_capture
55func main(argc: i64, argv: *i64) -> i64