code wiki / _hdl_build / nx_office_import_sign_gate.nx
nx_office_import_sign_gate.nx
buildroot/runtime/_hdl_build/nx_office_import_sign_gate.nx
about
nx_office_import_sign_gate.nx -- INDEPENDENT GATE for the office IMPORT (LP1) and SIGN-FROM-VERSION (LP4) rungs of
/compare/legalpractice. Drives the pure core nx_office_serve IN-PROCESS (of_handle, real HTTP bytes, no sockets)
against a FRESH fixture under /tmp/<gate>/<now_us> (never a production plane). Inherits nx_gate_verdict: one
gv_check per tooth, gv_bite for the consent gate (fires on no-consent, silent on consent), gv_verdict carries the
verdict in the EXIT CODE. Two import fixtures: a .docx the office itself wrote (mechanism) and a GENUINE Microsoft
Word document banked in knowledge/fetched (real-world producer: 25 parts, headers, footnotes, a 13-column table).
Runs the REAL format organs (_offc/nx_docx.elf) via fork+exec, so it runs from the nishihost root. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_office_serve.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
structs
| none |
consts
| 11 | const OG_SCRATCH: *u8 = "/tmp/nx_office_import_sign_gate" |
| 12 | const OG_WORD_FIXTURE: *u8 = "knowledge/fetched/cmp_legalpractice_msword_fixture.docx" |
| 13 | const OG_DIRMODE: i64 = 493 |
| 14 | const OG_OUTCAP: i64 = 1048576 |
| 15 | const OG_REQCAP: i64 = 2097152 |
| 16 | const OG_PATHCAP: i64 = 600 |
| 17 | const OG_SMALL: i64 = 256 |
| 18 | const OG_SZP: i64 = 16 |
| 19 | const OG_BOUNDARY: *u8 = "nxOfficeGateBoundary7f3a" |
| 20 | const OG_DOCX_CT: *u8 = "application/vnd.openxmlformats-officedocument.wordprocessingml.document" |
| 21 | const OG_SEED_SPEC: *u8 = "name=seed&kind=doc&spec=H+Seed+Title%0AP+A+paragraph+of+body+text.%0AT+a%7Cb%7Cc%0AT+1%7C2%7C3" |
| 22 | const OG_WORD_MIN_LINES: i64 = 10 |
functions
| 24 | func og_path(out: *u8, root: *u8, tail: *u8) -> i64 |
| 31 | func og_post(root: *u8, base: *u8, path: *u8, body: *u8, req: *u8, out: *u8) -> i64 |
| 40 | func og_get(root: *u8, base: *u8, path: *u8, req: *u8, out: *u8) -> i64 |
| 48 | func og_import(root: *u8, base: *u8, name: *u8, filename: *u8, bytes: *u8, n: i64, withfile: i64, req: *u8, body: *u8, out: *u8) -> i64 |
| 75 | func og_status_is(out: *u8, n: i64, code: *u8) -> i64 |
| 80 | func og_body_off(out: *u8, n: i64) -> i64 called by 1: main |
| 88 | func og_same(a: *u8, an: i64, b: *u8, bn: i64) -> i64 called by 1: main |
| 95 | func og_count_lines(buf: *u8, n: i64) -> i64 called by 1: main |
| 102 | func og_read(path: *u8, outp: *i64) -> i64 called by 1: main |
| 113 | func og_field(buf: *u8, n: i64, key: *u8, out: *u8, cap: i64) -> i64 |
| 132 | func main() -> i64 |