code wiki / _hdl_build / nx_common_tasks.nx

nx_common_tasks.nx

buildroot/runtime/_hdl_build/nx_common_tasks.nx

11964 B212 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_common_tasks.nx -- THE COMMON-TASK CANONICAL REGISTRY (operator 2026-07-17: "arent thing like api and cron a workstream ... we need logical reviews of all these common tasks that should be unified"). A sovereign seg-store catalog (knowledge/store/commontask-) of the recurring ecosystem "verbs": for each, the ONE canonical organ, its RACI owner, exposure state, and the CONSOLIDATION DEBT (how many bespoke duplicates bypass the canonical). This is the logical review made DURABLE + STORE-LAW (no flat .tsv) + OWNED -- the SSOT future sessions consult so nobody re-hand-rolls publish/cron/gate/seed again. Reuses frs_seed/frs_load (the generic tsv-buffer<->seg-store codec) -- dogfooding the very "one store-seed, not 30 bespoke" unification this registry records as debt. verbs: seed | list (default -> JSON, the api/mcp/agent interchange) | html (-> argv[2] or stdout) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 4 imports · 0 importers

nx_frontier_store.nx nx_seg_store.nx nx_syscalls.nx nx_html_head.nx nx_common_tasks.nx

imports: nx_frontier_store.nxnx_seg_store.nxnx_syscalls.nxnx_html_head.nx

imported by: nobody (leaf or entry point)

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

main ct_seed sys_mmap ct_row ct_puts sts_lock sts_mm sys_mmap ↻ sts_werr sys_write sys_exit ss_cat sys_openat_append sts_werr ↻ sys_flock frs_seed sts_seed ss_begin_cap sys_mmap ↻ sts_mm ↻ sts_rowkey ss_catn sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len ss_catn ↻ ss_commit ss_segid_ok sys_mmap ↻ ss_cat ↻ ss_catn ↻ sys_write ↻ ss_write_seg ss_segid_ok ↻ sys_mmap ↻ ss_cat ↻ ss_catn ↻ sys_write ↻

structs

none

consts

16const CT_PREFIX: *u8 = "knowledge/store/commontask-"
17const CT_NREC: i64 = 10 // number of catalog records
18const CT_NFLD: i64 = 7 // fields per record
19const CT_TAB: i64 = 9
20const CT_NL: i64 = 10
21const CT_ZERO: i64 = 48
22const CT_HTMLH: i64 = 104 // 'h' -- html verb selector
23const CT_SEEDS: i64 = 115 // 's' -- seed verb selector
24const CT_QCAP: i64 = 262144
25const CT_OUTCAP: i64 = 262144
26const CT_SPWORDS: i64 = 16 // 7 fields * 2 (start,end) + slack, in i64
27const CT_STDERR: i64 = 2
28const CT_ARGC_OUT: i64 = 3
29const CT_IDX_OUT: i64 = 2
30const CT_PAIR: i64 = 2 // ct_cols stores each field as a (start,end) pair
31const CT_DQUOTE: i64 = 34 // '"' -- JSON escape
32const CT_BSLASH: i64 = 92 // '\' -- JSON escape
33const CT_MODE: i64 = 0x1a4 // 0644 html out perms
34const CT_I64: i64 = 8 // sizeof(i64) -- sp pair-array stride
35const CT_VHTML: i64 = 2 // verb selector: emit HTML board
37const CTF_TASK_A: i64 = 0
38const CTF_TASK_B: i64 = 1
39const CTF_ORGAN_A: i64 = 2
40const CTF_ORGAN_B: i64 = 3
41const CTF_OWNER_A: i64 = 4
42const CTF_OWNER_B: i64 = 5
43const CTF_EXP_A: i64 = 6
44const CTF_EXP_B: i64 = 7
45const CTF_STATE_A: i64 = 8
46const CTF_STATE_B: i64 = 9
47const CTF_DUPS_A: i64 = 10
48const CTF_DUPS_B: i64 = 11
49const CTF_NOTE_A: i64 = 12
50const CTF_NOTE_B: i64 = 13

functions

52func ct_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: ct_werr
53func ct_werr(s: *u8) -> i64 { sys_write(CT_STDERR, s, ct_slen(s)); return 0 }
called by 1: main calls 2: sys_writect_slen
54func ct_puts(buf: *u8, off: i64, s: *u8) -> i64
called by 2: ct_rowmain
60func ct_putsl(buf: *u8, off: i64, q: *u8, a: i64, b: i64) -> i64
called by 1: main
67func ct_putj(buf: *u8, off: i64, q: *u8, a: i64, b: i64) -> i64
called by 1: main
80func ct_cols(q: *u8, ls: i64, le: i64, sp: *i64) -> i64
called by 1: main
97func ct_row(buf: *u8, o: i64, rec: *u8) -> i64
called by 1: ct_seed calls 1: ct_puts
103func ct_seed() -> i64
127func main(argc: i64, argv: *i64) -> i64