64 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 056ab3d689 Retire the oracles, generators and scripts that only worked against the vendored Strata tree (STRA-406)
The vendored Strata tree engine/strata is removed for good (owner decision 2026-11-23): Leleka never builds or runs it, the vanilla
benchmark builds from its own checkout, the comparison measurements are finished and the CUDA ports are frozen. Everything below
compiled or read that tree, so it cannot run without it and is retired (the tree stays in git history, see third_party/strata/UPSTREAM.md).
Checked-in fixtures, golden JSON, sealed PTX, seal plans and MANIFEST hashes are untouched and keep being replayed by the cargo tests.

Drift guard
- crates/experimental-ref/tests/literal_port.rs: include_str! of the Original .cu files compared with the checked-in experimental ports.

Oracle generators and builders (they compile or extract from the Strata C++/Python sources; their outputs are the checked-in goldens)
- crates/experimental-ref/oracle/gen_{cvec,kv,remote,stream}_golden.{cpp,sh}, gen_seal_additions.py and the cuda_runtime stub they used
- crates/sampler-ref/oracle/build_oracle.sh, gen_fixtures.cpp, gen_sampling_keys.py, stub/ (run_port_host_tests.sh and the fixtures stay)
- crates/serving-policy/oracle/ (build_oracle.sh, gen_{host,cvec,vision}_fixtures.cpp)
- crates/context/tests/rope_plan_golden/gen_* (plan, rope, kv pool)
- crates/engine-core/src/conversation/golden/gen*.{sh,cpp} and stub/
- crates/cuda-driver/oracle/gen_prefill_ring_trace.py and drivers/prefill_ring_trace.cpp (extracted prefill.cpp), check_cu_syntax.sh
- crates/engine-qwen35-cuda/tests/stra161_reference/reference.py (fixtures.json and the Rust constants stay)
- control-plane/tests/golden/gen_goldens.py, scripts/offline/ (Python differentials and golden generators against the Strata Python tools)

Source-compiling CUDA oracles and builders
- scripts/build-cuda-{projection-family,q5,q6,qsa}-oracle.sh with scripts/cuda-{projection-family,q5,q6,qsa}-oracle/ (include the Original .cu; sha256 pins of them)
- scripts/build-original-verify-ptx.sh, scripts/q8/rebuild_quantizer_ptx.sh, scripts/decode-sm120/make_iq_prefix.py (needs engine/strata/include)
- scripts/cuda-stubs/ (check-cu.py and literal_diff.py need the strata headers and the Original sources; the stub headers served only them)
- tools/chain-probe/build.sh, tools/kernel-ab/{cpp,aa.sh,smoke.sh,time_smoke.sh} (the C++ comparator is built from the Strata CPU kernels; verify_manifest.py stays)
- scripts/e2e/codex/speed/verify-hc-down-kernel-microbench-vs-upstream/ (compiles the upstream kernel from the tree)

Engine builds and Python smokes that need the tree
- scripts/build-cpu.sh, scripts/build-static-cuda.sh, scripts/check-keyless-gpu.sh, scripts/test-static-cuda-profile.py (CMake of engine/strata)
- scripts/compare-real-tokenizer.py, scripts/smoke-mtp-pack.py (reads src/core/mtp.cpp and a bench manifest), scripts/prepare-keyless-routing.py and its test
- scripts/smoke-native-pack.py became scripts/native-pack-fixture.py: the synthetic GGUF fixtures the four other smokes import stay, the iq_pack.py oracle comparison goes

Gates and CI
- scripts/check-local.sh: no live Python oracle differentials, no literal_port note, no check-cu, no build-cpu, no retired test scripts
- .github/workflows/linux.yml: the keyless-cuda, static-cuda-package and hosted-cuda-package jobs (they built the engine from the tree) and their dispatch
  inputs, and the two oracle smoke steps; .github/workflows/port.yml: the Python oracle environment and the llama.cpp fetch of port-oracles
  (the sampler host shim still runs)
- limits.json and scripts/check_limits_test.py exclude third_party/strata/ instead of engine/strata/

