code wiki / (root) / nx_toolreg_reconcile.nx

nx_toolreg_reconcile.nx

buildroot/runtime/nx_toolreg_reconcile.nx

9311 B125 linesdepth 8pulls 11 transitivereach 0 importersview sourcekind tooltopic toolreg
docsdependenciesstructsconstsfunctions

about

nx_toolreg_reconcile.nx -- CLI half of the discovery reconciler / drift auditor. Run from nishihost CWD: nx_toolreg_reconcile [allowlist] [schemas] reconcile (register missing rows); default paths nx_toolreg_reconcile reconcile [allowlist] [schemas] same, with the verb stated (2026-08-16) nx_toolreg_reconcile check [allowlist] [schemas] AUDIT: register NOTHING, exit 1 if drift>0 nx_toolreg_reconcile heal [allowlist] [schemas] SELF-MANAGING: auto-register everything that HAS a schema, then RED only on the no-schema residue a human must author. This is the verb the standing sweep runs, and it was missing from this banner while `reconcile` -- which the parser did not even accept -- was listed. THE MOST IMPORTANT VERB WAS THE ONE NOT DOCUMENTED. Reconcile registers every GREEN allowlisted tool missing from discovery using the author's own schema row; skips (reports) tools with no schema row. Idempotent. `check` is the read-only regression tooth: it exits non-zero if ANY GREEN tool is unregistered or schema-less -- run it in the standing sweep so the discovery-complete state (allowlist == tools/list) can never silently regrow. exit: 0 clean | 1 io / failed rows / (check) drift>0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_toolreg_reconcile_lib.nx nx_toolreg_reconcile.nx

imports: nx_toolreg_reconcile_lib.nx

imported by: nobody (leaf or entry point)

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

main rc_seq rr_drift rr_run rr_dup_census rr_f0 rr_seq rr_drift_name rr_len rr_f0 ↻ rr_is_deny rr_f0 ↻ rr_seq ↻ tool_get_pfx reg_get reg_key reg_cat ss_get sys_mmap ss_scan rr_schema_desc rr_f0 ↻ rr_seq ↻ rr_flast rr_is_stagepath rr_drift_name ↻ rr_rec_desc rr_seq ↻ rr_invoke tool_register_pfx tr_cat tr_tab reg_put reg_put_x sts_lock reg_key ↻ ss_get ↻ reg_strlen reg_id_present sts_unlock

structs

none

consts

16const RC_ARG_ALLOW: i64 = 1 // argv: optional allowlist path (reconcile mode)
17const RC_ARG_SCH: i64 = 2 // argv: optional schemas path (reconcile mode)
18const RC_ARGC_A: i64 = 2 // argc with allowlist
19const RC_ARGC_S: i64 = 3 // argc with both
20const RC_CK_ARG_ALLOW: i64 = 2 // argv: optional allowlist path (check mode, after the verb)
21const RC_CK_ARG_SCH: i64 = 3 // argv: optional schemas path (check mode)
22const RC_CK_ARGC_A: i64 = 3 // argc: check + allowlist
23const RC_CK_ARGC_S: i64 = 4 // argc: check + allowlist + schemas
24const RC_ASCII_0: i64 = 48 // '0'
25const RC_DEC: i64 = 10 // decimal base

functions

27func rc_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
28func rc_putn(v: i64) -> i64
called by 1: main
38func rc_seq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
called by 1: main
40func main(argc: i64, argv: *i64) -> i64