code wiki / (root) / nx_autofix_candidate5.nx

nx_autofix_candidate5.nx

buildroot/runtime/nx_autofix_candidate5.nx

2254 B60 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic autofix
docsdependenciesstructsconstsfunctions

about

nx_autofix_candidate5.nx -- the WILD-BUG candidate: retires "seeded" from the autofix loop. PROVENANCE: the buggy function below is VERBATIM model-written code -- the 1.5B coder's own minipack-T1 near-miss (knowledge/forge/fix/cand_mpT1.nx, generated 2026-07-15/16): it computed "sum100" as a sum of fibonacci terms INCLUDING fib3..fib9 which are NEVER DECLARED (the use-before-declare-compiles gotcha reads garbage), instead of the sum 1..100. Nobody planted this bug; it emerged from generation. fib() is also verbatim from the same artifact (it is CORRECT -- the model's good half; fib(10)=55). Only the FNRES harness (main + tests) is ecosystem-authored. DELIBERATE: NO FNCASE rows here -- revealing "want 5050" would let the maker pass by constant- stuffing; withholding the oracle forces an actual computation. (The checker still knows.) license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_autofix_candidate5.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main fib fib ↻ sum100 fib ↻ cw sys_write cn cw ↻ sys_mmap sys_write ↻

structs

none

consts

12const K_MAGIC_5050: i64 = 5050

functions

14func cw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: cnmain calls 1: sys_write
15func cn(v: i64) -> i64
called by 1: main calls 3: cwsys_mmapsys_write
29func fib(n: i64) -> i64
called by 3: fibsum100main calls 1: fib
39func sum100() -> i64
called by 1: main calls 1: fib
48func main() -> i64
calls 4: fibsum100cwcn