code wiki / _hdl_build / nx_ladder_page.nx
nx_ladder_page.nx source
↩ module page · 23 lines · 1344 B
1// nx_ladder_page.nx -- SCRIBE/AUDITOR-owned publisher: renders the S-class-exceed LADDER
2// (RUNGGRADE lines from /tmp/nishi_ladder.log) into wiki HTML at /tmp/ladder.html for the
3// hot /wiki/roadmap publish path (content hot-swap; NO daemon rebuild needed). KEPT SMALL
4// so the sovereign compiler builds it deterministically. Spec:
5// knowledge/specs/2026-06-09-sclass-exceed-ladder-program.md license_tier: ORIGINAL
6import "nx_syscalls.nx"
7
8func lp_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 }
9
10func main() -> i64 {
11 let lenb: *i64 = sys_mmap(16) as *i64
12 let log: *u8 = sys_read_file("/tmp/nishi_ladder.log" as *u8, lenb)
13 let fd: i64 = sys_openat_wr("/tmp/ladder.html" as *u8, 0x1a4)
14 if fd < 0 { sys_exit(1); return 1 }
15 lp_w(fd, "<section id=ladder><h2>S-CLASS-EXCEED LADDER (gate-derived, panels not flukes)</h2>\n" as *u8)
16 lp_w(fd, "<p>Grades come ONLY from re-runnable gates vs benchmark PANELS (plural competitors + feature-union). Stale = no grade.</p>\n<pre>\n" as *u8)
17 if (log as i64) != 0 { sys_write(fd, log, lenb[0]) }
18 if (log as i64) == 0 { lp_w(fd, "(no RUNGGRADE lines yet)\n" as *u8) }
19 lp_w(fd, "</pre></section>\n" as *u8)
20 sys_close(fd)
21 lp_w(1, "ladder page emitted: /tmp/ladder.html\n" as *u8)
22 sys_exit(0); return 0
23}