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

10485 B217 linesdepth 13pulls 22 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 10 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_gate_verdict.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.nxnx_gate_verdict.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 ↻ 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

structs

none

consts

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

functions

29func 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
30func ewn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
39func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
40func 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
41func g_starts(buf: *u8, n: i64, s: *u8) -> i64
called by 1: main calls 1: slen
48func g_contains(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: slen
61func mk_seal(s: *NxSeal, dt: i64, ewills: i64, signer: *u8, ts: i64,
called by 1: main calls 2: slennx_seal_create
71func main() -> i64