code wiki / _hdl_build / nx_doctor_datadriven_test.nx
nx_doctor_datadriven_test.nx
buildroot/runtime/_hdl_build/nx_doctor_datadriven_test.nx
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
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
structs
| none |
consts
| none |
functions
| 17 | func 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 |
| 18 | func dd_num(v: i64) -> i64 called by 1: main |
| 26 | func dd_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 40 | func main() -> i64 |