code wiki / _hdl_build / nx_schema_backfill.nx

nx_schema_backfill.nx

buildroot/runtime/_hdl_build/nx_schema_backfill.nx

11403 B240 linesdepth 18pulls 72 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 2 imports · 0 importers

nx_mgmt_api.nx nx_syscalls.nx nx_schema_backfill.nx

imports: nx_mgmt_api.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 sys_openat_rd sbw sys_write sys_exit sys_read sys_close ma_schema_has_name sys_read ↻ sb_ends sb_title_from_header sys_openat_rd ↻ sys_mmap ↻ sys_read ↻ sys_close ↻ sb_append sys_openat_append ma_ensure_trailing_nl sys_read ↻ ma_write_str ma_write_str ↻ sys_close ↻ sys_write ↻

structs

none

consts

14const SB_ALCAP: i64 = 1 << 18
16const SB_HDRCAP: i64 = 4096
18const SB_TITLECAP: i64 = 300
20const SB_MINDESC: i64 = 20
22const SB_NAMECAP: i64 = 128
24const SB_PATHCAP: i64 = 512

functions

26func 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
28func sb_ends(s: *u8, sl: i64, suf: *u8, fl: i64) -> i64
called by 1: main
36func sb_append(nm: *u8, ti: *u8) -> i64
52func sb_title_from_header(path: *u8, ti: *u8) -> i64
106func main() -> i64