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

16131 B259 linesdepth 9pulls 25 transitivereach 0 importersview sourcekind gate/prooftopic office
docsdependenciesstructsconstsfunctions

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

nx_office_serve.nx nx_gate_verdict.nx nx_office_import_sign_gate.nx

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

main gv_head gv_puts sys_write gv_ctr 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 ↻ of_cat of_catn nxi_buf gv_puts ↻ og_post of_cat ↻ of_catn ↻ of_slen of_handle of_handle_auth of_meref of_cat ↻ of_slen ↻ of_seq of_hdr_get of_slen ↻ of_memhas of_slen ↻ of_atoi of_ct_boundary

structs

none

consts

11const OG_SCRATCH: *u8 = "/tmp/nx_office_import_sign_gate"
12const OG_WORD_FIXTURE: *u8 = "knowledge/fetched/cmp_legalpractice_msword_fixture.docx"
13const OG_DIRMODE: i64 = 493
14const OG_OUTCAP: i64 = 1048576
15const OG_REQCAP: i64 = 2097152
16const OG_PATHCAP: i64 = 600
17const OG_SMALL: i64 = 256
18const OG_SZP: i64 = 16
19const OG_BOUNDARY: *u8 = "nxOfficeGateBoundary7f3a"
20const OG_DOCX_CT: *u8 = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
21const 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"
22const OG_WORD_MIN_LINES: i64 = 10

functions

24func og_path(out: *u8, root: *u8, tail: *u8) -> i64
called by 1: main calls 1: of_cat
31func og_post(root: *u8, base: *u8, path: *u8, body: *u8, req: *u8, out: *u8) -> i64
called by 1: main calls 4: of_catof_catnof_slenof_handle
40func og_get(root: *u8, base: *u8, path: *u8, req: *u8, out: *u8) -> i64
called by 1: main calls 2: of_catof_handle
48func og_import(root: *u8, base: *u8, name: *u8, filename: *u8, bytes: *u8, n: i64, withfile: i64, req: *u8, body: *u8, out: *u8) -> i64
called by 1: main calls 3: of_catof_catnof_handle
75func og_status_is(out: *u8, n: i64, code: *u8) -> i64
called by 1: main calls 1: of_memhas
80func og_body_off(out: *u8, n: i64) -> i64
called by 1: main
88func og_same(a: *u8, an: i64, b: *u8, bn: i64) -> i64
called by 1: main
95func og_count_lines(buf: *u8, n: i64) -> i64
called by 1: main
102func og_read(path: *u8, outp: *i64) -> i64
called by 1: main
113func og_field(buf: *u8, n: i64, key: *u8, out: *u8, cap: i64) -> i64
called by 1: main calls 2: of_slenof_memhas
132func main() -> i64