Documentation and comments: README.md names third_party/strata and the pin; deploy/README.md marks the retired build and smoke commands; comments
in Rust, Python and Markdown that named engine/strata/... now name "Strata 41cf05a0, ..."; the gpu-bringup scratch-copy test no longer copies the
removed include directories. Stale engine/strata paths in sealed .cu, .ptx, seal-plan and MANIFEST files are left as they are (hashes may depend on the bytes).
2026-11-23 21:19:11 +01:00
Pavlo Ratushnyi 3f22c4ae29 Drop stale docs/ references from scripts, tools and deploy files; add rope-regeneration.json 2026-11-23 09:34:33 +01:00
Pavlo Ratushnyi 7df1a4b473 Merge main (engine stage 10) into claude/debt-rename; rename script rerun, old-names marker for the rename table, baseline regenerated 2026-11-14 22:17:24 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4e0bb1dd98 engine crates: 50 modules renamed for what they hold (the *_methods, *_and_*, *_sdet, *_types and qwen4exp_* names), exceptions and script paths follow
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 21:59:19 +01:00
Pavlo Ratushnyi ed781797ed Merge main into claude/debt-rename; rename script rerun over what the engine and low-level branches added; baseline regenerated 2026-11-14 21:47:45 +01:00
Pavlo Ratushnyi 9254bb3129 Merge main into claude/debt-engine 2026-11-14 21:23:57 +01:00
Pavlo Ratushnyi da9e4367ae Merge main into claude/debt-rename 2026-11-14 20:36:02 +01:00
Pavlo Ratushnyi 94592f4fa0 wip: rename strata-next/strata-control/strata-desktop-core (to be squashed in the final rename commit) 2026-11-14 20:30:41 +01:00
Pavlo Ratushnyi 03ea6b1f16 Merge main into claude/debt-low (npu-service: keeps the other agent's env_settings.rs; exceptions and baseline merged) 2026-11-14 20:21:02 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b66ed637ff engine-qwen35-cuda: the GPU proofs use leleka-gateway-text instead of compiling its prompt.rs as a module; 23 more #[path] modules become ordinary; orphan renderer copy to garbage
rust_modtree.py: a cfg(feature = "preview-path") attribute was taken for a #[path] attribute (two modules were invisible to the tools).
path_to_modules.py keeps a file that two parents declare (native_down_pair_io.rs, one copy of the state each).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 20:19:50 +01:00
Pavlo Ratushnyi 8fe23f043f Merge branch 'main' into claude/debt-control 2026-11-14 19:40:25 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 5bda5596a2 Architecture gate: exceptions for the readers, ports, adapters and singletons of the control side, baseline lowered; explicit_imports.py FORCE_FILES, wsl-cargo.sh debug=0
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 19:40:21 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 623f9a015f Low-level crates: #[path] modules become ordinary modules (cuda-driver 118 -> 0 counted, model-format 12 -> 0, native-cpu-expert 2 -> 0; 500 files moved to the place their module name gives); gate: a cfg(test) mod declaration with #[path] is test code; ptx! macro for the sealed assets table
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 19:38:37 +01:00
Pavlo Ratushnyi 5a15003bb8 path_to_layout.py: module tree walk with flat (#[path]) and default layout, include fixer 2026-11-14 19:16:59 +01:00
Pavlo Ratushnyi c0524a72a4 Merge branch 'main' into claude/debt-low 2026-11-14 19:09:13 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 599f45a885 Low-level crates: allow(unused_imports) removed from cuda-driver, native-cpu-expert, cpu-sys, model-format, tokenizer and the small crates (unused imports deleted, test-only ones under cfg(test)); root_exports glob replaced by crate paths; EnvSwitch in cuda-model; scripts: prune_unused_imports.py, path_to_layout.py
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 19:09:13 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 ec39c481ff engine-qwen35-cuda: #[path] modules become ordinary modules (397 files moved to the place their module name gives; path-include 100 -> 1)
scripts/dev/path_to_modules.py moves each module declared with #[path] to the file the compiler looks for without the attribute, moves the
children of a path-loaded file with it (such a file owns its directory like mod.rs) and rewrites include_str!/include_bytes! paths. Only the
two declarations that point into the crate's tests/ directory keep their attribute. No code changes: parent files lose attribute lines.
Gates that quote source paths follow: smoke-groups.json (directory patterns for runtime-gr/gdn/moe/qsa/ple/mtp; 7 real-model smokes now classify as
model-assets, 3 fallback smokes now sit in their runtime group), docs/gpu-bringup.md table, docs and the qsa oracle pin path.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 18:51:54 +01:00
Pavlo Ratushnyi fd64c607e4 Merge main (claude/arch-names-high) into claude/arch-names-low: keep the other side's names where both renamed (context rope setup, experimental-ref cvec reading), both tool families (explicit_imports_lowlevel.py, rename_module_map.py next to theirs), regenerated baseline 2026-11-14 18:06:15 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 658864d4a9 cuda-driver: prune the explicit imports against the non-test build, keep the names of other feature sets under a narrow allow; naming.md rows
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 17:41:59 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 0c913a2b5c explicit_imports.py: BASE_CONFIG for the residual step
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 17:10:41 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 878f6f9a94 leleka-model-format: prune the explicit imports against the non-test build; explicit_imports.py prune fixes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 17:09:48 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 2a6cb31542 cuda-driver: explicit imports (571 -> 2 production globs); explicit_imports.py: prune by the non-test build plus the test tokens of the file
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 16:48:12 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 7637c2f0c2 explicit_imports.py: unused-import warnings of the test build only come from units built with cfg(test)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 15:51:04 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 09f57963bd explicit_imports.py: test-only modules from cfg(all(test, ..)), included files, shared files
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 15:35:17 +01:00
Pavlo Ratushnyi a8584c545e Tool: ROOT_FILE for other crate roots 2026-11-14 15:23:00 +01:00
Pavlo Ratushnyi 3913360a54 wip tool: prune mode reads cfg attributes 2026-11-14 14:36:35 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 fb428d3d9b Explicit imports in leleka-model-format, leleka-native-cpu-expert and leleka-cpu-sys; explicit_imports.py: own glob names, static mut, intrinsics
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 14:35:23 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 f59b00d027 Explicit imports in gptoss, gptoss-igpu, gptoss-npu, gpu-npu-worker, cpu-worker, igpu, openvino, tokenizer, leleka-memory; explicit_imports.py fixes (module depth order, keywords, intrinsic constants, RAM and GPU gates)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 14:14:40 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 84024c1151 Explicit imports: deploy, control-plane, desktop-core, gateway-domain (tool fixes: stale files after revert, cfg-carrying imports)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 13:42:43 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4655baefaf Fix renamed paths (include_str of window_launches, a function imported from its planner module), drop the unused var_os of two settings modules
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 13:20:36 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 2f562efa36 explicit_imports.py: names used by include!()d files
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 12:45:28 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 945f20524a explicit_imports.py: intrinsics that come through a std::arch glob of the parent
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 12:42:37 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 7f3d5a5935 WIP (not compiled yet): rename vague module files to what they hold, explicit-import tool handles supported-target gate and feature cfg, config env reader, node credential reader
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 12:39:01 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 1e88f3266a Funnel the env reads of cuda-driver, cuda-model, model-format, native-cpu-expert and gptoss through one settings module per crate (unverified until the next build)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 12:21:26 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 546323906e explicit_imports.py: plain globs, production files only, files below src only
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 12:12:11 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 30e17355f0 explicit_imports.py: ONLY batches
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 12:10:48 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 95a4f48e1d explicit_imports.py: the shared linux/windows gate is not a platform difference
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 12:07:31 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 af356be95d Rename modules named after function lists or mechanical splits to what they hold (git mv, mod and path updates, doc comments): leleka-memory governor, tokenizer, context, serving-policy, experimental-ref, cuda-model, gptoss, npu-service, native-cpu-expert, backend-api, model-format, cuda-driver (_methods, enabled, state, shared, core)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 12:06:35 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 7db8403838 Explicit imports in leleka-gguf and leleka-cpu-kernels; explicit_imports.py: cfg-gated names, platform files, glob module paths, trait resolution; rename_module.py
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 11:51:52 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 15faea9d46 Explicit-imports tool, libc-shim trace modules named for what they hold, two import ratchets, docs of the debt rework
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 19:27:50 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b686f6ab75 STRA-338: rename the 854 mechanically named modules (impl_*, *_fn, *_<N>) after what they hold; mechanical_names census 854 -> 0
git mv of the files and of the module directories next to them, mod declarations, #[path] attributes and
the paths that name the modules, rewritten by scripts/dev/rename_mechanical.py from a reviewed name table.
Two files lost one to two lines so the 400-line limit holds again (qsa_prompt_index, original_verify_expert_probe).
limits-baseline.json: test fn_lines 0 -> 1 is --allow-increase for crates/deploy builtin_profiles.rs:149 (37 lines,
the speed-vs-strata session's file, not touched here); the prod params census falls 108 -> 1 (w_launch, extern C ABI).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 13:43:56 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 8def0e96e2 STRA-338: scripts/dev/rename_mechanical.py plans and applies the rename of mechanically named modules
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 13:26:16 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 ac60df040f STRA-338: architecture gate forbids new mechanical file names (impl_*, *_fn, numbered), baseline lists the 964 existing; rustsplit names modules after what they hold
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 00:50:17 +01:00
Pavlo Ratushnyi ad87e5b57d STRA-338 size: scripts/dev/split_types.py moves the types, consts and statics of oversize files into child modules (12 more files split; width census +750 and test census +10 are the restored compact data tables and the reflow, nothing added); 1793 tests listed before and after 2026-11-06 13:16:11 +01:00
Pavlo Ratushnyi ab4280a3df STRA-338 size: data tables keep their compact form (rustfmt::skip: 1719/2051/1905 -> 933/259/360 lines), kernel_ab example becomes a directory example split into 13 modules (3992 -> 1635 in main.rs) 2026-11-06 13:05:10 +01:00
Pavlo Ratushnyi a9d80333b4 STRA-338 size: large inline modules of 15 engine-crate files move to files (extract_modules.py now emits #[path] only for files that are themselves loaded through #[path]); test lists identical (1793). Ratchets raised with reason: path-include +3 cuda-driver, +4 engine, +7 model-format... are the child declarations of files that sit under a #[path]-loaded parent (their children cannot be found otherwise); the follow-up that removes them is turning those parents into directory modules 2026-11-06 12:53:35 +01:00
Pavlo Ratushnyi adf65a53b9 STRA-338 size: 28 oversize test files of the engine crates split by topic with scripts/dev/split_tests.py (tests keep their names, gain a topic module; 1793 tests listed before and after, same leaf names; baseline tightened: 121 -> 98 oversize files) 2026-11-06 12:41:45 +01:00
Pavlo Ratushnyi ecc774a530 STRA-338 S17: inline modules of the cuda-driver root and FFI files move to files, lib.rs and ffi/enabled.rs split by responsibility
lib.rs 3508 -> 938 lines, ffi.rs 1897 -> small, qwen_dispatch.rs 2003 and qwen_ffi.rs 1696 lose their inline test and installed-proof modules (scripts/dev/extract_modules.py, 5 self-tests; split_module.py --allow-root for lib.rs). Module paths, visibility and test ids are unchanged: 544 test ids before and after, cuda-driver tests 433 passed / 78 ignored before and after (Linux), host check clean. GPU identity and A/B follow with the combined batch 1+2 gate.
2026-11-05 22:28:30 +01:00
Pavlo Ratushnyi ff6cb3dcbf STRA-338 S21: leleka-gateway-domain (layer L2): the pure gateway domain leaves strata-control
New crate crates/gateway-domain, the first member of layer L2 in architecture.json (L2 is now a pure layer: tokio, axum,
reqwest, libc and the other adapter crates are forbidden dependencies there). It depends on serde, serde_json,
leleka-sampler-ref and leleka-tokenizer only. Moved out of control-plane/src with git mv, content unchanged apart from
paths: sampling (request sampling extensions, validation) and EngineTune (was in wire.rs), reasoning_budget (the budget
driver and its tests), codec (Family, TextCodec, TokenDecoder, QwenCodec), json_order, and the Chat Completions
translation (chat_completions: Request -> Responses request, reply fields; the axum handlers stay in chat.rs).
strata-control re-exports codec, json_order, reasoning_budget and sampling under their old paths, and wire.rs re-exports
EngineTune, so no caller and no test outside the moved modules changed. 4 new tests cover the chat translation.

Architecture gate: layer entry added; dyn-trait:leleka-gateway-domain = 5 appears because the five dyn in the moved
code (Box<dyn TokenDecoder>, Box<dyn Iterator> in the budget driver, &dyn Fn, ...) change crate; dyn-trait:strata-control
fell 21 -> 16 in the same step, so the total is unchanged (--allow-increase was needed for the new per-crate key only).
Test outcomes: 597 ok / 2 ignored before, 615 ok / 2 ignored after (18 new tests); the 13 moved tests keep their ids in the
new crate and their outcome.
2026-11-05 20:42:48 +01:00
Pavlo Ratushnyi 5dc28316ab STRA-338 S7: split worker, vision, prometheus, service_install and config by responsibility; name the modules after what they hold
* worker.rs (1271 lines, 1120 of them tests) is 149 lines; the supervisor tests are worker/tests.rs (shared fixtures) and
  worker/tests/{deadlines,handshake,generation,restart,lifecycle,reasoning}.rs. The test names are unchanged; their path
  gains the topic module (worker::tests::restart::..., see scripts/dev/test-outcomes.py compare: 23 MOVED, outcomes equal).
* vision.rs 402 -> 120 lines (tests are vision/tests.rs, same test ids); prometheus.rs 441 -> 50 (the series table is
  prometheus/series.rs); service_install.rs 436 -> 30 (the unix half is service_install/unix.rs and unix/tests.rs, same ids).
* config: Config::load_with_path (430 lines in one function) hands its limits, engine-worker and MCP sections to
  config/methods/load_sections.rs; the same checks run in the same order with the same messages.
* mcp, request_log, vision, worker, config: impl_*/note_*/check_* file names are now hub.rs, server.rs, stdio_transport.rs,
  http_transport.rs, parse_config.rs, obs_handle.rs, engine_counters.rs, encoder.rs, cleanup.rs, generation_result.rs, ...
  Public paths are unchanged (the modules re-export with glob as before).

Architecture gate: five oversize entries leave the baseline (worker.rs, vision.rs, prometheus.rs, service_install.rs,
config impl_config_2_2.rs); no number rose.
2026-11-05 20:33:04 +01:00