code wiki / _hdl_build / nx_capreg_health.nx
nx_capreg_health.nx
buildroot/runtime/_hdl_build/nx_capreg_health.nx
about
nx_capreg_health.nx -- the registry's self-running health organ: the manual repair this arc ran by
hand (crash -> restore -> dedup -> renumber) becomes a CHECK -> HEAL -> RECHECK cycle any loop can
fork on a schedule (Conductor pulse / gate loop / boot). RACI-clean split inside one organ:
ENGINEER verb = the checks (live exists; live has NO duplicate idx; allocator strictly past max;
journal canonical = a scratch regen introduces ZERO new remaps and matches counts)
DOCTOR verb = the heal on RED (cl_canonicalize -- regen the truth, never hand-edit)
then the checks RE-RUN: verdict reflects the POST-heal state, healed=1 records that medicine was
needed. Verdict line appends to knowledge/status/capreg_health.log (NTFS-durable, the same journal
discipline the crash proved). GREEN iff all 4 checks pass. license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_capreg_librarian.nxnx_syscalls.nx
imported by: nx_capreg_health_run.nxnx_capreg_health_test.nx
structs
| none |
consts
| 12 | const K_MAGIC_32768: i64 = 32768 |
functions
| 15 | func ch_dup_idx(path: *u8) -> i64 |
| 37 | func ch_count(path: *u8) -> i64 |
| 54 | func ch_check(livepath: *u8, journalpath: *u8) -> i64 |
| 78 | func ch_run(livepath: *u8, journalpath: *u8, out: *i64) -> i64 |
| 93 | func ch_report(logpath: *u8, out: *i64, green: i64) -> i64 |