code wiki / _hdl_build / nx_cdmap_interact_gate.nx

nx_cdmap_interact_gate.nx

buildroot/runtime/_hdl_build/nx_cdmap_interact_gate.nx

8401 B135 linesdepth 10pulls 53 transitivereach 0 importersview sourcekind gate/prooftopic cdmap
docsdependenciesstructsconstsfunctions

about

nx_cdmap_interact_gate.nx -- referee for the position map's INTERACTION DOOR (datavis DV8 cdp_interact, 2026-09-15). The door is ONE inline script the compare base emits after the 2D cut: hover or focus reveals a mark's values, a legend button toggles a player, dragging brushes a region whose players are listed and whose bounds are written into the URL hash as the trace (cdsel=xlo,xhi,ylo,yhi in permil on the cut axes). This gate drives cdp_interact IN-PROCESS onto a /tmp file and holds the emitted door to its contract: the fit domains and the plot frame it was handed are the numbers in the script (so a brush converts pixels with the same domains the page drew with), the trace key is built from a character code (the lexer forbids '#' and '!' in a literal, and the script must carry neither -- the neg-control counts the bytes), the three interactions are wired, and the trace is re-applied on load. When the live search page is on disk, its door is cross-checked structurally (buttons equal marks inside the cdmap svg, one script, one output), announced through gv_kv and never gv_need. SCOPE STATED: a script executed by a browser is the oracle OUTSIDE the path; this gate proves the door's STRUCTURE and its numbers, never that a browser ran it. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_swcompare_lib.nx nx_syscalls.nx nx_gate_verdict.nx nx_cdmap_interact_gate.nx

imports: nx_swcompare_lib.nxnx_syscalls.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_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 ↻ gv_head gv_puts sys_write ↻ sys_mkdir sys_mmap ↻ sys_openat_wr gv_check gv_puts ↻ cdp_interact w sys_write ↻ wn w ↻ sys_mmap ↻ sys_write ↻ apply push nx_sat_move_to_processed nx_result_err sys_mmap ↻ nx_sat_proc_at nx_result_ok sys_mmap ↻

structs

none

consts

16const G_DIR: *u8 = "/tmp/nx_cdmap_interact_gate/"
17const G_OUT: *u8 = "/tmp/nx_cdmap_interact_gate/door.html"
18const G_LIVE_PAGE: *u8 = "sites/nishifamily/compare/search/index.html"
19const G_LIVE_API: *u8 = "sites/nishifamily/compare/search/api.json"
20const G_MODE_644: i64 = 420
21const G_DIR_MODE: i64 = 493
22const G_XLO: i64 = 700
23const G_XHI: i64 = 1000
24const G_YLO: i64 = 0
25const G_YHI: i64 = 350
26const G_STEP: i64 = 50
27const G_CH_HASH: i64 = 35
28const G_CH_BANG: i64 = 33
29const G_I64_BYTES: i64 = 8

functions

31func g_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: g_countg_find
33func g_count(buf: *u8, from: i64, to: i64, needle: *u8) -> i64
called by 2: g_hasmain calls 1: g_slen
46func g_find(buf: *u8, from: i64, to: i64, needle: *u8) -> i64
called by 1: main calls 1: g_slen
58func g_has(buf: *u8, n: i64, needle: *u8) -> i64 { if g_count(buf, 0, n, needle) > 0 { return 1 } return 0 }
called by 1: main calls 1: g_count
59func g_count_byte(buf: *u8, n: i64, code: i64) -> i64 { var c: i64 = 0; var i: i64 = 0; while i < n { if (buf[i] as i64) == code { c = c + 1 } i = i + 1 } return c }
called by 1: main
61func main() -> i64