nx_teacher_merge.nx
buildroot/runtime/nx_teacher_merge.nx
about
nx_teacher_merge.nx -- MULTI-SOURCE synthesis into ONE unified Nishi Teacher capability store
(Teacher arc, rung R2b). Extends nx_teacher_synthesize (DRY -- reuses tsyn_field/streq/store_has_rule/
recall) so the team can "consume ALL our information" from a single native store, not many raw TSVs.
Operator doctrine [[feedback-synthesize-before-retire]]: synthesize each information-bearing ledger's
insight into the team's living capability store; once absorbed the raw is redundant. This rung makes
the store MULTI-SOURCE + heterogeneous-schema + de-duplicated:
tsyn_merge_cols(src, source_tag, prefix, id_col, rule_col) -> rows ADDED (-1 read, -2 commit)
appends the ledger's insights at the store's CURRENT count offset (so a 2nd source never clobbers
the 1st -- seg_store append-segment + last-wins count), reading the id + the insight from the
caller-specified columns (so build_learnings 0/2, landmines 0/2, nishi_cardinals 0/1 all map in),
and SKIPS any rule already in the store (cross-source dedup -> idempotent re-merge).
tsyn_redundant_col(src, prefix, rule_col) -> 1 iff every insight of src is recoverable from the store.
Faithful extraction only -- no fabricated insight (Rule 4). No hardware writes / network (Rule 26).
license_tier: ORIGINAL
dependencies 2 imports · 4 importers
imports: nx_teacher_synthesize.nxnx_syscalls.nx
imported by: nx_teacher_consult.nxnx_teacher_learn.nxnx_teacher_merge_gate.nxnx_teacher_trainer.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 18 | const K_MAGIC_4096: i64 = 4096 |
functions
| 21 | func tsyn_row3(w: *i64, idx: i64, src: *u8, id: *u8, rule: *u8) -> i64 |
| 30 | func tsyn_merge_cols(src_path: *u8, source_tag: *u8, store_prefix: *u8, id_col: i64, rule_col: i64) -> i64 called by 5: mainmaintsyn_merge_reportmainmain calls 10: sys_mmapsys_read_filencfg_openncfg_countncfg_begintsyn_field+4 |
| 69 | func tsyn_redundant_col(src_path: *u8, store_prefix: *u8, rule_col: i64) -> i64 called by 2: tsyn_merge_reportmain calls 5: ncfg_opensys_mmapsys_read_filetsyn_fieldtsyn_store_has_rule |
| 97 | func tsyn_add_insight(store_prefix: *u8, source_tag: *u8, id: *u8, rule: *u8) -> i64 called by 1: tl_learn calls 7: ncfg_openncfg_counttsyn_store_has_rulencfg_begintsyn_row3ncfg_set_count+1 |
| 111 | func tsyn_merge_report(src: *u8, tag: *u8, store: *u8, idc: i64, rc: i64) -> i64 |
| 120 | func main() -> i64 |