code wiki / _hdl_build / nx_ui_struct.nx

nx_ui_struct.nx

buildroot/runtime/_hdl_build/nx_ui_struct.nx

9546 B154 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic ui
docsdependenciesstructsconstsfunctions

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

nx_tool_run.nx nx_ui_struct.nx

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

main us_w tr_run_capture sys_mmap sys_pipe2 sys_fork sys_close sys_dup3 sys_execve_clean sys_close ↻ sys_execve sys_exit sys_read sys_wait4 wait_exit_code us_fp us_count us_b us_bn sys_openat_wr sys_renameat us_reads sys_read ↻

structs

none

consts

14const K_MAGIC_30000: i64 = 30000
15const K_MAGIC_524288: i64 = 524288
16const K_MAGIC_4096: i64 = 4096
17const K_MAGIC_1024: i64 = 1024
18const K_MAGIC_8192: i64 = 8192
19const K_MAGIC_8000: i64 = 8000
20const K_MAGIC_16384: i64 = 16384

functions

22func 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
23func 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
24func 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
25func us_count(buf: *u8, n: i64, pat: *u8) -> i64
called by 1: us_fp
39func us_reads(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 1: sys_read
49func us_fp(buf: *u8, n: i64, fp: *i64) -> i64
called by 1: main calls 1: us_count
64func main(argc: i64, argv: *i64) -> i64