code wiki / (root) / nx_shard_validator.nx

nx_shard_validator.nx

buildroot/runtime/nx_shard_validator.nx

7042 B191 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic shard
docsdependenciesstructsconstsfunctions

about

nx_shard_validator.nx -- per-decl structural validator. Reads a JSONL shard (one decl per line) and verifies EVERY row: 1. row starts with '{' and ends with '}' 2. row contains "source":"<kind>" field 3. row contains "kind":<int> field 4. row contains "name":"<ident>" field 5. name is non-empty, ASCII, no control chars / whitespace inside 6. kind is in {1, 2} Emits per-violation FAIL line + aggregate counters. Exits non-zero if ANY row fails. This is the actual "per-decl smoke" the previous scale-only smoke conflated -- per honest-hard-verdict cardinal. genealogy_id: substrate_per_decl_validator_2026_05_14 lineage_id: honest_per_decl_smoke

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_shard_validator.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.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_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close println sys_write strlen sys_mmap ↻ print sys_write ↻ strlen ↻ print_i64 sys_mmap ↻ itoa sys_mmap ↻ sys_write ↻ nx_sv_validate_row nx_sv_find nx_sv_find ↻

structs

none

consts

27const K_MAGIC_1000000: i64 = 1000000

functions

31func nx_sv_find(buf: *u8, p: nx_int, end: nx_int, pat: *u8, pat_len: nx_int) -> nx_int
48func nx_sv_validate_row(buf: *u8, lo: nx_int, hi: nx_int) -> nx_int
called by 1: main calls 1: nx_sv_find
96func main() -> nx_exit