code wiki / _hdl_build / nx_ws_setstate.nx

nx_ws_setstate.nx

buildroot/runtime/_hdl_build/nx_ws_setstate.nx

2049 B48 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind tooltopic ws
docsdependenciesstructsconstsfunctions

about

nx_ws_setstate.nx -- transition ONE registry stream's state: the honest reconcile tool for stale labels (ROOT-TRACE BLOCKED-but-GREEN; phantom age=-1 ACTIVE labels). ws_put's an updated record into the live registry (latest version wins; existing ws:ids membership is preserved, so this is a pure state edit). Single responsibility (rule 9). Reuses the keystone's record/key builders. nx_ws_setstate <id> <state> <empire> <memlink> state must be one of ACTIVE|DONE|BLOCKED|FLOATING|ABSENT. Sovereign. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_ws_ingest.nx nx_workstream_store.nx nx_seg_store.nx nx_syscalls.nx nx_ws_setstate.nx

imports: nx_ws_ingest.nxnx_workstream_store.nxnx_seg_store.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sp sys_write sys_exit sys_now_realtime_sec sys_mmap sys_clock_gettime_real sys_mmap ↻ wsi_build_key wsi_build_record wme_cat wme_catn sys_mmap ↻ ws_put sys_mmap ↻ sys_openat_append ws_put_p sys_mmap ↻ ws_len ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_scan_seglist ss_len sys_mmap ↻ ss_cat ss_readall ss_r32 ss_begin ss_begin_cap sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len ↻ ws_seg_next ss_next_segid

structs

none

consts

11const K_MAGIC_1024: i64 = 1024

functions

13func sp(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 sn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
24func main(argc: i64, argv: *i64) -> i64