code wiki / (root) / nx_toolreg_reconcile.nx

nx_toolreg_reconcile.nx

buildroot/runtime/nx_toolreg_reconcile.nx

5929 B89 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 check [allowlist] [schemas] AUDIT: register NOTHING, exit 1 if drift>0 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 vw_read sys_openat_rd sys_read sys_close 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_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 ss_next_segid ss_begin_cap ss_add

structs

none

consts

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

functions

22func 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
23func rc_putn(v: i64) -> i64
called by 1: main
33func 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
35func main(argc: i64, argv: *i64) -> i64