diff --git a/benchmarks/fixtures/responses/commentary-tool-prompt.json b/benchmarks/fixtures/responses/commentary-tool-prompt.json index 4ddefaf9..fab4f752 100644 --- a/benchmarks/fixtures/responses/commentary-tool-prompt.json +++ b/benchmarks/fixtures/responses/commentary-tool-prompt.json @@ -1,5 +1,5 @@ { - "provenance": "Pinned engine/strata/serve/chat_template.jinja rendered with Jinja2 3.1.6; sanitized fixture", + "provenance": "Pinned third_party/strata/serve/chat_template.jinja rendered with Jinja2 3.1.6; sanitized fixture", "request": { "model": "strata-local", "reasoning": { diff --git a/control-plane/src/cli/model_text.rs b/control-plane/src/cli/model_text.rs index 45085dbc..d0215ea2 100644 --- a/control-plane/src/cli/model_text.rs +++ b/control-plane/src/cli/model_text.rs @@ -35,7 +35,7 @@ fn single_commands(action: &str, rest: &[String]) -> Outcome { fn batch_commands(action: &str, rest: &[String]) -> Outcome { match (action, rest) { - // Batch forms for the differential harness (scripts/offline/diff_tokenizer.py): one JSON value per line. + // Batch forms for the differential harness: one JSON value per line. ("pre-tokenize-batch", []) => Some(pre_tokenize_batch()), ("tokenize-batch", [path, flags_rest @ ..]) if flags_rest.iter().all(|flag| flag == "--special") => { Some(tokenize_batch(path, !flags_rest.is_empty())) @@ -122,7 +122,7 @@ fn request_kwargs(request: &Json) -> Vec<(&str, Json)> { } /// JSON lines {"messages": [...], "tools": [...]|null, "add_generation_prompt": true, "kwargs": {...}} -> -/// {"ok": ""} or {"error": ""}: the pinned chat template, for scripts/offline/diff_chat_template.py. +/// {"ok": ""} or {"error": ""}: the pinned chat template. fn render_chat() -> Result<(), BoxError> { for line in std::io::stdin().lines() { let request: Json = serde_json::from_str(&line?)?; diff --git a/control-plane/src/native_pack/tests.rs b/control-plane/src/native_pack/tests.rs index 4653f606..da87b86b 100644 --- a/control-plane/src/native_pack/tests.rs +++ b/control-plane/src/native_pack/tests.rs @@ -65,7 +65,7 @@ fn the_native_ple_key_encodings_are_the_originals() { } /// Numpy (`astype(float16)`) and gguf-py (`BF16.quantize_blocks`) answers for 4096 f32 bit patterns, from -/// `scripts/offline/gen_goldens.py`. The packer's F32 -> F16 / BF16 helpers must match bit for bit. +/// the Original's offline tooling (Strata 41cf05a0). The packer's F32 -> F16 / BF16 helpers must match bit for bit. #[test] fn f16_and_bf16_rounding_match_numpy_and_gguf_py() { let vectors = include_bytes!("../../tests/fixtures/offline/f16_bf16_vectors.golden"); diff --git a/control-plane/src/server_api.rs b/control-plane/src/server_api.rs index cb74c61c..69ef42ca 100644 --- a/control-plane/src/server_api.rs +++ b/control-plane/src/server_api.rs @@ -2,7 +2,7 @@ //! that is not an inference API: `GET /props`, `GET /slots`, `GET /v1/status`, `GET /api/health`, //! `GET|POST /settings`, `POST /load`, `POST /unload`, `POST /v1/load`, `POST /v1/unload`, CORS and //! the own-page guard. Behaviour is checked against the real Python handlers in -//! `tests/http_surface.rs` (fixtures from `tests/golden/gen_goldens.py http`). +//! `tests/http_surface.rs` (fixtures recorded from the Original's Python server). //! //! One engine at a time: `total_slots` is 1 and `/slots` lists one slot while the engine is loaded. diff --git a/control-plane/src/wire.rs b/control-plane/src/wire.rs index 2991fb02..f67ea2d7 100644 --- a/control-plane/src/wire.rs +++ b/control-plane/src/wire.rs @@ -184,7 +184,7 @@ mod tests { } /// Every GEN/GENI line equals what the Original's `StrataEngine.generate` writes to the pipe - /// (fixture from `tests/golden/gen_goldens.py`, which runs that real code with a fake pipe). + /// (fixture recorded by running that real code with a fake pipe). #[test] fn gen_lines_equal_the_python_servers_for_every_sampling_key() { let fixture: serde_json::Value = diff --git a/control-plane/tests/chat_template_oracle.rs b/control-plane/tests/chat_template_oracle.rs index e8dac84c..eaec4d25 100644 --- a/control-plane/tests/chat_template_oracle.rs +++ b/control-plane/tests/chat_template_oracle.rs @@ -1,10 +1,9 @@ //! The native Jinja renderer against the Python server's `ChatTemplate` (jinja2) on generated conversations. //! -//! `tests/fixtures/offline/chat_template_oracle.json` comes from `scripts/offline/gen_goldens.py chat_template_oracle`: +//! `tests/fixtures/offline/chat_template_oracle.json` was recorded from the Original's Python code (Strata 41cf05a0): //! 90 renders (every role incl. developer and tool, list content with image/video parts, assistant `tool_calls` //! with mapping arguments, tools, `enable_thinking` / `reasoning_effort` / `preserve_thinking`, no generation //! prompt) and 25 conversations the template refuses, with the exact `raise_exception` message. -//! `scripts/offline/diff_chat_template.py` runs the same generator live over thousands of cases. use leleka_control_plane::prompt::{ChatInput, Json, pinned}; use serde::Deserialize; diff --git a/control-plane/tests/dequant_oracle.rs b/control-plane/tests/dequant_oracle.rs index bbfe4979..3234714b 100644 --- a/control-plane/tests/dequant_oracle.rs +++ b/control-plane/tests/dequant_oracle.rs @@ -1,8 +1,8 @@ //! Dequantization versus the pinned gguf-py (`quants.dequantize`, llama.cpp 3cf03257) and `tools/iq_fixture.py`. //! //! `tests/fixtures/offline/dequant_oracle.json` holds one seeded 256-value row of each of 23 block types and the -//! oracle's float32 bits (`scripts/offline/gen_goldens.py dequant_oracle`; `scripts/offline/diff_dequant.py` runs -//! 32 rows x 3 seeds live). The production visitor (`gguf_f32_stream::visit`: independent Rust decoders where they +//! oracle's float32 bits (recorded from the Original's Python code, Strata 41cf05a0). The production +//! visitor (`gguf_f32_stream::visit`: independent Rust decoders where they //! exist, the pinned ggml C bridge otherwise) must reproduce every float bit for bit. Q8_K has no gguf-py //! dequantizer; its reference is `d * qs`. use leleka_control_plane::{gguf, gguf_f32_stream}; diff --git a/control-plane/tests/gguf_header_differential.rs b/control-plane/tests/gguf_header_differential.rs index ad63fb8a..c7677c0b 100644 --- a/control-plane/tests/gguf_header_differential.rs +++ b/control-plane/tests/gguf_header_differential.rs @@ -1,10 +1,9 @@ //! GGUF header reader versus `Strata 41cf05a0, tools/gguf_reader.py`. //! -//! `tests/fixtures/offline/gguf_headers.json` is generated by `scripts/offline/gen_goldens.py` from the unmodified +//! `tests/fixtures/offline/gguf_headers.json` was recorded offline from the unmodified //! Python reader: random GGUF v3 headers (all 13 metadata value types, arrays, unicode, alignment, split keys, //! 1-4 dimensional tensors of every block geometry) with the metadata and tensor directory it parses from each, and -//! its `BLOCK_GEOMETRY` table. The live differential over thousands of files is -//! `scripts/offline/diff_gguf_header.py`. +//! its `BLOCK_GEOMETRY` table. use leleka_control_plane::{gguf, gguf_json}; use serde_json::Value; use std::{fs, path::PathBuf}; diff --git a/control-plane/tests/http_surface.rs b/control-plane/tests/http_surface.rs index c2bc0d50..9f7b24e4 100644 --- a/control-plane/tests/http_surface.rs +++ b/control-plane/tests/http_surface.rs @@ -2,7 +2,7 @@ //! The operational HTTP surface (`/props`, `/slots`, `/settings`, `/load`, `/unload`, `/v1/load`, //! `/v1/unload`, `/v1/status`, `/api/health`, CORS, own-page guard) against the real Python //! handlers: every scenario in `tests/fixtures/golden/http_surface.json` was recorded from -//! `Strata 41cf05a0, serve/server.py` by `tests/golden/gen_goldens.py http`, and is replayed here +//! `Strata 41cf05a0, serve/server.py`, and is replayed here //! against the Rust router with a real worker supervisor and the mock engine. //! //! Deliberate differences, skipped in the comparison: the chat template text, the build/version diff --git a/control-plane/tests/reasoning_budget_oracle.rs b/control-plane/tests/reasoning_budget_oracle.rs index 5aa0f6c1..9ac09320 100644 --- a/control-plane/tests/reasoning_budget_oracle.rs +++ b/control-plane/tests/reasoning_budget_oracle.rs @@ -1,7 +1,7 @@ //! The reasoning-budget logic against the Python server's `Service.reasoning_budget` and `Service.run` (#123). //! -//! `tests/fixtures/offline/reasoning_budget_oracle.json` comes from `scripts/offline/gen_goldens.py -//! reasoning_budget_oracle`: 247 budget lookups (request and configured values of every JSON type, with the message +//! `tests/fixtures/offline/reasoning_budget_oracle.json` was recorded from the Original's Python +//! code (Strata 41cf05a0): 247 budget lookups (request and configured values of every JSON type, with the message //! of the 400) and 400 generations of the unmodified `Service.run` over a scripted engine and a byte-level toy //! vocabulary, recording each engine call (prompt, max_new), the finish reason, the completion tokens and the text //! the output parser was fed. diff --git a/crates/context/src/setup_policy.rs b/crates/context/src/setup_policy.rs index 84ee2294..c25ee13d 100644 --- a/crates/context/src/setup_policy.rs +++ b/crates/context/src/setup_policy.rs @@ -4,7 +4,7 @@ //! (`derived_factor`, `setup_resolve_rope`); this module holds the rest: which contexts the RAM allows //! ([`ram_ctx`], [`ctx_ram_need`]), how many GiB of experts to keep resident ([`resident_budget_gib`]) and the //! low-RAM mode's arithmetic (`low_ram_*`). Every function is checked against `import setup` over a grid by -//! `tests/setup_policy_oracle.rs` (golden from `scripts/offline/gen_goldens.py setup_policy`). +//! `tests/setup_policy_oracle.rs` (golden recorded from the Original's `setup.py`). //! //! Floating point is IEEE double on both sides, evaluated in the same order; Python's `round()` is round-half-even //! (`f64::round_ties_even`). diff --git a/crates/context/tests/rope_plan_golden.rs b/crates/context/tests/rope_plan_golden.rs index a4ff993b..4b899b45 100644 --- a/crates/context/tests/rope_plan_golden.rs +++ b/crates/context/tests/rope_plan_golden.rs @@ -1,5 +1,5 @@ //! Golden tests for `rope_scaling` and `memory_plan` against fixtures produced by the ORIGINAL's host code -//! (see `rope_plan_golden/gen_rope_golden.sh` and `gen_plan_golden.sh`; clang++ on macOS, arm64). +//! (clang++ on macOS, arm64). //! //! Rope: the C++ side links `rope_scaling.hpp` unmodified and the two `build_rope_table` definitions extracted //! verbatim from `rope.cu`, compiled `-O2 -ffp-contract=off`. Tables are checked bit-for-bit through FNV-1a 64 diff --git a/crates/context/tests/rope_plan_golden/memory_plan_golden.json b/crates/context/tests/rope_plan_golden/memory_plan_golden.json index e9b45727..c79f4b74 100644 --- a/crates/context/tests/rope_plan_golden/memory_plan_golden.json +++ b/crates/context/tests/rope_plan_golden/memory_plan_golden.json @@ -1,5 +1,5 @@ { - "generator": "strata-plan built from engine/strata/src/plan/plan_main.cpp (unmodified) + extracted layer.cpp kv_pool_bytes", + "generator": "strata-plan built from Strata 41cf05a0, src/plan/plan_main.cpp (unmodified) + extracted layer.cpp kv_pool_bytes", "state_bytes_default": 117669888, "cli": [ { diff --git a/crates/context/tests/rope_plan_golden/rope_golden.json b/crates/context/tests/rope_plan_golden/rope_golden.json index 101eecf6..cb92d7b4 100644 --- a/crates/context/tests/rope_plan_golden/rope_golden.json +++ b/crates/context/tests/rope_plan_golden/rope_golden.json @@ -1,5 +1,5 @@ { - "generator": "gen_rope_golden.cpp over rope_scaling.hpp + rope.cu build_rope_table (verbatim)", + "generator": "host build over rope_scaling.hpp + rope.cu build_rope_table (verbatim)", "cases": [ { "name": "none_default", "desc": "default-constructed RopeScaling (today's engine)", "n_rot": 64, diff --git a/crates/context/tests/setup_policy_oracle.rs b/crates/context/tests/setup_policy_oracle.rs index 5cd535b3..da5977b1 100644 --- a/crates/context/tests/setup_policy_oracle.rs +++ b/crates/context/tests/setup_policy_oracle.rs @@ -1,5 +1,5 @@ //! `setup.py` sizing rules versus `import setup` (the unmodified oracle), over the grid in -//! `tests/fixtures/setup_policy_oracle.json` (`scripts/offline/gen_goldens.py setup_policy`). Floats are compared +//! `tests/fixtures/setup_policy_oracle.json`. Floats are compared //! bit for bit. use leleka_context::{ rope_scaling::{RopeScalingType, derived_factor, setup_resolve_rope}, diff --git a/crates/cuda-driver/src/original_verify/window_ops/all_window_assets.rs b/crates/cuda-driver/src/original_verify/window_ops/all_window_assets.rs index 301220fc..00e5bb0e 100644 --- a/crates/cuda-driver/src/original_verify/window_ops/all_window_assets.rs +++ b/crates/cuda-driver/src/original_verify/window_ops/all_window_assets.rs @@ -33,7 +33,7 @@ pub(in super::super) fn all_window_assets() -> Vec<&'static AssetSpec> { } /// The kernel assets that are placeholders or fail their SHA-256 pin (none while every window PTX is the one /// sealed with nvcc 13.2.86 on 2026-10-15): a window cannot be recorded while any is listed -/// (`scripts/build-original-verify-ptx.sh`, `crates/cuda-driver/seal-plans/cuda-seal-plan-additions-window.json`). +/// (`crates/cuda-driver/seal-plans/cuda-seal-plan-additions-window.json`). pub fn unsealed_window_assets() -> Vec<&'static str> { unsealed_keys(all_window_assets()) } diff --git a/crates/cuda-model/src/original_prefill_schedule.rs b/crates/cuda-model/src/original_prefill_schedule.rs index d25abe10..0f3012dd 100644 --- a/crates/cuda-model/src/original_prefill_schedule.rs +++ b/crates/cuda-model/src/original_prefill_schedule.rs @@ -9,7 +9,7 @@ //! runtime executor have an executable specification of the order they must reproduce, and //! * a ring/event simulator ([`check_trace`]) proves slot reuse safety and the absence of waits on events that //! have not been recorded. -//! Golden traces come from `oracle/gen_prefill_ring_trace.py`, which EXTRACTS the Original's scheduling code +//! Golden traces come from an offline run that EXTRACTS the Original's scheduling code //! verbatim (sequence builder, issue/give-back lambdas, stage_one, the walks, the PLE block, the fusion line) into a //! host harness with logging cuda stubs; `tests::*golden*` replays every scenario and compares text lines. //! diff --git a/crates/engine-core/src/conversation/golden_cache.rs b/crates/engine-core/src/conversation/golden_cache.rs index 07a396b0..3c5ac4e0 100644 --- a/crates/engine-core/src/conversation/golden_cache.rs +++ b/crates/engine-core/src/conversation/golden_cache.rs @@ -1,5 +1,5 @@ //! Differential tests against fixtures produced by compiling the ORIGINAL -//! C++ headers (`golden/gen_cache_golden.cpp`, rebuilt by `golden/gen.sh`): +//! C++ headers: //! random buffer/eviction/meminfo/admission cases and long cache operation //! traces. Every observable of the C++ run is compared to this port. diff --git a/crates/engine-core/src/conversation/golden_manager.rs b/crates/engine-core/src/conversation/golden_manager.rs index f82dd43f..c216ff29 100644 --- a/crates/engine-core/src/conversation/golden_manager.rs +++ b/crates/engine-core/src/conversation/golden_manager.rs @@ -1,5 +1,5 @@ //! Differential test of [`ConversationManager`] against the conversation -//! block of `generate.cpp` (transliterated in `golden/gen_manager_golden.cpp` +//! block of `generate.cpp` (transliterated into a host program //! over the real C++ cache, eviction policy and memory admission): 28 random //! serving traces of 30 requests each, with parking budgets, memory telemetry, //! steering flips, cancelled prompts, invalid parked images and the diff --git a/crates/engine-core/src/conversation/snapshot_tests/golden_state.rs b/crates/engine-core/src/conversation/snapshot_tests/golden_state.rs index b412eb3a..7a723f9e 100644 --- a/crates/engine-core/src/conversation/snapshot_tests/golden_state.rs +++ b/crates/engine-core/src/conversation/snapshot_tests/golden_state.rs @@ -4,7 +4,7 @@ use super::{ConversationCheckpoint, ConversationKv, SavedConversation}; // --------------------------------------------------------------------------------------------------------------- -// Differential tests against the ORIGINAL C++ (golden/gen_state_golden.cpp). +// Differential tests against the ORIGINAL C++ (Strata 41cf05a0 host build). pub(super) fn golden_state() -> serde_json::Value { serde_json::from_str(include_str!("../golden/state_golden.json")).expect("state golden parses") diff --git a/crates/engine-qwen35-cuda/tests/stra161_reference.rs b/crates/engine-qwen35-cuda/tests/stra161_reference.rs index f0adf105..3301155c 100644 --- a/crates/engine-qwen35-cuda/tests/stra161_reference.rs +++ b/crates/engine-qwen35-cuda/tests/stra161_reference.rs @@ -1,5 +1,5 @@ // Independent original-source literals frozen before STRA161 candidate. -// Generated offline by stra161_reference/reference.py; imports no candidate. +// Generated offline from the Original's source; imports no candidate. #![allow(dead_code)] pub struct HashCase { pub name: &'static str, diff --git a/crates/engine-qwen35-cuda/tests/stra161_reference/fixtures.json b/crates/engine-qwen35-cuda/tests/stra161_reference/fixtures.json index f3891929..07dc585e 100644 --- a/crates/engine-qwen35-cuda/tests/stra161_reference/fixtures.json +++ b/crates/engine-qwen35-cuda/tests/stra161_reference/fixtures.json @@ -2,11 +2,11 @@ "schema": "stra161-independent-reference-v1", "provenance": "Original source and preexisting independent PLE literal vectors, no candidate imports", "sources": { - "engine/strata/src/kernels/ngram.cpp": "111c0ef89403af9d4a7ab2ce45bd5fc95291fca326be46e83652b2fba65bead0", - "engine/strata/src/kernels/ple_oracle_vectors.inc": "81db49806af4a3c8d333cb00ad0353a322b61f34f62e96a1eaffe4b782611fd3", + "Strata 41cf05a0, src/kernels/ngram.cpp": "111c0ef89403af9d4a7ab2ce45bd5fc95291fca326be46e83652b2fba65bead0", + "Strata 41cf05a0, src/kernels/ple_oracle_vectors.inc": "81db49806af4a3c8d333cb00ad0353a322b61f34f62e96a1eaffe4b782611fd3", "crates/model-format/src/qwen4exp.rs": "8b3361c89c197a8c98baff83505e2158f17362be622bc2b39c77b5589d34d120", - "engine/strata/src/kernels/cuda/ple.cu": "afcd6efac591acf6c7ff95d8c756a782cfa6dbb4490146f924cb32a55d9d6262", - "engine/strata/src/kernels/cuda/native_ple_postops.cu": "91849f4257d6ee9c85b1dc04cb16397963eac51d725aa31575e63c8f0d0f56f4" + "Strata 41cf05a0, src/kernels/cuda/ple.cu": "afcd6efac591acf6c7ff95d8c756a782cfa6dbb4490146f924cb32a55d9d6262", + "Strata 41cf05a0, src/kernels/cuda/native_ple_postops.cu": "91849f4257d6ee9c85b1dc04cb16397963eac51d725aa31575e63c8f0d0f56f4" }, "multipliers": [ 23703573157769, diff --git a/crates/experimental-ref/src/keyless/tests.rs b/crates/experimental-ref/src/keyless/tests.rs index 6af337c7..226c8c22 100644 --- a/crates/experimental-ref/src/keyless/tests.rs +++ b/crates/experimental-ref/src/keyless/tests.rs @@ -114,7 +114,7 @@ fn write_artifact(m: &Model, matrix_value: f32) -> Vec { for v in [1u32, m.g.qsa_layers.len() as u32, m.g.n_head, m.g.head_dim] { out.extend_from_slice(&v.to_le_bytes()); } - // layout of scripts/prepare-keyless-routing.py: "<8s4I", then per layer " { fn clock_json(&self) -> String { format!( - " \"clock_calibration\": {{\"method\": {}, \"source\": \"engine/strata/src/kernels/cpu/tq_cpu_parity.cpp \ - --bench: core_ghz() lines 273-284, time_slice() lines 290-304; the dependent-add chain needs inline \ - assembly, so the safe Rust twin chains multiplies\", \"drop_rule\": {{\"source_file\": \ - \"engine/strata/src/kernels/cpu/tq_cpu_parity.cpp\", \"source_line\": 303, \"source_text\": \"std::fabs(g1 \ + " \"clock_calibration\": {{\"method\": {}, \"source\": \"Strata 41cf05a0, \ + src/kernels/cpu/tq_cpu_parity.cpp --bench: core_ghz() lines 273-284, time_slice() lines 290-304; the \ + dependent-add chain needs inline assembly, so the safe Rust twin chains multiplies\", \"drop_rule\": \ + {{\"source_file\": \"Strata 41cf05a0, src/kernels/cpu/tq_cpu_parity.cpp\", \"source_line\": 303, \ + \"source_text\": \"std::fabs(g1 \ - g0) > 0.05 * g0\", \"fraction\": {}, \"meaning\": \"a slice whose calibrated clock moved by more than 5 \ percent between its before and after calibration is dropped\"}}, \"slice_ms_source\": \ \"tq_cpu_parity.cpp:461 slice_ms = quick ? 40 : 60\", \"ghz_at_start\": {}, \"ghz_at_end\": {}, \ diff --git a/crates/offline-tools/src/lib.rs b/crates/offline-tools/src/lib.rs index 8dd99d05..568975ae 100644 --- a/crates/offline-tools/src/lib.rs +++ b/crates/offline-tools/src/lib.rs @@ -8,8 +8,8 @@ //! | `make_profile` | `tools/make_profile.py` | `STRP` v1 expert-cache profile | //! | `mtp_rt` | `tools/mtp_rt.py` | MTP `experts.bin`, `dense.bin`, `dense.txt` | //! -//! Differential harness: `scripts/offline/diff_tools.py` runs each oracle and the matching `leleka-api tools` -//! subcommand on synthetic inputs and compares every output byte. Offline conversion only; production serving +//! Differential harness (run offline): each oracle and the matching `leleka-api tools` +//! subcommand run on synthetic inputs and every output byte is compared. Offline conversion only; production serving //! never links this crate's CLI paths into a request path. pub mod cli; diff --git a/crates/offline-tools/tests/oracle.rs b/crates/offline-tools/tests/oracle.rs index 142da7e8..760f850f 100644 --- a/crates/offline-tools/tests/oracle.rs +++ b/crates/offline-tools/tests/oracle.rs @@ -1,8 +1,8 @@ //! The ported tools against the Python originals' exact outputs. //! -//! `tests/fixtures/tools_oracle.json` is written by `scripts/offline/gen_goldens.py tools_oracle`, which runs the +//! `tests/fixtures/tools_oracle.json` was recorded by running the //! unmodified `Strata 41cf05a0, tools/{embd_bf16_pack,ple_fp8_pack,draft_vocab,make_profile,mtp_rt}.py` on tiny -//! synthetic inputs. `scripts/offline/diff_tools.py` is the live differential over more cases. +//! synthetic inputs. use std::{ fs, path::{Path, PathBuf}, diff --git a/crates/sampler-ref/tests/fixtures/sampler_oracle.json b/crates/sampler-ref/tests/fixtures/sampler_oracle.json index 0b297f21..650e4416 100644 --- a/crates/sampler-ref/tests/fixtures/sampler_oracle.json +++ b/crates/sampler-ref/tests/fixtures/sampler_oracle.json @@ -1,5 +1,5 @@ { -"meta":{"generator":"crates/sampler-ref/oracle/gen_fixtures.cpp","oracle":"Original engine/strata sampler_parity.cpp host reference, included unmodified; sampler.hpp + coupled_draft.hpp headers","compile":"-std=c++17 -O1 -ffp-contract=off -fno-fast-math","encoding":"floats are IEEE-754 binary32 bit patterns (u32)"}, +"meta":{"generator":"host build of the Original's sampler (Strata 41cf05a0)","oracle":"Original sampler_parity.cpp host reference (Strata 41cf05a0), included unmodified; sampler.hpp + coupled_draft.hpp headers","compile":"-std=c++17 -O1 -ffp-contract=off -fno-fast-math","encoding":"floats are IEEE-754 binary32 bit patterns (u32)"}, "philox":[ [0,0,1064655353], [0,1,1050774260], diff --git a/crates/sampler-ref/tests/fixtures/sampling_keys.json b/crates/sampler-ref/tests/fixtures/sampling_keys.json index fcb45fab..ba8f7931 100644 --- a/crates/sampler-ref/tests/fixtures/sampling_keys.json +++ b/crates/sampler-ref/tests/fixtures/sampling_keys.json @@ -1,4 +1,4 @@ -{"meta":{"generator": "crates/sampler-ref/oracle/gen_sampling_keys.py", "oracle": "engine/strata/serve/server.py StrataEngine.sampling_keys"}, +{"meta":{"generator": "StrataEngine.sampling_keys lifted verbatim", "oracle": "Strata 41cf05a0, serve/server.py StrataEngine.sampling_keys"}, "cases":[ {"request": {}, "keys": ""}, {"request": {"temperature": 0.0}, "keys": ""}, diff --git a/crates/sampler-ref/tests/gen_keys.rs b/crates/sampler-ref/tests/gen_keys.rs index 40cee969..52f25d65 100644 --- a/crates/sampler-ref/tests/gen_keys.rs +++ b/crates/sampler-ref/tests/gen_keys.rs @@ -1,6 +1,6 @@ //! `RequestSampling::gen_keys` against the strings the Original's Python //! `StrataEngine.sampling_keys` emits (fixture produced by -//! `oracle/gen_sampling_keys.py`, which lifts that function verbatim). +//! lifting that function verbatim). use leleka_sampler_ref::params::{RequestSampling, SamplingParams}; use serde_json::Value; diff --git a/crates/sampler-ref/tests/oracle.rs b/crates/sampler-ref/tests/oracle.rs index a957936b..ad7b116a 100644 --- a/crates/sampler-ref/tests/oracle.rs +++ b/crates/sampler-ref/tests/oracle.rs @@ -1,5 +1,5 @@ //! The Rust reference against golden fixtures produced by the Original's host -//! sampler logic (see `oracle/gen_fixtures.cpp`). Floats travel as binary32 bit +//! sampler logic. Floats travel as binary32 bit //! patterns, so every comparison here is bitwise on the integer/RNG side and on //! the selected list; picks follow from them. diff --git a/crates/serving-policy/src/cvec.rs b/crates/serving-policy/src/cvec.rs index c1179941..c8e55d18 100644 --- a/crates/serving-policy/src/cvec.rs +++ b/crates/serving-policy/src/cvec.rs @@ -4,7 +4,7 @@ //! //! This is the host side: reading the files and building the `dir` / `s` tables the kernel //! uploads. The tables are bit-exact against the Original's loader (golden fixture compiled from -//! the verbatim function, `oracle/gen_cvec_fixtures.cpp`). The device side +//! the verbatim function). The device side //! (`h <- h + d` / `h <- h - s (h.v) v`) is a kernel and stays with the engine. //! //! * `add`: `d_l` = sum over files of `scale * direction.`; the table row is `d_l`, `s_l = 1`. diff --git a/crates/serving-policy/src/lib.rs b/crates/serving-policy/src/lib.rs index 4aa55e38..89b9778d 100644 --- a/crates/serving-policy/src/lib.rs +++ b/crates/serving-policy/src/lib.rs @@ -2,7 +2,7 @@ //! host-side parts of `src/program/generate.cpp`). No I/O, no async runtime, no `unsafe`. //! //! Each module cites the Original code it transcribes and is tested against fixtures produced by running -//! that code (see `control-plane/tests/golden/gen_goldens.py` and `oracle/`). +//! that code offline from Strata 41cf05a0. pub mod cors; pub mod cvec; diff --git a/crates/serving-policy/src/vision.rs b/crates/serving-policy/src/vision.rs index d3bc6bc4..a3cda7f3 100644 --- a/crates/serving-policy/src/vision.rs +++ b/crates/serving-policy/src/vision.rs @@ -4,7 +4,7 @@ //! //! * [`parse_embeddings`] and [`build_positions`] are transcriptions of the verbatim block of //! `generate.cpp` (`if (geni || !mrope_identity)`), golden-tested against that block compiled on -//! the host (`oracle/gen_vision_fixtures.cpp`). +//! the host. //! * Qwen's interleaved M-RoPE gives each rotated pair a position from one of three streams (time //! `t`, height `h`, width `w`): text has `t = h = w`, an image's tokens share `t = p` and differ in //! `h = p + y`, `w = p + x`, and the text after it continues at `p + max(nx, ny)`. diff --git a/crates/serving-policy/tests/fixtures/cvec_oracle.json b/crates/serving-policy/tests/fixtures/cvec_oracle.json index c5c853a6..084b1dca 100644 --- a/crates/serving-policy/tests/fixtures/cvec_oracle.json +++ b/crates/serving-policy/tests/fixtures/cvec_oracle.json @@ -1,5 +1,5 @@ { - "source": "src/program/generate.cpp load_control_vectors (verbatim) over GGUF files written by gen_cvec_fixtures.cpp", + "source": "src/program/generate.cpp load_control_vectors (verbatim) over GGUF files written by the fixture builder", "n_layers": 6, "n_embd": 5, "hc": 2, "blobs": ["474755460300000003000000000000000200000000000000140000000000000067656e6572616c2e617263686974656374757265080000000d00000000000000636f6e74726f6c766563746f721800000000000000636f6e74726f6c766563746f722e6d6f64656c5f68696e740800000008000000000000007177656e346578700b00000000000000646972656374696f6e2e310100000005000000000000000000000000000000000000000b00000000000000646972656374696f6e2e320100000005000000000000000000000020000000000000000b00000000000000646972656374696f6e2e340100000005000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000003f295caf3f52b8de3f7c14ce3f52b81e40000000000000000000000000000080bfb81e05be90c2753eb047e13d48e17a3f0000000000000000000000000000c03f14ae1740295c2f403e0a274052b85e40000000000000000000000000","474755460300000002000000000000000200000000000000140000000000000067656e6572616c2e617263686974656374757265080000000d00000000000000636f6e74726f6c766563746f721800000000000000636f6e74726f6c766563746f722e6d6f64656c5f68696e740800000008000000000000007177656e346578700b00000000000000646972656374696f6e2e320100000005000000000000000000000000000000000000000b00000000000000646972656374696f6e2e33010000000500000000000000000000002000000000000000000000000000000000000080beec51b83ed7a3f03e08d7a33dd7a3303f0000000000000000000000000000204014ae5740295c6f403e0a6740295c8f40000000000000000000000000","474755460300000001000000000000000100000000000000140000000000000067656e6572616c2e6172636869746563747572650800000005000000000000006c6c616d610b00000000000000646972656374696f6e2e31010000000500000000000000000000000000000000000000000000000000000000000000000000000000003f295caf3f52b8de3f7c14ce3f52b81e40000000000000000000000000","474755460300000001000000000000000200000000000000140000000000000067656e6572616c2e617263686974656374757265080000000d00000000000000636f6e74726f6c766563746f721800000000000000636f6e74726f6c766563746f722e6d6f64656c5f68696e740800000008000000000000007177656e3465787007000000000000006f746865722e310100000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f295caf3f52b8de3f7c14ce3f52b81e40000000000000000000000000","474755460300000001000000000000000200000000000000140000000000000067656e6572616c2e617263686974656374757265080000000d00000000000000636f6e74726f6c766563746f721800000000000000636f6e74726f6c766563746f722e6d6f64656c5f68696e740800000008000000000000007177656e346578700b00000000000000646972656374696f6e2e3101000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000003f295caf3f52b8de3f7c14ce3f52b81e40666636400000000000000000","474755460300000001000000000000000200000000000000140000000000000067656e6572616c2e617263686974656374757265080000000d00000000000000636f6e74726f6c766563746f721800000000000000636f6e74726f6c766563746f722e6d6f64656c5f68696e740800000008000000000000007177656e346578700b00000000000000646972656374696f6e2e3101000000050000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","474755460300000005000000000000000200000000000000140000000000000067656e6572616c2e617263686974656374757265080000000d00000000000000636f6e74726f6c766563746f721800000000000000636f6e74726f6c766563746f722e6d6f64656c5f68696e740800000008000000000000007177656e346578700b00000000000000646972656374696f6e2e300100000005000000000000000000000000000000000000000b00000000000000646972656374696f6e2e360100000005000000000000000000000020000000000000000c00000000000000646972656374696f6e2e39390100000005000000000000000000000040000000000000000d00000000000000646972656374696f6e2e6162630100000005000000000000000000000060000000000000000c00000000000000646972656374696f6e2e3033010000000500000000000000000000008000000000000000000000000000084185eb15410ad71b418fc2194114ae27410000000000000000000000000000084185eb15410ad71b418fc2194114ae27410000000000000000000000000000084185eb15410ad71b418fc2194114ae27410000000000000000000000000000084185eb15410ad71b418fc2194114ae27410000000000000000000000000000803e295c8f3f52b8be3f7b14ae3f52b80e40000000000000000000000000","474755460300000002000000000000000200000000000000140000000000000067656e6572616c2e617263686974656374757265080000000d00000000000000636f6e74726f6c766563746f721800000000000000636f6e74726f6c766563746f722e6d6f64656c5f68696e740800000008000000000000007177656e346578700b00000000000000646972656374696f6e2e310100000005000000000000000000000000000000000000000b00000000000000646972656374696f6e2e3201000000050000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","474755460300000001000000000000000200000000000000140000000000000067656e6572616c2e617263686974656374757265080000000d00000000000000636f6e74726f6c766563746f721800000000000000636f6e74726f6c766563746f722e6d6f64656c5f68696e740800000005000000000000006c6c616d610b00000000000000646972656374696f6e2e3101000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f295caf3f52b8de3f7c14ce3f52b81e40000000000000000000000000","474755460300000001000000000000000100000000000000140000000000000067656e6572616c2e617263686974656374757265080000000d00000000000000636f6e74726f6c766563746f720b00000000000000646972656374696f6e2e3501000000050000000000000000000000000000000000000000000000000000000000c0bfae4721bfb81e85be14aec7be90c2f53e000000000000000000000000"], "cases": [ diff --git a/crates/serving-policy/tests/golden_cvec.rs b/crates/serving-policy/tests/golden_cvec.rs index c12917a8..09f82572 100644 --- a/crates/serving-policy/tests/golden_cvec.rs +++ b/crates/serving-policy/tests/golden_cvec.rs @@ -1,5 +1,5 @@ //! The control-vector loader against the Original's `load_control_vectors` compiled verbatim on the host -//! (fixture from `oracle/build_oracle.sh`): same tables bit for bit, same error text. +//! (fixture recorded from that build): same tables bit for bit, same error text. use leleka_serving_policy::cvec::{Mode, Options, build_tables, parse_gguf}; use serde_json::Value; diff --git a/crates/serving-policy/tests/golden_host.rs b/crates/serving-policy/tests/golden_host.rs index 6678800c..1f3fcdb2 100644 --- a/crates/serving-policy/tests/golden_host.rs +++ b/crates/serving-policy/tests/golden_host.rs @@ -1,5 +1,5 @@ //! Stride selection and the stall watchdog against the Original's C++ host build -//! (fixture from `oracle/build_oracle.sh`: `logits_selection.hpp` unmodified, the watchdog loop driven +//! (fixture recorded from that build: `logits_selection.hpp` unmodified, the watchdog loop driven //! by an injected clock). use leleka_serving_policy::stride::{parse_stride, row_count, selected}; diff --git a/crates/serving-policy/tests/golden_reasoning.rs b/crates/serving-policy/tests/golden_reasoning.rs index 30e73826..95226ac7 100644 --- a/crates/serving-policy/tests/golden_reasoning.rs +++ b/crates/serving-policy/tests/golden_reasoning.rs @@ -1,5 +1,5 @@ //! `BudgetTracker` and `parse_budget` against the Original's real `Detokenizer` + `OutputParser` loop and -//! `Service.reasoning_budget` (fixture from `control-plane/tests/golden/gen_goldens.py reasoning`). +//! `Service.reasoning_budget` (fixture recorded from the Original's Python code). use leleka_serving_policy::reasoning::{BudgetTracker, Verdict, WRAP_UP, parse_budget}; use serde_json::Value; diff --git a/crates/serving-policy/tests/golden_shared.rs b/crates/serving-policy/tests/golden_shared.rs index 3f684c61..f202a1b8 100644 --- a/crates/serving-policy/tests/golden_shared.rs +++ b/crates/serving-policy/tests/golden_shared.rs @@ -1,5 +1,5 @@ //! `clean_shared_defaults` / `sampling_defaults_from_config` against the Original's real Python output -//! (fixture from `control-plane/tests/golden/gen_goldens.py shared`). +//! (fixture recorded from the Original's Python code). use leleka_serving_policy::shared::{ConfigSampling, clean_shared_defaults, sampling_defaults_from_config}; use serde_json::{Value, json}; diff --git a/crates/serving-policy/tests/golden_timings.rs b/crates/serving-policy/tests/golden_timings.rs index 34abcef1..aa6729e5 100644 --- a/crates/serving-policy/tests/golden_timings.rs +++ b/crates/serving-policy/tests/golden_timings.rs @@ -1,5 +1,5 @@ //! `request_timings` and `Service.set_aliases` against the Original's real Python -//! (fixture from `control-plane/tests/golden/gen_goldens.py timings`). +//! (fixture recorded from the Original's Python code). use leleka_serving_policy::shared::normalize_aliases; use leleka_serving_policy::timings::{Last, request_timings}; diff --git a/crates/serving-policy/tests/golden_vision.rs b/crates/serving-policy/tests/golden_vision.rs index 64006d16..ca2b4ec2 100644 --- a/crates/serving-policy/tests/golden_vision.rs +++ b/crates/serving-policy/tests/golden_vision.rs @@ -1,6 +1,6 @@ //! The image path against the Original: the SVE1 reader and M-RoPE table against the verbatim C++ block -//! (`oracle/build_oracle.sh`), image sources, base64 and the pad expansion against the real Python -//! (`control-plane/tests/golden/gen_goldens.py vision`). +//! (recorded host build), image sources, base64 and the pad expansion against the real Python +//! code (recorded fixtures). use leleka_serving_policy::vision::{ IMAGE_PAD_ID, ImageKey, Positions, b64decode, build_positions, expand_image_pads, identity_table, image_source, diff --git a/crates/tokenizer/src/lib.rs b/crates/tokenizer/src/lib.rs index a8d2d47a..27bd5b92 100644 --- a/crates/tokenizer/src/lib.rs +++ b/crates/tokenizer/src/lib.rs @@ -36,7 +36,7 @@ pub const QWEN35_PATTERN: &str = concat!( type Result = std::result::Result>; /// The `qwen35` pre-tokenizer alone: the pieces `text` is split into before byte-level BPE. Exposed so the split can -/// be compared with Python's `regex` for every Unicode scalar value (scripts/offline/diff_tokenizer.py). +/// be compared with Python's `regex` for every Unicode scalar value. pub fn pre_tokenize(text: &str) -> Result> { static PATTERN: std::sync::OnceLock = std::sync::OnceLock::new(); let pattern = match PATTERN.get() { diff --git a/crates/tokenizer/tests/oracle_differential.rs b/crates/tokenizer/tests/oracle_differential.rs index 8de555f1..6b41407b 100644 --- a/crates/tokenizer/tests/oracle_differential.rs +++ b/crates/tokenizer/tests/oracle_differential.rs @@ -1,11 +1,10 @@ //! Tokenizer versus `Strata 41cf05a0, tools/strata_tokenizer.py` (the unmodified oracle, regex 2026.9.10). //! -//! `tests/fixtures/tokenizer_oracle.json` is produced by `scripts/offline/gen_goldens.py tokenizer_oracle`: a +//! `tests/fixtures/tokenizer_oracle.json` was recorded from the Original's Python code: a //! synthetic byte-level BPE vocabulary (256-byte alphabet, 300 trained merges that reach past the 64-symbol heap //! path, type-3 and type-4 specials including ones with regex metacharacters) and the oracle's answers for ~190 //! boundary and fuzzed texts (ids with and without special parsing, decoded text, pre-tokenizer pieces) plus the //! pre-tokenizer split of sampled Unicode scalar values in five contexts. -//! `scripts/offline/diff_tokenizer.py` runs the exhaustive live version (every scalar value x 13 contexts). use leleka_tokenizer::{Tokenizer, pre_tokenize}; use serde_json::Value; diff --git a/scripts/build-linux-package.py b/scripts/build-linux-package.py index e2cb7a65..e033d849 100644 --- a/scripts/build-linux-package.py +++ b/scripts/build-linux-package.py @@ -280,7 +280,7 @@ def main(): parser.add_argument('--cargo-target-dir', type=Path, required=True, help='dedicated build directory; do not run other Cargo commands here concurrently') parser.add_argument('--cpu-fixture', action='store_true', help='explicit non-CUDA test artifact; never a GPU release') parser.add_argument('--build-features', type=Path, - help='exact build feature receipt emitted by build-static-cuda.sh') + help='exact build feature receipt emitted by the engine build') parser.add_argument('--probe-in-runtime-image', action='store_true', help='execute actual provision in the pinned runtime base instead of the assembly host') args = parser.parse_args() diff --git a/tools/chain-probe/mb_pdl.cu b/tools/chain-probe/mb_pdl.cu index 659894d5..19f3975a 100644 --- a/tools/chain-probe/mb_pdl.cu +++ b/tools/chain-probe/mb_pdl.cu @@ -1,6 +1,6 @@ // claude/chain-kernels: model-free micro-benchmark of kernel-to-kernel latency inside a CUDA graph, with and without // programmatic dependent launch (PDL, griddepcontrol), and of the L2-prefetch-before-wait trick for weight streaming. -// Prints "RESULT key=value" lines. Build: tools/chain-probe/build.sh. Never touches the model. +// Prints "RESULT key=value" lines. Never touches the model. #include #include #include