code wiki / _hdl_build / nx_legal_portal_gate.nx

nx_legal_portal_gate.nx

buildroot/runtime/_hdl_build/nx_legal_portal_gate.nx

11219 B235 linesdepth 12pulls 19 transitivereach 0 importersview sourcekind gate/prooftopic legal
docsdependenciesstructsconstsfunctions

about

nx_legal_portal_gate.nx -- GATE for LEGAL D6 (nx_legal_portal). SOVEREIGN in-process referee (the nx_status_daemon_gate pattern): NO socket, NO curl, NO shell. It builds one tenant's real workflow stores (a SENT contract with 1-of-2 signed via a REAL Ed25519 seal, a Will refused into REQUIRES_WET, a vault doc, a pending checklist), then feeds crafted HTTP request BYTES straight into lp_handle and asserts the response bytes -- proving the portal composes D0/D1/D2/D3/D4 + nx_authz + tenant isolation. Each test has a negative control: T1 GET /portal/envelopes -> 200 + both envelopes + their statuses T2 GET /portal/status?env=C -> 200 + SENT + UETA_GENERAL + "1 of 2" T3 GET /portal/doc?id=V -> 200 + application/pdf + BYTE-EXACT body (D3) T4 GET /portal/doc?id=bogus -> 404 (tenant vault does not own it) T5 GET /staff/matters -> 403 as client(lvl1) / 200 as lawyer(lvl2) T6 GET /portal/status?env=W -> 200 + REQUIRES_WET + "wet signature required" (never-void SURFACED, not silently signable) T7 GET /portal/checklist?doc=V-> 200 + "remaining 1 NOT_READY"; /portal/bogus -> 404 Evidence -> knowledge/status/legal_portal.log license_tier: ORIGINAL

dependencies 8 imports · 0 importers

nx_legal_portal.nx nx_doc_envelope.nx nx_doc_serve.nx nx_doc_annotate.nx nx_doc_vault.nx nx_doc_seal.nx nx_legal_compliance.nx nx_syscalls.nx nx_legal_portal_gate.nx

imports: nx_legal_portal.nxnx_doc_envelope.nxnx_doc_serve.nxnx_doc_annotate.nxnx_doc_vault.nxnx_doc_seal.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

29const LP_LOG: *u8 = "knowledge/status/legal_portal.log"

functions

31func 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
32func ewn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
41func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
42func 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
43func g_starts(buf: *u8, n: i64, s: *u8) -> i64
called by 1: main calls 1: slen
50func g_contains(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: slen
63func mk_seal(s: *NxSeal, dt: i64, ewills: i64, signer: *u8, ts: i64,
called by 1: main calls 2: slennx_seal_create
73func main() -> i64