code wiki / _hdl_build / nx_doc_autoheal.nx

nx_doc_autoheal.nx

buildroot/runtime/_hdl_build/nx_doc_autoheal.nx

3888 B63 linesdepth 4pulls 5 transitivereach 3 importersview sourcekind librarytopic doc
docsdependenciesstructsconstsfunctions

about

nx_doc_autoheal.nx -- the Doctor's autonomous RESOLVE loop. Closes the two halves the team already has (RECALL: the ki- known-issue catalogue; FIX: nx_doc_heal_let) into ONE hands-free pass: given a source that hit the empty-.s symptom AND the diagnostic the runner/compiler emitted, it (1) RECALLs the lesson from the catalogue, (2) ROUTEs to the matching auto-fixer iff the recalled class is one we can fix, (3) APPLIEs the fix, and (4) VERIFIEs the defect is actually gone (static post-condition: no reassigned `let` remains). The real recompile is the caller's next step on the healed bytes -- nesting a full rebuild HERE would trip NX-GATE-NESTED-BUILD (a lesson we recorded), so the safe, honest boundary is decision+transform+postcondition. Honest by construction: no recall -> DAH_UNKNOWN (invents nothing); recalled but not our class / no applicable change -> DAH_NOFIX (does not falsely claim a heal); only a verified-clean rewrite returns DAH_HEALED. license_tier: ORIGINAL

dependencies 3 imports · 3 importers

nx_syscalls.nx nx_known_issue_store.nx nx_doc_heal_let.nx nx_doc_autoheal.nx nx_doc_autoheal_apply.nx nx_doc_autoheal_gate.nx nx_doc_build_resolve.nx

imports: nx_syscalls.nxnx_known_issue_store.nxnx_doc_heal_let.nx

imported by: nx_doc_autoheal_apply.nxnx_doc_autoheal_gate.nxnx_doc_build_resolve.nx

structs

none

consts

14const DAH_HEALED: i64 = 1 // recalled + fixed + verified the reassigned-let defect is gone
15const DAH_NOFIX: i64 = 0 // recalled (or off-class) but our auto-fixer had no applicable change -- honest
16const DAH_UNKNOWN: i64 = 0-1 // no lesson recalled -> genuinely novel; resolve invents nothing

functions

18func dah_tlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: dah_resolve
19func dah_copy(src: *u8, n: i64, out: *u8, outcap: i64) -> i64
called by 1: dah_resolve
27func dah_has_reassigned_let(src: *u8, n: i64) -> i64
48func dah_resolve(diag: *u8, dlen: i64, src: *u8, n: i64, out: *u8, outcap: i64, outid: *u8, outrem: *u8) -> i64