code wiki / _hdl_build / nx_schema_backfill.nx

nx_schema_backfill.nx

buildroot/runtime/_hdl_build/nx_schema_backfill.nx

16274 B322 linesdepth 18pulls 86 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_schema_backfill.nx -- CAPABILITY DISCOVERABILITY HARVESTER (seq1282). Every tool_allowlist.conf row lacking a knowledge/tool_schemas.conf row gets one AUTO-DERIVED from its source's own first header line (the tree-wide `// <stem>.nx -- <desc>` convention; the codewiki maker beat writes missing headers daily, so RE-RUNNING harvests newly documented organs). The register API keeps NEW tools discoverable by construction (seq722 fix) -- this organ only drains history. HONEST: no source / no `-- ` header / desc too short => SKIPPED + COUNTED, never guessed (blank beats bad). Append-if-absent via the API's own ma_schema_has_name tri-state (UNKNOWN refuses the WHOLE run -- a truncated read can never duplicate). nx_schema_backfill (JSON report: scanned/had_schema/filled/skipped_no_source/skipped_no_header) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_mgmt_api.nx nx_toolsafety_lib.nx nx_syscalls.nx nx_schema_backfill.nx

imports: nx_mgmt_api.nxnx_toolsafety_lib.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 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_openat_rd sbw sys_write ↻ sys_exit ↻ sys_read sys_close sb_ends sb_title_from_header sys_openat_rd ↻ sys_mmap ↻ sys_read ↻ sys_close ↻ sb_derive_flags sys_mmap ↻ ts_quad ts_reach ts_load_markers sys_mmap ↻ sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read ↻ sys_munmap

structs

none

consts

15const SB_ALCAP: i64 = 1 << 18
17const SB_HDRCAP: i64 = 4096
19const SB_TITLECAP: i64 = 300
21const SB_MINDESC: i64 = 20
23const SB_NAMECAP: i64 = 128
25const SB_PATHCAP: i64 = 512

functions

27func sbw(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
29func sb_ends(s: *u8, sl: i64, suf: *u8, fl: i64) -> i64
called by 1: main
56func sb_wflag(fd: i64, v: i64) -> i64
called by 1: sb_append
62func sb_derive_flags(path: *u8, box: *i64) -> i64
called by 1: main calls 2: sys_mmapts_quad
96func sb_append(nm: *u8, ti: *u8, box: *i64) -> i64
124func sb_title_from_header(path: *u8, ti: *u8) -> i64
178func main() -> i64