nx_embfeat_gate.nx
buildroot/runtime/nx_embfeat_gate.nx
about
nx_embfeat_gate.nx -- GATE for the embedding-feature library (nx_embfeat_lib), driven IN-PROCESS on a PLANTED pair of
models under /tmp/nx_embfeat_gate: a four-word PPMI vocabulary written through nx_wordclust's fixture writer (the
canonical NXPPMI1 shape) and a four-row NXEMB1 table written by the library's own fixture writer in the same sorted-hash
order. Proves: the pair loads, header fields read back, the scale is derived from the table (RMS then a half step),
a known word resolves to its own planted row and an unknown word reads -1, the bucket arithmetic (zero, one step,
minus one step, a clamp on both sides), the two-byte spelling, determinism across two loads, and the fail-closed
controls (a missing table, a table with a wrong magic). Every fixture asserts its own condition first. No network.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_gatekit_lib.nxnx_reviewmine_lib.nxnx_wordclust.nxnx_embfeat_lib.nxnx_gate_verdict.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
| 16 | const G_ROOT: *u8 = "/tmp/nx_embfeat_gate" |
| 17 | const G_PPMI: *u8 = "/tmp/nx_embfeat_gate/mini.ppmi" |
| 18 | const G_EMB: *u8 = "/tmp/nx_embfeat_gate/mini.emb" |
| 19 | const G_BADEMB: *u8 = "/tmp/nx_embfeat_gate/bad.emb" |
| 20 | const G_MISSING: *u8 = "/tmp/nx_embfeat_gate/absent.emb" |
| 21 | const G_I64: i64 = 8 |
| 22 | const G_NW: i64 = 4 |
| 23 | const G_DIM: i64 = 3 |
| 24 | const G_TABLE_BYTES: i64 = 120 // 24 + 4*3*8 |
| 27 | const G_EXPECT_RMS: i64 = 836 |
| 28 | const G_EXPECT_STEP: i64 = 418 |
| 29 | const G_CH_ZERO: i64 = 48 |
| 30 | const G_CH_AT: i64 = 64 |
functions
| 32 | func main() -> i64 |