code wiki / _hdl_build / nx_library_sync.nx
nx_library_sync.nx
buildroot/runtime/_hdl_build/nx_library_sync.nx
about
nx_library_sync.nx -- MLIB-021 (publish-sync-on-beat, CALLOUT-012). The nishi-library
dashboard is REGENERATED on every beat / on DONE-rung change so the authed front-end always
reflects current state. Composes PROVEN organs (no rebuild, rule 15 DRY; MLIB-020 untouched,
rule 19): lp_count_done (nx_library_publish = the live build-status counter over the real queue)
+ the nx_web_builder render. ls_sync_render is the BEAT-CALLABLE step (the autorun daemon calls
it each beat with the live DONE count). The SYNC contract is gate-proven (LIBSYNCGATE):
TRACKS -- queue with N DONE rungs -> dashboard shows "rungs DONE: N"; a +1 queue change
(N -> N+1) re-renders to "rungs DONE: N+1" (and the N render does NOT contain N+1).
LIVE -- the real queue's DONE count is what the live dashboard renders.
IDEMPOTENT -- same queue re-rendered twice = byte-identical HTML (no churn on a no-change beat).
Built sovereignly (nx_cc->nxasm_x86, no gcc). license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_library_publish.nxnx_itoa_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
| 14 | const LS_MAGIC_131072: i64 = 131072 |
| 15 | const LS_MAGIC_8192: i64 = 8192 |
| 16 | const LS_MAGIC_400000: i64 = 400000 |
| 18 | const LS_QUEUE: *u8 = "knowledge/registry/assignment_queue.tsv" |
| 19 | const LS_LIVE: *u8 = "knowledge/nishi-library-dashboard.html" |
| 20 | const LS_LIVE2: *u8 = "knowledge/status/_libsync_live2.html" |
| 21 | const LS_A: *u8 = "knowledge/status/_libsync_a.html" |
| 22 | const LS_A2: *u8 = "knowledge/status/_libsync_a2.html" |
| 23 | const LS_B: *u8 = "knowledge/status/_libsync_b.html" |
functions
| 25 | func ls_puts(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 1: main |
| 30 | func ls_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 33 | func ls_needle(out: *u8, v: i64) -> i64 |
| 46 | func ls_sync_render(outpath: *u8, done: i64) -> i64 |
| 69 | func ls_filecmp(pa: *u8, pb: *u8) -> i64 |
| 82 | func ls_render_has_count(path: *u8, v: i64) -> i64 |
| 91 | func ls_qline(dst: *u8, off: i64, id: *u8, status: *u8) -> i64 |
| 99 | func main() -> i64 |