code wiki / _hdl_build / nx_legal_portal_gate.nx
nx_legal_portal_gate.nx
buildroot/runtime/_hdl_build/nx_legal_portal_gate.nx
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
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
structs
| none |
consts
| 29 | const LP_LOG: *u8 = "knowledge/status/legal_portal.log" |
functions
| 31 | 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 } |
| 32 | func ewn(fd: i64, v: i64) -> i64 |
| 41 | func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 42 | 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 |
| 43 | func g_starts(buf: *u8, n: i64, s: *u8) -> i64 |
| 50 | func g_contains(hay: *u8, n: i64, needle: *u8) -> i64 |
| 63 | func mk_seal(s: *NxSeal, dt: i64, ewills: i64, signer: *u8, ts: i64, |
| 73 | func main() -> i64 |