code wiki / _hdl_build / nx_session_0612_register.nx
nx_session_0612_register.nx source
↩ module page · 44 lines · 3291 B
1// nx_session_0612_register.nx -- records the 2026-06-12 gated capabilities. Each
2// entry's gate RE-RUNS GREEN at register time (no claim without fresh evidence).
3// license_tier: ORIGINAL
4import "nx_cap_register.nx"
5import "nx_capreg_librarian.nx"
6import "nx_syscalls.nx"
7func sr_run(name: *u8) -> i64 {
8 let pid: i64 = sys_fork()
9 if pid == 0 {
10 let dn: i64 = sys_openat_wr("/dev/null" as *u8, 0x1a4)
11 if dn >= 0 { sys_dup3(dn, 1, 0); sys_dup3(dn, 2, 0) }
12 let argv: *i64 = sys_mmap(32) as *i64
13 argv[0] = "_offc/nx_sov_build_run.elf" as *u8 as i64
14 argv[1] = name as i64
15 argv[2] = 0
16 let envp: *i64 = sys_mmap(16) as *i64
17 envp[0] = 0
18 sys_execve("_offc/nx_sov_build_run.elf" as *u8, argv, envp)
19 sys_exit(127)
20 }
21 let st: *i64 = sys_mmap(16) as *i64
22 sys_wait4(pid, st, 0)
23 if (st[0] % 128) != 0 { return 0 - 1 }
24 return (st[0] >> 8) & 0xff
25}
26func sr_one(gate: *u8, desc: *u8) -> i64 {
27 if sr_run(gate) != 0 { cr_w(1, "gate not green, skip: " as *u8); cr_w(1, gate); cr_w(1, "\n" as *u8); return 0 }
28 let lp: *u8 = "/tmp/nishi_cap_registry.log" as *u8
29 let jp: *u8 = "knowledge/status/cap_registry_durable.log" as *u8
30 let idx: i64 = cl_next_idx(lp, jp)
31 let ok: i64 = cl_register_dual(lp, jp, idx, 5, 2, desc)
32 if ok == 1 { cr_w(1, "CAPREG idx=" as *u8); cr_wn(1, idx); cr_w(1, " registered\n" as *u8) }
33 return ok
34}
35func main() -> i64 {
36 sr_one("_evolve_gate_authored" as *u8,
37 "SELF EVOLUTION-HARNESS author=tutor-with-team (X-EVO-001) -- nx_evolve: full EC operator set from the ingested taxonomy (tournament selection + elitism + rate mutation + convergence streak, xorshift64 seeded per reproducibility law) VALIDATED on a KNOWN-OPTIMUM multimodal fitness (you cannot trust an optimizer you cannot verify). EVGATE 3/3: converges to the global optimum, BYTE-DETERMINISTIC by seed, BEATS-RANDOM (1-generation control fails where evolution succeeds). Rung2 = swap fitness_id for a GATE permil (the exceed: we grow evaluators). EC science from evo_params.tsv (19 concepts mapped), not invention." as *u8)
38 sr_one("_lang_lint_gate_authored" as *u8,
39 "SELF NISHI-LANG-LINT author=tutor-with-team (X-LANG-004, the IDENTIFY half of language-RSI) -- nx_lang_lint catches landmine CLASSES (ANDOR &&/||, EMPTYSTR, BIGARGS >6 params) BEFORE nxasm turns them into rc=6/miscompiles. LLGATE 4/4 (clean passes, each landmine class caught). Design-intelligence classifies these as DEFECTS (doors to shut) not design-choices -> fix as language features (X-LANG-005 &&/|| desugar). v2 = skip comments/string-literals. The language identifies its OWN defects mechanically." as *u8)
40 sr_one("nx_game_engine_gate" as *u8,
41 "SELF GAME-ENGINE-SURFACE author=tutor-with-team (X-SURF-003) -- the composed game loop (16x16x8 terrain + 1bpp framebuffer + raycast render + text overlay + input + q14 fixed-point) gated end-to-end + actor game-logic leg; GAMEENGINE verdict=GREEN. Maps to ESP32-class silicon = the product reaches the HARDWARE FLOOR (operator hardware-up directive). Surface census flipped game-engine ABSENT->GREEN. Gap to LIVE = unified engine API; gap to hardware-PROVEN = X-SURF-005 flash-to-ESP32 drill." as *u8)
42 sys_exit(0)
43 return 0
44}