code wiki / _hdl_build / nx_office_live_verify.nx
nx_office_live_verify.nx
buildroot/runtime/_hdl_build/nx_office_live_verify.nx
about
nx_office_live_verify.nx -- SOVEREIGN live verification of the PUBLIC Nishi Office app, every rung OURS on OUR
hardware: DNS -> TCP -> our TLS 1.3 handshake (X.509 vs the Mozilla trust store) -> HTTP GET/POST -> our HTTP
parser -> our dechunk -> byte assertions. REPLACES WebFetch / PowerShell Invoke-WebRequest (operator 2026-07-10:
"use the nishi apis"; [[feedback-verify-live-via-nishi-browser-not-webfetch]]). Clone of nx_survey_live_verify;
lv_fetch is byte-identical (the reusable bits-up request core), only the office assertions in main() differ.
GET /office -> 200 + Nishi Office home
POST /office/save (x2, A then B) -> 303 each (create/version the probe doc zz-live-verify)
GET /office/doc/zz-live-verify -> 200 + editable #ed + Restore column + diff link (>=2 versions)
GET /office/file/zz-live-verify/v1 -> 200 + "PK" (a real Word .docx, byte-produced by the gated organ)
GET /office/diff/zz-live-verify/1/2 -> 200 + "Changes: v1" + add/del rows (v1/v2 FROZEN forever -> stable)
POST /office/restore version=1 -> 303 (restore = additive new version; the never-lose exceed, live)
v1/v2 of zz-live-verify are frozen by the additive store, so these assertions are deterministic across runs even
as the probe doc accumulates versions. Exit 0 = the whole office served + interactive through our own browser
stack, no WebFetch. license_tier: ORIGINAL expect_exit: 0
dependencies 11 imports · 0 importers
diagram shows first 10 each side; +1 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_itoa_lib.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_tls13_client_validate_certificate.nxnx_tls13_client_session_run.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_https_get_complete.nxnx_https_post_complete.nxnx_http_response_parse.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 26 | const K_MAGIC_262144: i64 = 262144 |
| 27 | const K_MAGIC_16384: i64 = 16384 |
| 28 | const K_MAGIC_4194304: i64 = 4194304 |
functions
| 30 | func lv_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 35 | func lv_n(v: i64) -> i64 { nxi_out(v); return 0 } calls 1: nxi_out |
| 36 | func lv_check(pass: i64, label: *u8, fails: *i64) -> i64 calls 1: lv_w |
| 41 | func lv_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: lv_has |
| 42 | func lv_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){dst[off+i]=s[i]; i=i+1} return off+i } |
| 43 | func lv_catb(dst: *u8, off: i64, src: *u8, n: i64) -> i64 { var i: i64=0; while i<n { dst[off+i]=src[i]; i=i+1 } return off+n } |
| 44 | func lv_catnum(dst: *u8, off: i64, v: i64) -> i64 calls 1: sys_mmap |
| 55 | func lv_has(buf: *u8, n: i64, needle: *u8) -> i64 calls 1: lv_slen |
| 70 | func lv_fetch(store: *TrustStore, is_post: i64, path: *u8, plen: i64, body: *u8, blen: i64, |
| 128 | func main() -> i64 |