code wiki / _hdl_build / nx_swebv_grade.nx

nx_swebv_grade.nx

buildroot/runtime/_hdl_build/nx_swebv_grade.nx

6777 B158 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tooltopic swebv
docsdependenciesstructsconstsfunctions

about

nx_swebv_grade.nx -- F787 rung-3 (sovereign half): THE SWE-bench Verified GRADER, Nishi first byte up (operator law 2026-07-20: "we only use python or other stuff as oracles, nishi from the first byte up"). Python/pytest NEVER computes the score -- it is an ORACLE that writes one verdict row per instance into the results plane; THIS organ owns the contract: denominator = the swebvinst- index (500 public instances), numerator = resolved rows in swebvres-, UNGRADED COUNTS AS UNRESOLVED (the leaderboard contract), score = resolved*100/denominator, published atomically to the evidence layer. HONESTY BY CONSTRUCTION: zero oracle rows -> verdict=UNMEASURED (never a fabricated 0 or omission); missing instance index -> verdict=RED fail-loud. nx_swebv_grade [instprefix] [resprefix] [outpath] defaults: knowledge/store/swebvinst- knowledge/store/swebvres- knowledge/status/swebv_grade.log results row contract: instance_id<TAB>verdict(resolved|unresolved|error)<TAB>epoch<TAB>oracle-id (maintained via nx_store_put with id=instance_id -> id-replace = dedup at the store layer) expect_exit: 0 (GREEN|UNMEASURED) | 1 RED license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_store_seed_lib.nx nx_seg_store.nx nx_syscalls.nx nx_swebv_grade.nx

imports: nx_store_seed_lib.nxnx_seg_store.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap sts_load ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat sys_fstatat ssc_streq ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_cat ↻ ss_loadfile sys_map_file ss_readall ss_load_aux2 sys_mmap ↻ ss_cat ↻ ss_loadfile ↻ ss_r32 sys_munmap ssl_total_keys ss_r32 ↻ ssl_pow2 ssl_build ss_r32 ↻ ssl_hash_entry ssl_key_eq ss_r32 ↻ ssl_lookup ssl_hash_entry ↻ ssl_key_eq ↻ ss_manifest_free sys_munmap ↻ sys_munmap ↻ ssc_retire_handle

structs

none

consts

18const SG_CAP: i64 = 1048576
19const SG_OCAP: i64 = 8192
20const SG_PATHCAP: i64 = 256
21const SG_TAB: i64 = 9
22const SG_NL: i64 = 10
23const SG_STDERR: i64 = 2
24const SG_MODE: i64 = 0x1a4
25const SG_D0: i64 = 48
26const SG_B10: i64 = 10
27const SG_NUMB: i64 = 24
28const SG_EXIT_RED: i64 = 1
29const SG_R1: i64 = 114 // 'r' of resolved
30const SG_E1: i64 = 101 // 'e' of error

functions

32func sg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: sg_werr
33func sg_werr(s: *u8) -> i64 { sys_write(SG_STDERR, s, sg_slen(s)); return 0 }
called by 1: main calls 2: sys_writesg_slen
34func sg_cat(d: *u8, off: i64, s: *u8) -> i64
called by 1: main
40func sg_catn(d: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
53func sg_lines(buf: *u8, n: i64) -> i64
called by 1: main
69func sg_verdicts(buf: *u8, n: i64) -> i64
called by 1: main
94func main(argc: i64, argv: *i64) -> i64