nx_clockjob.nx
buildroot/runtime/nx_clockjob.nx
about
nx_clockjob.nx -- THE MISSING PRODUCER for the clock's desired-state plane (2026-08-06).
WHY THIS EXISTS. A sibling seat made clk_merge_store RECONCILE knowledge/store/clockjobs- toward
desired state ("clockjobs- is now DESIRED STATE, not an append-only inbox") -- so re-periodding a
clock job is finally SUPPORTED. But NOTHING COULD WRITE THAT PLANE: nx_clockjobs.nx is a LIBRARY with
no main(), it is not in tool_allowlist.conf so it cannot even be cap-minted, and nx_store_put emits a
FIXED 9-FIELD row that projects garbage onto this 3-column grammar (a prior attempt left a row
NEUTRALIZED at interval 99999999). The live plane still carries the scar: row q:7 reads
"600<TAB>nx_segguard.sh" with NO NAME AT ALL -- a half-written row that the dispatcher's
MALFORMED-ROW guard now has to skip on every single window.
(STAR)A RECONCILER WITH NO PRODUCER IS A CONSUMER WITH NOTHING TO CONSUME -- shipping the desired-state
half without a writer leaves the registry exactly as unfixable as before, while LOOKING fixed.
(STAR)THE ABSENCE OF A SANCTIONED WRITER DOES NOT STOP WRITES, IT ONLY MAKES THEM MALFORMED.
nx_clockjob put <name> <interval-secs> <organ>
Grammar is EXACTLY the dispatcher's: name<TAB>interval<TAB>organ. Validated at the boundary so the
q:7 class cannot recur: no empty field, no embedded tab, interval must be a positive integer.
Append is sts_append_fast_locked (the O(1) locked path) -- last declaration wins at reconcile time.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_store_seed_lib.nxnx_clock_caps.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
| 22 | const CJ_PREFIX: *u8 = "knowledge/store/clockjobs-" |
| 23 | const CJ_ROWCAP: i64 = CLK_CMD_CAP // THE SAME const the dispatcher's CLK_NAMEW slot is derived |
| 26 | const CJ_TAB: i64 = 9 |
| 88 | const CJ_LIVE_PREFIX: *u8 = "knowledge/store/clocksched-" |
| 89 | const CJ_NAMECAP: i64 = 256 |
| 90 | const CJ_NL: i64 = 10 // mirrors this file's own CJ_TAB convention (a local byte-name, not a second ruler) |
| 165 | const CJ_TOMB: *u8 = "__TOMB__" |
functions
| 28 | func cj_out(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 34 | func cj_err(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(2,s,n); sys_write(1,s,n); return 0 } |
| 35 | func cj_cat(dst: *u8, o: i64, s: *u8) -> i64 { var x: i64=o; var i: i64=0; while s[i]!=(0 as u8){dst[x]=s[i];x=x+1;i=i+1} return x } |
| 36 | func cj_num(dst: *u8, o: i64, v: i64) -> i64 { var x: i64=o; var mm: i64=v; if mm==0{dst[x]=48 as u8;return x+1} let t:*u8=sys_mmap(24); var k:i64=0; while mm>0{t[k]=(48+(mm%10)) as u8;mm=mm/10;k=k+1} var j:i64=0; while j<k{dst[x]=t[k-1-j];x=x+1;j=j+1} return x } |
| 37 | func cj_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main |
| 38 | func cj_tabfree(s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ if s[i]==(CJ_TAB as u8){return 0} i=i+1 } return 1 }
called by 1: main |
| 39 | func cj_atoi(s: *u8) -> i64 {
called by 1: main |
| 62 | func cj_first_token(src: *u8, dst: *u8, cap: i64) -> i64 {
called by 1: cj_resolves |
| 74 | func cj_resolves(org: *u8) -> i64 { |
| 105 | func cj_streq(a: *u8, b: *u8) -> i64 { |
| 113 | func cj_eol(buf: *u8, n: i64, i: i64) -> i64 { |
| 123 | func cj_rowname(buf: *u8, s: i64, e: i64, out: *u8, cap: i64) -> i64 { |
| 169 | func cj_rowfield1(buf: *u8, s: i64, e: i64, out: *u8, cap: i64) -> i64 {
called by 1: cj_scan |
| 198 | func cj_scan(buf: *u8, n: i64, want: *u8, na: *u8, nb: *u8, tp: *i64) -> i64 { |
| 221 | func cj_dump2(prefix: *u8, tombsrc: *u8, label: *u8, show: i64) -> i64 { |
| 307 | func cj_dump(prefix: *u8, label: *u8, show: i64) -> i64 { return cj_dump2(prefix, 0 as *u8, label, show) } |
| 310 | func cj_dupes(prefix: *u8) -> i64 { |
| 387 | func cj_get(prefix: *u8, label: *u8, want: *u8) -> i64 { |
| 435 | func main(argc: i64, argv: *i64) -> i64 { |