code wiki / _hdl_build / nx_proj_pulse.nx

nx_proj_pulse.nx

buildroot/runtime/_hdl_build/nx_proj_pulse.nx

21497 B456 linesdepth 7pulls 8 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_proj_pulse.nx -- NAP1: THE PUBLISHED PROJECT PULSE. One organ composes a compare domain's rank artifact (nx_compare_rank's <dom>.rank), its sovereign project plane (nishi_project prj:/mem:/not: + vizsla tsk:/don: records) and derives DRIFT between them, then emits ONE public page -- the team's queue, board, journal (findings / recommendations / decisions) and the disagreements, visible beside the compare board they serve. This is the publish leg of the Nishi Autonomous Project loop (pmdash NAP1; field bar = the AI-Scientist publish-what-you-did loop, grounded our way: every claim on the page comes from an artifact -- the rank file, the plane, never prose). nx_proj_pulse emit <dom> <prefix> <pid> <rankfile> <outpath|-> -> compose + write the page nx_proj_pulse -> selftest (unique /tmp fixtures) REFUSES loud on a missing rank artifact or an empty/unknown project (abstain, never fabricate). DRIFT rules (v1, detection only -- filing is NAP3): a ranked rung with no project task = UNSYNCED; a task marked DONE whose rung is still OPEN on the board = EVIDENCE-DISAGREE (the contract symbol has not landed, so the board refuses the claim). COMPOSES nx_project.nx (pj_gather/pj_state/pj_put) -- one gatherer, one writer, no duplicate ruler. Verdict teeth are self-contained counters with the canonical verdict LAST and the exit code carrying it; migration onto per-tooth gv_check is the named D001 residual, not silently skipped. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_project.nx nx_proj_pulse.nx

imports: nx_syscalls.nxnx_project.nx

imported by: nobody (leaf or entry point)

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

main pp_selftest pp_p sys_write pp_slen sys_now_us sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_clock_gettime_mono sys_mmap ↻ pj_cat pj_catn sys_mmap ↻ sys_openat_wr sys_write ↻ pp_slen ↻ sys_close ss_begin ss_begin_cap sys_mmap ↻ pp_fx_rec pj_put sys_mmap ↻ canon_encode sys_mmap ↻ cc_cmp cc_w32

structs

none

consts

20const PP_BUF: i64 = 262144
21const PP_ROWCAP: i64 = 64

functions

23func pp_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
24func pp_p(s: *u8) -> i64 { sys_write(1, s, pp_slen(s)); return 0 }
25func pp_pn(v: i64) -> i64 { let b: *u8 = sys_mmap(32); var o: i64 = pj_catn(b, 0, v); sys_write(1, b, o); return 0 }
26func pp_contains(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: pp_selftest calls 1: pp_slen
40func pp_lower(src: *u8, dst: *u8, cap: i64) -> i64
called by 1: pp_emit
56func pp_esc(dst: *u8, off: i64, s: *u8) -> i64
called by 1: pp_emit calls 1: pj_cat
68func pp_pfield(b: *u8, ls: i64, le: i64, want: i64, out: *u8, cap: i64) -> i64
called by 1: pp_rank_load
95func pp_rank_load(path: *u8, rids: *i64, rstage: *i64, rtitle: *i64, rsym: *i64, rprio: *i64) -> i64
128func pp_task_idx(st: *i64, tid: *u8) -> i64
called by 1: pp_emit calls 1: pj_eq
137func pp_emit(dom: *u8, prefix: *u8, pid: *u8, rankfile: *u8, outpath: *u8) -> i64
325func pp_fx_rec(w: *i64, kp: *u8, keys: *i64, vals: *i64, nf: i64) -> i64 { return pj_put(keys, vals, nf, kp, w) }
called by 1: pp_selftest calls 1: pj_put
327func pp_check(ctr: *i64, name: *u8, got: i64) -> i64
called by 1: pp_selftest calls 1: pp_p
335func pp_selftest() -> i64
444func main(argc: i64, argv: *i64) -> i64