code wiki / _hdl_build / nx_ws_manifest_emit_gate.nx

nx_ws_manifest_emit_gate.nx

buildroot/runtime/_hdl_build/nx_ws_manifest_emit_gate.nx

5757 B94 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic ws
docsdependenciesstructsconstsfunctions

about

nx_ws_manifest_emit_gate.nx -- HERMETIC gate for the WMS durability emitter. Builds a private temp dir of fake project-*.md (+ decoy non-project files), a curated stub manifest, then drives wme_emit and asserts the manifest auto-index is COMPLETE and CORRECT. The load-bearing test is the LOSS-DETECTOR negative control (T5/T6): after a NEW workstream appears on disk, wme_is_stale MUST flag it (1), and re-emitting MUST clear it (0) -- that is "never lose a workstream" proven mechanically, not asserted. Sovereign: imports nx_syscalls + the lib only. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_ws_index_lib.nx nx_ws_manifest_emit_gate.nx

imports: nx_syscalls.nxnx_ws_index_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gp sys_write sys_mkdir gwrite sys_mmap sys_openat_wr sys_write ↻ gstrlen sys_close wme_emit sys_mmap ↻ wme_scan sys_openat_rd sys_mmap ↻ wme_getdents wme_is_project wme_len wme_join sys_fstatat sys_close ↻ wme_read sys_openat_rd ↻ sys_read sys_close ↻ sys_fstatat ↻ wme_find wme_len ↻ wme_cat wme_len ↻ wme_catn sys_mmap ↻ sys_openat_wr ↻ wme_write_all sys_write ↻ sys_close ↻ sys_renameat gn sys_mmap ↻ sys_write ↻

structs

none

consts

10const G_DIR: *u8 = "/tmp/nx_wme_gate"
11const G_MAN: *u8 = "/tmp/nx_wme_gate/manifest.md"

functions

13func gp(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
14func gn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
23func gstrlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: gwrite
26func gwrite(fname: *u8, content: *u8) -> i64
44func gman_has(needle: *u8) -> i64
called by 1: main calls 3: sys_mmapwme_readwme_find
52func main(argc: i64, argv: *i64) -> i64