code wiki / _hdl_build / nx_role_store_migrate.nx
nx_role_store_migrate.nx
buildroot/runtime/_hdl_build/nx_role_store_migrate.nx
about
nx_role_store_migrate.nx -- MIGRATE the knowledge/roles/*.tsv files into the SOVEREIGN seg-store
(knowledge/store/roles-*, via nx_role_store). Operator 2026-06-22: "migrate and get rid of these tsvs just
nishi ecosystem." Reads each legacy .tsv, seeds its rows into the matching channel in ONE batched commit
(1 segment), then reads EVERY row back and byte-compares to the source line -> GREEN only if every source
row is present byte-exact. IDEMPOTENT (rule#10): a channel is seeded only when EMPTY (count==0); once seeded
(and possibly evolved by live appends) a re-run writes nothing and still verifies. ADDITIVE (rule#13): the
.tsv files are not touched here -- retirement to knowledge/_retired_tsv/ is a separate, post-verify step.
pm_coord.tsv -> pmcoord engineer_queue.tsv -> engineerq doctor_queue.tsv -> doctorq engineer_ledger.tsv -> engineerl
expect_exit: 0 license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_role_store.nxnx_seg_store.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 13 | const K_MAGIC_4096: i64 = 4096 |
functions
| 15 | func mw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 16 | func mn(v: i64) -> i64 { let b: *u8=sys_mmap(28); let e: i64=rs_itoa(b,v); sys_write(1,b,e); return 0 } |
| 20 | func mig_one(ch: *u8, tsvpath: *u8, tot: *i64, ver: *i64, wro: *i64) -> i64 |
| 101 | func main() -> i64 |