code wiki / _hdl_build / nx_jsemit_gate.nx

nx_jsemit_gate.nx

buildroot/runtime/_hdl_build/nx_jsemit_gate.nx

7364 B133 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_jsemit_gate.nx -- THE EMITTED PAGE'S JAVASCRIPT MUST LEX BEFORE IT REACHES A BROWSER. WHY THIS EXISTS. 2026-08-25 an edit to nx_game_page_emit's emitted guard went through build -> promote -> ship lane -> live docroot and took /world/beach and /world/craft to a BLACK SCREEN. Every gate in that chain was GREEN: the organ compiled, the wasm-vm gate passed with a PAINTS tooth, and the ship lane read the page back and verified its marker. NOT ONE OF THEM LOOKED AT THE JAVASCRIPT. The estate emits ~410 KB of it per page, and one stray brace or unterminated string takes the entire script down -- at which point even the software-renderer FALLBACK never runs, which is the difference between a page that looks wrong and a page that shows nothing. ★A PIPELINE THAT VERIFIES EVERY STAGE EXCEPT THE ARTIFACT'S OWN LANGUAGE IS GREEN ALL THE WAY TO THE OUTAGE. THE SUBJECT IS THE SHIPPED FILE, not a fixture: it reads the live docroot page directly, on the NAS, with sys_read_file -- which sizes its buffer from the file and cannot short-read. Every attempt to inspect this page through the MCP transport during the incident CORRUPTED IT (a windowed read injects a marker every 160 KB and one lands inside the base64 wasm blob), so a checker that read it that way would report faults that exist only in the capture. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_jsbalance.nx nx_gate_verdict.nx nx_jsemit_gate.nx

imports: nx_syscalls.nxnx_jsbalance.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_mmap ↻ je_ck jsb_check je_len gv_check gv_puts ↻

structs

none

consts

23const JE_PAGE: *u8 = "sites/nishifamily/world/beach.html"
26const JE_MIN_SCRIPT: i64 = 100000

functions

31func je_len(s: *u8) -> i64
called by 1: je_ck
37func je_ck(src: *u8, out: *i64) -> i64 { return jsb_check(src, je_len(src), out) }
called by 1: main calls 2: jsb_checkje_len
39func je_codename(rc: i64) -> *u8
49func main() -> i64