code wiki / _hdl_build / nx_capreg_health.nx

nx_capreg_health.nx

buildroot/runtime/_hdl_build/nx_capreg_health.nx

4603 B104 linesdepth 4pulls 4 transitivereach 2 importersview sourcekind librarytopic capreg
docsdependenciesstructsconstsfunctions

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

nx_capreg_librarian.nx nx_syscalls.nx nx_capreg_health.nx nx_capreg_health_run.nx nx_capreg_health_test.nx

imports: nx_capreg_librarian.nxnx_syscalls.nx

imported by: nx_capreg_health_run.nxnx_capreg_health_test.nx

structs

none

consts

12const K_MAGIC_32768: i64 = 32768

functions

15func ch_dup_idx(path: *u8) -> i64
37func ch_count(path: *u8) -> i64
54func ch_check(livepath: *u8, journalpath: *u8) -> i64
78func ch_run(livepath: *u8, journalpath: *u8, out: *i64) -> i64
93func ch_report(logpath: *u8, out: *i64, green: i64) -> i64