code wiki / _hdl_build / nx_library_sync.nx

nx_library_sync.nx

buildroot/runtime/_hdl_build/nx_library_sync.nx

7901 B163 linesdepth 11pulls 23 transitivereach 0 importersview sourcekind tooltopic library
docsdependenciesstructsconstsfunctions

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

nx_library_publish.nx nx_itoa_lib.nx nx_library_sync.nx

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

main ls_qline lp_wbuf lp_count_done lp_scan lp_startswith lp_rangehas ls_sync_render sys_openat_wr wb_doc_open bt_default_brand wb_doc_open_branded wb_w sys_write bas_emit_head bas_emit_one sys_mmap bas_lookup bas_esc_attr bas_fw bt_emit_root_fd sys_mmap ↻ bt_emit_root_buf bt_app sys_mmap ↻ bt_slice_eq bt_ident_safe bt_value_safe bt_app_n sys_write ↻ bt_emit_dark_fd sys_mmap ↻ bt_emit_dark_root_buf bt_app ↻ sys_mmap ↻ bt_slice_eq ↻ bt_ident_safe ↻ bt_value_safe ↻ bt_app_n ↻ sys_write ↻

structs

none

consts

14const LS_MAGIC_131072: i64 = 131072
15const LS_MAGIC_8192: i64 = 8192
16const LS_MAGIC_400000: i64 = 400000
18const LS_QUEUE: *u8 = "knowledge/registry/assignment_queue.tsv"
19const LS_LIVE: *u8 = "knowledge/nishi-library-dashboard.html"
20const LS_LIVE2: *u8 = "knowledge/status/_libsync_live2.html"
21const LS_A: *u8 = "knowledge/status/_libsync_a.html"
22const LS_A2: *u8 = "knowledge/status/_libsync_a2.html"
23const LS_B: *u8 = "knowledge/status/_libsync_b.html"

functions

25func 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
30func ls_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
33func ls_needle(out: *u8, v: i64) -> i64
called by 1: ls_render_has_count calls 1: lp_wbuf
46func ls_sync_render(outpath: *u8, done: i64) -> i64
69func ls_filecmp(pa: *u8, pb: *u8) -> i64
called by 1: main calls 1: lp_readfile
82func ls_render_has_count(path: *u8, v: i64) -> i64
91func ls_qline(dst: *u8, off: i64, id: *u8, status: *u8) -> i64
called by 1: main calls 1: lp_wbuf
99func main() -> i64