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
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
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
structs
| none |
consts
| 25 | const LPB_LOG: *u8 = "knowledge/status/legal_portal_boot.log" |
| 26 | const LPB_BASE: *u8 = "/tmp/nx_lpb_" |
functions
| 28 | func 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 } |
| 29 | func ewn(fd: i64, v: i64) -> i64 |
| 38 | func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 39 | func 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 |
| 40 | func g_starts(buf: *u8, n: i64, s: *u8) -> i64 |
| 47 | func g_contains(hay: *u8, n: i64, needle: *u8) -> i64 |
| 60 | func mk_seal(s: *NxSeal, dt: i64, ewills: i64, signer: *u8, ts: i64, |
| 70 | func main() -> i64 |