nx_forge_local_bench.nx source
↩ module page · 37 lines · 1632 B
1// nx_forge_local_bench.nx -- L4 judge phase: tally the local Coder-0.5B fbench result. Runs the
2// existing gate-proven nx_forge driver (fg_run) on the 3 candidate files the local-gen phase
3// wrote, byte-exact judged through the sovereign lane, and reports the HONEST GREEN-compile rate.
4// No model in-process (clean lane forks). This is the operator's real question: is the local
5// tier useful (produces GREEN-compiling NishiLang), NOT whether it matches a float reference.
6// license_tier: ORIGINAL expect_exit: 0
7import "nx_forge.nx"
8
9func lb_one(spec: *u8, tag: *u8) -> i64 {
10 let r: i64 = fg_run(spec)
11 std_puts(tag)
12 std_puts(" rc=" as *u8)
13 std_pdec(r)
14 if r > 0 {
15 std_putln(" GREEN" as *u8)
16 return 1
17 }
18 std_putln(" (not green -- honest floor)" as *u8)
19 return 0
20}
21
22func main(argc: i64, argv: *i64) -> i64 {
23 std_putln("LOCAL-BENCH: Coder-0.5B integer tower, fbench 3 tasks, byte-exact lane judge" as *u8)
24 var green: i64 = 0
25 let g1: i64 = lb_one("knowledge/forge/fix/spec_lT1.txt" as *u8, "T1" as *u8)
26 green = green + g1
27 let g2: i64 = lb_one("knowledge/forge/fix/spec_lT2.txt" as *u8, "T2" as *u8)
28 green = green + g2
29 let g3: i64 = lb_one("knowledge/forge/fix/spec_lT3.txt" as *u8, "T3" as *u8)
30 green = green + g3
31 std_puts("LOCAL-BENCH green=" as *u8)
32 std_pdec(green)
33 std_putln("/3 (honest measured floor; the harness levers -- full pack via L2, best-of-N, grammar-mask, training -- are the climb)" as *u8)
34 // always exit 0: this is a MEASUREMENT, not a pass/fail gate. The number is the deliverable.
35 sys_exit(0)
36 return 0
37}