code wiki / _hdl_build / nx_clock_reregister_gate.nx
nx_clock_reregister_gate.nx
buildroot/runtime/_hdl_build/nx_clock_reregister_gate.nx
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
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
structs
| none |
consts
| 20 | const CRG_FIX_DIR: *u8 = "/tmp/nx_clock_reregister_gate" |
| 21 | const CRG_DPFX: *u8 = "/tmp/nx_clock_reregister_gate/clockjobs-" |
| 22 | const CRG_SPFX: *u8 = "/tmp/nx_clock_reregister_gate/clocksched-" |
| 23 | const CRG_PROD_DPFX: *u8 = "/volume1/homes/elderwesto/nishihost/knowledge/store/clockjobs-" |
| 24 | const CRG_WRITER: *u8 = "/volume1/homes/elderwesto/nishihost/nx_clockjob.elf" |
| 25 | const CRG_ARGECHO: *u8 = "/volume1/homes/elderwesto/nishihost/nx_tool_argecho.elf" |
| 30 | const CLK_OLD_NAMEW_FOR_PROOF: i64 = 128 |
| 31 | const CRG_FIX_CMD_LEN: i64 = 300 |
| 32 | const CRG_FIX_TOKENS: i64 = 18 |
| 35 | const 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" |
| 36 | const CRG_LAST: *u8 = "t18-LAST-TOKEN-INTACT-END" |
| 40 | const CRG_OVERLEN: i64 = 1050 |
| 41 | const CRG_OUTCAP: i64 = 65536 |
| 42 | const CRG_PATHCAP: i64 = 256 |
| 47 | const CRG_AL_ORGAN: *u8 = "/volume1/homes/elderwesto/nishihost/nx_plan_run.elf" |
| 48 | const CRG_AL_JOB: *u8 = "twincheck" |
| 49 | const CRG_AL_TOKEN: *u8 = "job=twincheck" |
| 50 | const CRG_AL_LAST_OK: *u8 = "clockjob lane=clock exit=0 job=twincheck" |
| 51 | const CRG_AL_LAST_KILL: *u8 = "clockjob lane=clock exit=124 job=twincheck" |
| 52 | const CRG_AL_LAST_BARE: *u8 = "clockjob lane=clock exit=0" |
| 53 | const CRG_AL_FAIL_WORD: *u8 = "fail" |
| 54 | const CRG_AL_KEY: *u8 = "job=" |
| 55 | const CRG_AL_SPACE_NAME: *u8 = "twin check" |
| 56 | const CRG_AL_KILL_CODE: i64 = 124 // the code clk_dispatch_one logs when its deadline kills a job (the shell-timeout convention) |
| 57 | const CRG_AL_FIELDS: i64 = 6 // TAB fields in one ledger row; the job token rides INSIDE the last one |
| 58 | const CRG_AL_ORGAN_COL: i64 = 2 // 0-based index of the ORGAN column |
| 59 | const CRG_AL_RESULT_COL: i64 = 4 // 0-based index of ok|fail |
| 60 | const CRG_AL_LAST_COL: i64 = CRG_AL_FIELDS - 1 |
| 61 | const CRG_AL_E2E_JOB: *u8 = "crg-jobwitness" |
| 62 | const CRG_AL_E2E_TOKEN: *u8 = "job=crg-jobwitness" |
| 63 | const CRG_AL_E2E_LAST: *u8 = "clockjob lane=clock exit=127 job=crg-jobwitness" |
| 64 | const CRG_AL_E2E_ORGAN_NAME: *u8 = "absent-organ.elf" // joined under CRG_FIX_DIR at run time, never created |
| 65 | const CRG_AL_LEDGER_REL: *u8 = "knowledge/status/actlog.jrnl" // the dispatcher's RELATIVE ledger path, joined under CRG_FIX_DIR |
| 66 | const CRG_AL_E2E_IV: i64 = 60 // any interval: T29-T31 dispatch the job directly by index, never through the EDF clock |
functions
| 69 | func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 70 | func 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 } |
| 72 | func streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 86 | func crg_field(row: *u8, n: i64, k: i64, out: *u8) -> i64 called by 1: main |
| 107 | func crg_nfields(row: *u8, n: i64) -> i64 called by 1: main |
| 125 | func crg_last_token(row: *u8, n: i64, out: *u8) -> i64 called by 1: main |
| 144 | func crg_rows(b: *u8, n: i64) -> i64 called by 1: main |
| 151 | func main() -> i64 |