code wiki / _hdl_build / nx_doctor_datadriven_test.nx

nx_doctor_datadriven_test.nx

buildroot/runtime/_hdl_build/nx_doctor_datadriven_test.nx

5166 B87 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic doctor
docsdependenciesstructsconstsfunctions

about

nx_doctor_datadriven_test.nx -- DATA-DRIVEN self-heal with CLEAN RACI. The Doctor is NOT told which keyword to fix; it LEARNS the offending token from the Engineer's captured diagnostic, then heals exactly that. This generalizes the fixer beyond a hardcoded match/in pair to ANY reserved-keyword-as-identifier the compiler flags. ENGINEER (R: detect) eng_compile_diag -> compile-fail + captures the diagnostic DOCTOR (R: diagnose+fix) doc_offending_kw reads the artifact -> learns 'match'; doc_heal_token renames exactly that token ENGINEER (R: verify) eng_compile -> re-verifies the healed candidate WARDEN/COUNCIL (A) cc_council -> ACTs only on the Engineer's verdict The fixer never names its own target (data, not guess) and never blesses its own fix. Known answer: original FAILS, learned token = "match", healed COMPILES, council ACT.

dependencies 3 imports · 0 importers

nx_doctor_fix.nx nx_engineer_crash.nx nx_crew_council.nx nx_doctor_datadriven_test.nx

imports: nx_doctor_fix.nxnx_engineer_crash.nxnx_crew_council.nx

imported by: nobody (leaf or entry point)

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

main dd_puts eng_compile_diag sys_mmap sys_fork sys_openat_wr sys_dup3 sys_close sys_execve sys_exit sys_wait4 sys_openat_rd sys_read doc_offending_kw sys_mmap ↻ sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read ↻ sys_close ↻ doc_find doc_slen dd_streq dd_num doc_heal_token sys_mmap ↻ sys_read_file ↻ doc_rename doc_slen ↻ doc_is_ic doc_write_file sys_openat_wr ↻ sys_write sys_close ↻ eng_compile sys_mmap ↻ sys_fork ↻ sys_openat_wr ↻ sys_dup3 ↻

structs

none

consts

none

functions

17func dd_puts(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 1: main
18func dd_num(v: i64) -> i64
called by 1: main
26func dd_streq(a: *u8, b: *u8) -> i64
called by 1: main
40func main() -> i64