code wiki / _hdl_build / nx_spore_manifest_gate.nx

nx_spore_manifest_gate.nx

buildroot/runtime/_hdl_build/nx_spore_manifest_gate.nx

10108 B205 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic spore
docsdependenciesstructsconstsfunctions

about

nx_spore_manifest_gate.nx -- X-SEED-001 / V-SPORE manifest: the GERMINATION MANIFEST (the seed body, "the .torrent of the organism"). Generalizes the proven single-piece germination (V-SPORE-1, nx_spore_germ_gate) to a LAYERED, MULTI-piece, content-addressed seed: PACK -- FNV-1a each piece's source bytes; EMIT germination_manifest.tsv (id <tab> source <tab> hash <tab> layer <tab> kat_expect) = a real persisted seed. GERMINATE -- in LAYER order, per piece: re-read source (received), FNV-1a, verify == packed hash (INTEGRITY), materialize, REBUILD via the sovereign toolchain, run -> exit == kat_expect (BEHAVIOR/KAT). ADMIT iff both. NEG -- one piece tampered (a byte flipped) -> hash mismatch -> REJECTED, never built. READ-BACK -- re-read the emitted manifest; data-row count must == piece count (seed persisted). verdict GREEN iff ADMIT-ALL + NEG-REJECT + ROWS==N. HONEST scope: verification uses the in-run packed hashes + a persisted-manifest read-back; full content-addressing FROM the persisted manifest (re-parse the recorded hash) and AUTO-DERIVING the piece set from the capability registry/lineage (X-SEED-001 full) are next rungs. Build/run (from nxc2 cwd): _offc/nx_sov_build_run.elf nx_spore_manifest_gate genealogy_id: nishi_spore_seed_portability_charter (X-SEED-001 / V-SPORE manifest)

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_spore_manifest_gate.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main g_puts sys_write g_slen sys_mmap sys_openat_wr sys_exit g_puts_fd sys_write ↻ g_slen ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_close ↻ germ_hash g_man_row g_puts_fd ↻ g_tab sys_mmap ↻ sys_write ↻ g_putn sys_mmap ↻ sys_write ↻ sys_write ↻ g_putn ↻ sys_write ↻ g_rebuild_run sys_mmap ↻ g_run sys_fork sys_dup3 sys_execve sys_exit ↻ sys_mmap ↻ sys_wait4 sys_openat_append sys_now_realtime_sec

structs

none

consts

22const GERM_FNV_OFFSET: i64 = 0 - 3750763034362895579 // 0xcbf29ce484222325
23const GERM_FNV_PRIME: i64 = 1099511628211 // 0x100000001b3
24const MAN_PATH: *u8 = "knowledge/registry/germination_manifest.tsv"
25const N_PIECES: i64 = 2

functions

27func germ_hash(buf: *u8, len: i64) -> i64
called by 1: main
33func g_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: g_putsg_puts_fd
34func g_puts(s: *u8) -> i64 { sys_write(1, s, g_slen(s)); return 0 }
called by 1: main calls 2: sys_writeg_slen
35func g_puts_fd(fd: i64, s: *u8) -> i64 { sys_write(fd, s, g_slen(s)); return 0 }
called by 2: g_man_rowmain calls 2: sys_writeg_slen
36func g_tab(fd: i64) -> i64 { let t: *u8 = sys_mmap(8); t[0] = 9; sys_write(fd, t, 1); return 0 }
called by 1: g_man_row calls 2: sys_mmapsys_write
37func g_putn(fd: i64, v: i64) -> i64
called by 2: g_man_rowmain calls 2: sys_mmapsys_write
51func g_run(path: *u8, argv: *i64, redir_out: i64, redir_err: i64) -> i64
66func g_rebuild_run(basename: *u8) -> i64
called by 1: main calls 2: sys_mmapg_run
75func g_man_row(fd: i64, id: *u8, src: *u8, hash: i64, layer: i64, kat: i64) -> i64
called by 1: main calls 4: g_puts_fdg_tabg_putnsys_write
84func main() -> i64