code wiki / _hdl_build / nx_ui_struct.nx
nx_ui_struct.nx
buildroot/runtime/_hdl_build/nx_ui_struct.nx
about
nx_ui_struct.nx -- ui-validation (the DETERMINISTIC, LLM-FREE structural-regression core of the operator's
DARPA/Tier-1 hybrid UI-testing architecture, Section 2.A). NO semantic reasoning, NO model: it captures a
page's STRUCTURAL FINGERPRINT (the interactive-role + landmark inventory of the DOM = an AXTree-lite over
the served HTML) and diffs current-vs-baseline to flag STRUCTURAL REGRESSIONS instantly -- e.g. a <button>
silently becoming a <div onclick> (the architecture's exact example: role downgrade = a11y + test-hook
regression). Deterministic, ~ms, air-gapped-capable (fork-captures nx_https_get for the fetch only).
HONEST ENVELOPE: structural-inventory fingerprint (tag/landmark census + non-semantic-interaction smell),
NOT full Zhang-Shasha tree-edit-distance over a real AXTree (that needs the sovereign browser's live
accessibility tree = filed next rung). Single baseline at a time.
nx_ui_struct baseline <url> [connect] | check <url> [connect]
exit: 0 GREEN(no regression) | 3 STRUCTURAL-REGRESSION | 4 fetch/baseline-fail | 2 usage.
license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_tool_run.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
| 14 | const K_MAGIC_30000: i64 = 30000 |
| 15 | const K_MAGIC_524288: i64 = 524288 |
| 16 | const K_MAGIC_4096: i64 = 4096 |
| 17 | const K_MAGIC_1024: i64 = 1024 |
| 18 | const K_MAGIC_8192: i64 = 8192 |
| 19 | const K_MAGIC_8000: i64 = 8000 |
| 20 | const K_MAGIC_16384: i64 = 16384 |
functions
| 22 | func us_w(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 |
| 23 | func us_b(rep: *u8, pos: i64, s: *u8) -> i64 { var p: i64 = pos; var i: i64 = 0; while s[i] != (0 as u8) { if p < K_MAGIC_30000 { rep[p] = s[i]; p = p + 1 } i = i + 1 } return p } called by 1: main |
| 24 | func us_bn(rep: *u8, pos: i64, v: i64) -> i64 { var p: i64 = pos; var m: i64 = v; if m < 0 { if p < K_MAGIC_30000 { rep[p] = 45 as u8; p = p + 1 } m = 0 - m } let t: *u8 = sys_mmap(28); var k: i64 = 0; if m == 0 { t[0] = 48 as u8; k = 1 } while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 } var i: i64 = 0; while i < k { if p < K_MAGIC_30000 { rep[p] = t[k - 1 - i]; p = p + 1 } i = i + 1 } return p } called by 1: main |
| 25 | func us_count(buf: *u8, n: i64, pat: *u8) -> i64 called by 1: us_fp |
| 39 | func us_reads(path: *u8, buf: *u8, cap: i64) -> i64 |
| 49 | func us_fp(buf: *u8, n: i64, fp: *i64) -> i64 |
| 64 | func main(argc: i64, argv: *i64) -> i64 |