code wiki / _hdl_build / nx_clock_reregister_gate.nx

nx_clock_reregister_gate.nx

buildroot/runtime/_hdl_build/nx_clock_reregister_gate.nx

34366 B546 linesdepth 6pulls 14 transitivereach 0 importersview sourcekind gate/prooftopic clock
docsdependenciesstructsconstsfunctions

about

nx_clock_reregister_gate.nx -- BITE PROOF for the clk_register update fix. The existing clock gates were all written while re-registration was a no-op, so every one of them passes just as happily with the defect present. A green suite that cannot fail on the thing you changed has not tested your change. ★★★★★ A GREEN THAT NEVER HAD A CORRESPONDING RED IS UNVERIFIED. T1 is the NEGATIVE CONTROL: an IDENTICAL re-declaration must still be a no-op (rc 0) and must not disturb the row, because capabilities declare their job on every boot. T2/T3 are the bite: a re-registration with a DIFFERENT organ, and one with a DIFFERENT interval, must return 2 AND actually change the stored row. Against the pre-fix organ both return 0 and the row is unchanged, so T2 and T3 fail -- which is the RED this gate exists to produce. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 4 imports · 0 importers

nx_clock_sched.nx nx_syscalls.nx nx_gate_verdict.nx nx_gatekit_lib.nx nx_clock_reregister_gate.nx

imports: nx_clock_sched.nxnx_syscalls.nxnx_gate_verdict.nxnx_gatekit_lib.nx

imported by: nobody (leaf or entry point)

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

main w sys_write 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 ↻ clk_register clk_find clk_streq clk_slot clk_slot ↻ sys_write ↻ wn w ↻ sys_mmap ↻ sys_write ↻ streq clk_slot ↻ gv_ctr sys_mmap ↻ sys_getcwd sys_mmap ↻ gk_mkdir sys_mkdir sys_chdir sys_mmap ↻ sts_load_fit sts_mm

structs

none

consts

20const CRG_FIX_DIR: *u8 = "/tmp/nx_clock_reregister_gate"
21const CRG_DPFX: *u8 = "/tmp/nx_clock_reregister_gate/clockjobs-"
22const CRG_SPFX: *u8 = "/tmp/nx_clock_reregister_gate/clocksched-"
23const CRG_PROD_DPFX: *u8 = "/volume1/homes/elderwesto/nishihost/knowledge/store/clockjobs-"
24const CRG_WRITER: *u8 = "/volume1/homes/elderwesto/nishihost/nx_clockjob.elf"
25const CRG_ARGECHO: *u8 = "/volume1/homes/elderwesto/nishihost/nx_tool_argecho.elf"
30const CLK_OLD_NAMEW_FOR_PROOF: i64 = 128
31const CRG_FIX_CMD_LEN: i64 = 300
32const CRG_FIX_TOKENS: i64 = 18
35const CRG_CMD: *u8 = "/volume1/homes/elderwesto/nishihost/nx_tool_argecho.elf beat knowledge/gateroster.conf knowledge/status/gr.jrnl 180000 --list DEPLOYED-DARK ks/g.dark --list INVOKED-MISSING ks/g.gap --list DARK-FAILING ks/g.failing --rows ks/g.rows t17-wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww t18-LAST-TOKEN-INTACT-END"
36const CRG_LAST: *u8 = "t18-LAST-TOKEN-INTACT-END"
40const CRG_OVERLEN: i64 = 1050
41const CRG_OUTCAP: i64 = 65536
42const CRG_PATHCAP: i64 = 256
47const CRG_AL_ORGAN: *u8 = "/volume1/homes/elderwesto/nishihost/nx_plan_run.elf"
48const CRG_AL_JOB: *u8 = "twincheck"
49const CRG_AL_TOKEN: *u8 = "job=twincheck"
50const CRG_AL_LAST_OK: *u8 = "clockjob lane=clock exit=0 job=twincheck"
51const CRG_AL_LAST_KILL: *u8 = "clockjob lane=clock exit=124 job=twincheck"
52const CRG_AL_LAST_BARE: *u8 = "clockjob lane=clock exit=0"
53const CRG_AL_FAIL_WORD: *u8 = "fail"
54const CRG_AL_KEY: *u8 = "job="
55const CRG_AL_SPACE_NAME: *u8 = "twin check"
56const CRG_AL_KILL_CODE: i64 = 124 // the code clk_dispatch_one logs when its deadline kills a job (the shell-timeout convention)
57const CRG_AL_FIELDS: i64 = 6 // TAB fields in one ledger row; the job token rides INSIDE the last one
58const CRG_AL_ORGAN_COL: i64 = 2 // 0-based index of the ORGAN column
59const CRG_AL_RESULT_COL: i64 = 4 // 0-based index of ok|fail
60const CRG_AL_LAST_COL: i64 = CRG_AL_FIELDS - 1
61const CRG_AL_E2E_JOB: *u8 = "crg-jobwitness"
62const CRG_AL_E2E_TOKEN: *u8 = "job=crg-jobwitness"
63const CRG_AL_E2E_LAST: *u8 = "clockjob lane=clock exit=127 job=crg-jobwitness"
64const CRG_AL_E2E_ORGAN_NAME: *u8 = "absent-organ.elf" // joined under CRG_FIX_DIR at run time, never created
65const CRG_AL_LEDGER_REL: *u8 = "knowledge/status/actlog.jrnl" // the dispatcher's RELATIVE ledger path, joined under CRG_FIX_DIR
66const CRG_AL_E2E_IV: i64 = 60 // any interval: T29-T31 dispatch the job directly by index, never through the EDF clock

functions

69func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: wnmain calls 1: sys_write
70func wn(v: i64) -> i64 { var m: i64=v; if m<0{w("-" as *u8);m=0-m} 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; let o:*u8=sys_mmap(24); while i<k{o[i]=t[k-1-i];i=i+1} sys_write(1,o,k); return 0 }
called by 1: main calls 3: wsys_mmapsys_write
72func streq(a: *u8, b: *u8) -> i64
called by 1: main
86func crg_field(row: *u8, n: i64, k: i64, out: *u8) -> i64
called by 1: main
107func crg_nfields(row: *u8, n: i64) -> i64
called by 1: main
125func crg_last_token(row: *u8, n: i64, out: *u8) -> i64
called by 1: main
144func crg_rows(b: *u8, n: i64) -> i64
called by 1: main
151func main() -> i64