nx_gen_pfx_live_gate.nx
buildroot/runtime/nx_gen_pfx_live_gate.nx
about
nx_gen_pfx_live_gate.nx -- live gate for the HTTP "pfx" route (prefix-KV-cache over /gen,
2026-07-16 forge-engine speed lever). Runs against a LIVE serve (argv[1]=port, default 8033)
loaded with any model; greedy determinism makes byte-equality the bar:
T1 baseline: POST /gen promptA (no pfx) -> textA
T2 pfx first call (degrade path: full prefill + snapshot) -> MUST == textA byte-exact
T3 pfx second call (RESTORE path -- the actual reuse) -> MUST == textA byte-exact
T4 boundary-safety: promptB baseline (no pfx) -> textB; then promptB WITH pfx:1 while the
snapshot still holds promptA rows -> MUST == textB (divergent tokens re-prefilled fresh;
cross-prompt contamination is the failure this tooth catches)
ms per call printed (informational; the wall-clock win shows at pack-scale prompts, the gate
proves SEMANTICS). license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_forge_loop.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
| none |
functions
| 15 | func pg_gen(port: i64, prompt: *u8, pfxv: i64, out: *u8, cap: i64) -> i64 |
| 27 | func pg_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64 called by 1: main |
| 37 | func main(argc: i64, argv: *i64) -> i64 |