code wiki / _hdl_build / nx_legal_portal_boot_gate.nx

nx_legal_portal_boot_gate.nx

buildroot/runtime/_hdl_build/nx_legal_portal_boot_gate.nx

9942 B209 linesdepth 13pulls 21 transitivereach 0 importersview sourcekind gate/prooftopic legal
docsdependenciesstructsconstsfunctions

about

nx_legal_portal_boot_gate.nx -- GATE for LEGAL D8 (nx_legal_portal_boot), ENGINEER verify. Proves the portal's tenant state SURVIVES A REBOOT: build a pctx with a SENT 1-of-2-signed envelope (real Ed25519 seal) + a vault doc + a pending checklist, persist it, then RELOAD into FRESH arrays (the restart) and serve through the real lp_handle router -- the persisted state must reappear. Each with a control: T1 ENVELOPES SURVIVE : after reload, GET /portal/envelopes -> "env 9601 status SENT" + "of 2" T2 SIGNATURES SURVIVE : GET /portal/status?env=9601 -> "SENT" + "signed 1 of 2" T3 CHECKLIST SURVIVES : GET /portal/checklist?doc=8601 -> "remaining 1" T4 NEG no-load : a fresh pctx with NO reload shows NO envelope (the reload is what restored it) T5 FIRST-BOOT clean : loading a tenant with NO files -> empty (env_count 0), not garbage Evidence -> knowledge/status/legal_portal_boot.log license_tier: ORIGINAL

dependencies 9 imports · 0 importers

nx_legal_portal_boot.nx nx_legal_portal.nx nx_doc_envelope.nx nx_doc_annotate.nx nx_doc_vault.nx nx_doc_seal.nx nx_legal_store.nx nx_legal_compliance.nx nx_syscalls.nx nx_legal_portal_boot_gate.nx

imports: nx_legal_portal_boot.nxnx_legal_portal.nxnx_doc_envelope.nxnx_doc_annotate.nxnx_doc_vault.nxnx_doc_seal.nxnx_legal_store.nxnx_legal_compliance.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 nx_env_create nx_legal_doc_classify lc_ci_contains lc_slen lc_lower nx_legal_regime nx_legal_is_excluded nx_env_add_recipient nx_env_send ne_find_env nx_env_required_signers mk_seal slen nx_seal_create sys_mmap ↻ nx_legal_verdict nx_legal_regime ↻ nx_seal_canonical sl_cat ed25519_sign_full sys_mmap ↻ ed25519_sha512 sys_mmap ↻ sha512_init sha512_update sha512_blk_set_byte sha512_compress sha512_final sha512_blk_set_byte ↻ sha512_compress ↻ ge_p3_alloc sys_mmap ↻ fe_alloc nx_scratch fe_zero ed25519_basepoint_p3 sys_mmap ↻ ge_p3_decompress

structs

none

consts

25const LPB_LOG: *u8 = "knowledge/status/legal_portal_boot.log"
26const LPB_BASE: *u8 = "/tmp/nx_lpb_"

functions

28func ew(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 1: main calls 1: sys_write
29func ewn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
38func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
39func g_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { d[o + i] = s[i]; i = i + 1 } return o + i }
called by 1: main
40func g_starts(buf: *u8, n: i64, s: *u8) -> i64
called by 1: main calls 1: slen
47func g_contains(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: slen
60func mk_seal(s: *NxSeal, dt: i64, ewills: i64, signer: *u8, ts: i64,
called by 1: main calls 2: slennx_seal_create
70func main() -> i64