code wiki / (root) / nx_docpub_pulse.nx

nx_docpub_pulse.nx

buildroot/runtime/nx_docpub_pulse.nx

6723 B117 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic docpub
docsdependenciesstructsconstsfunctions

about

nx_docpub_pulse.nx -- R3 autonomy CORE: the CONTENT-CHANGE GATE for "publish docs as we work". The memory flagged version-spam (every pulse re-stages even with no real change) as THE blocker to arming an autonomous re-publish loop. This organ computes a deterministic content fingerprint over the generated doc SITE and decides STAGE (content changed / first run) vs SKIP (unchanged) -- so an autonomous pulse only re-stages real changes. The actual generate (nx_docpub_site) + stage (nx_docpub_publish) run only on a STAGE decision. Self-contained (only nx_syscalls; poly rolling hash, no crypto import). Gated with version-spam teeth. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_docpub_pulse.nx

imports: nx_syscalls.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 sys_mmap pls_w sys_write pls_trunc sys_openat_wr sys_close pls_wr sys_openat_wr ↻ sys_write ↻ sys_close ↻ pls_decide_test pls_hash_file sys_mmap ↻ sys_openat_rd sys_read sys_close ↻ pls_decide pls_read_fp sys_mmap ↻ sys_openat_rd ↻ sys_read ↻ sys_close ↻ pls_atoi pls_write_fp sys_mmap ↻ sys_openat_wr ↻ sys_write ↻ sys_close ↻ pls_n nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap pls_decide_site pls_hash_file ↻ pls_decide ↻ sys_exit

structs

none

consts

10const K_MAGIC_1048576: i64 = 1048576
11const K_MAGIC_1469598103: i64 = 1469598103

functions

13func pls_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 1: main calls 1: sys_write
18func pls_n(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
22func pls_hash_file(path: *u8, h: i64) -> i64
33func pls_atoi(buf: *u8, n: i64) -> i64
called by 1: pls_read_fp
38func pls_read_fp(path: *u8) -> i64
45func pls_write_fp(path: *u8, v: i64) -> i64
53func pls_trunc(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 0x1a4); if fd >= 0 { sys_close(fd) } return 0 }
called by 1: main calls 2: sys_openat_wrsys_close
54func pls_wr(path: *u8, content: *u8) -> i64
60func pls_decide(fp: *u8, h: i64) -> i64
65func pls_decide_test(fp: *u8, a: *u8, b: *u8) -> i64
called by 1: main calls 2: pls_hash_filepls_decide
70func pls_decide_site(fp: *u8) -> i64
called by 1: main calls 2: pls_hash_filepls_decide
82func main() -> i64