nx_teacher_synthesize.nx
buildroot/runtime/nx_teacher_synthesize.nx
about
nx_teacher_synthesize.nx -- the SYNTHESIS bridge of the Nishi Teacher/Trainer (Teacher arc, rung R2).
Operator doctrine (2026-06-20): "we want to CONSUME all our information FROM the nishi teacher and
trainer so we get the insights to improve the nishi team's capabilities -- and once the information is
SYNTHESIZED it is REDUNDANT and we can move away from [the raw source]." So a raw insight-bearing
artifact (e.g. a quarantined ledger like build_learnings.tsv) is not discarded as junk: its insights
are first INGESTED into the team's living capability store, where the team consumes them; the raw
source is then PROVABLY redundant (every insight recoverable from the store) -> safe to retire.
This organ ingests an insight LEDGER (tab-delimited `id<TAB>class<TAB>learning<TAB>reinforces`, with
`#` comment lines) and synthesizes each row into the NATIVE content-addressed seg_store (ncfg /
nx_native_config -- NOT a borrowed TSV, the operator's "native ecosystem only" mandate) under tag
"insight", at a fixed team-capability prefix. Three verbs:
tsyn_ingest_ledger(src,source_tag,prefix) -> count synthesized (-1 read fail, -2 commit fail)
tsyn_recall(prefix,id,out) -> 1 if the team can CONSUME that insight by id from the store
tsyn_redundant(src,prefix) -> 1 iff EVERY learning in src is recoverable from the store
(the source is fully absorbed = redundant = retirable)
Parameterized so the gate targets /tmp fixtures; main() runs the real quarantined ledger.
No hardware writes, no network (Rule 26). Faithful extraction only -- no fabricated insight (Rule 4).
license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_native_config.nx
imported by: nx_teacher_merge.nxnx_teacher_synthesize_gate.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 23 | const K_MAGIC_4096: i64 = 4096 |
| 24 | const K_MAGIC_4095: i64 = 4095 |
functions
| 26 | func tsyn_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != 0 as u8 { n = n + 1 } sys_write(1, s, n); return 0 } |
| 27 | func tsyn_putn(v: i64) -> i64 |
| 36 | func tsyn_streq(a: *u8, b: *u8) -> i64 |
| 43 | func tsyn_field(b: *u8, ls: i64, le: i64, f: i64) -> *u8 |
| 59 | func tsyn_row(w: *i64, idx: i64, src: *u8, id: *u8, cls: *u8, rule: *u8, reinf: *u8) -> i64 |
| 70 | func tsyn_ingest_ledger(src_path: *u8, source_tag: *u8, store_prefix: *u8) -> i64 |
| 103 | func tsyn_recall(store_prefix: *u8, want_id: *u8, out: *u8) -> i64 |
| 128 | func tsyn_store_has_rule(h: *i64, want: *u8) -> i64 |
| 144 | func tsyn_redundant(src_path: *u8, store_prefix: *u8) -> i64 |
| 170 | func main() -> i64 |