677 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 219238cd08 architecture gate: read the whole file after a cfg(test) mod declaration, find static cells by type, 64 new exceptions with reasons (STRA-338)
The scanner stopped at the first '#[cfg(test)] mod x;' of a file, so the code below was invisible. It now skips only the item under a test-only cfg (an inline mod body, a declaration, a fn, a use; any(test, feature) is not test-only) and reads on.

process-global counted the type name OnceLock/LazyLock/OnceCell, which also matched instance fields (six exceptions existed only for that) and missed Atomic*, Mutex, RwLock, Once, Cell and RefCell statics, thread_local! included. It now counts a static whose type is a cell or a workspace type that holds one (derived per crate and its dependencies), and static mut. Eight exceptions that only excused instance fields go; the rest of the file's hits are re-judged.

Newly visible: 123 static cells in 58 files, 15 allow(unused_imports) in 6 files and the engine settings::process() cell (read at about 78 sites). Each gets an exception whose reason starts kept: (the boundary that forces it) or debt: (what removes it); the settings cell is the largest debt and is not removed here because the engine does not compile on Windows. Entries 173 -> 229, baseline stays empty. 11 new self-tests (39 in all).
2026-11-24 08:51:58 +01:00
Pavlo Ratushnyi bb8ff44667 Sealed PTX: scrub engine/strata from four PTX header comments and their sm_86 companions, re-pin (STRA-407)
bf16_f32_mmvf, iq3_s_q8_1, moe_group_iq3_s, moe_group_iq3_s_nc4 (sm_120 in src/, sm_86 in ptx-sm86/) change in // header comments only (proof: identical after comment
stripping, no .file/.loc directive or string carries the path). The sm_86 companions are re-derived with sm86_assets.retarget + ptxas -arch=sm_86 (== the edited files);
MANIFEST.json (sm120/sm86 sha256 and byte counts of the four, the -I flags of the one recompiled companion) and the five-part sm86_table rows (new keys, re-sorted, same 27/27/27/27/23
layout) follow; FORMER_TABLE_DIGEST is recomputed with the algorithm of its test (reproduces the old value on main). Rust pins that cover the changed bytes:
bf16_receipt_types.rs BF16_RECEIPT (.cu source_sha256 and bf16_f32_mmvf.ptx ptx_sha256; a Receipt, not a PtxPin, so patched token by token), the frozen-artifact hash of
iq3_s_q8_1.ptx in context_handle.rs and in scripts/test-cuda-projection-family-driver.sh. Instruction streams, entry names and pinned symbol names are untouched.
2026-11-23 22:37:24 +01:00
Pavlo Ratushnyi da8c974f68 Drop the stale engine/strata paths and retired generator names from comments, doc strings and generated fixtures (STRA-407)
Rust comments that named scripts/offline/*, gen_goldens.py, oracle/gen_*.{sh,cpp,py}, build_oracle.sh and similar retired generators now say where the data
came from (the Original's code, Strata 41cf05a0) or drop the sentence. The path/generator text of seven generated fixtures (sampler_oracle.json, sampling_keys.json,
memory_plan_golden.json, rope_golden.json, cvec_oracle.json, stra161 fixtures.json, commentary-tool-prompt.json) is reworded; no test reads those fields and no pin
covers their bytes. cmd_time/doc.rs: the two path texts in the format string; its lines are re-broken so they stay within 120 columns (the string is unchanged
otherwise). Comment-only except those data/string spots; no behaviour change.
2026-11-23 22:37:17 +01:00
Pavlo Ratushnyi a4afb2a182 gpu-bringup: name the include dirs of an upstream checkout strata-41cf05a0/ instead of the removed engine/strata (STRA-407)
The recipe data (sm86-recipes.json, extra-seal-plan.json, rope-regeneration.json), STANDARD_INCLUDES, the sm86 include list and the one test that asserts them
now spell the include directories as strata-41cf05a0/{include,src,third_party/ggml}; prose that named engine/strata/CMakeLists.txt or the retired
build-original-verify-ptx.sh now says Strata 41cf05a0 or the precise flags. UPSTREAM.md records where to place a restored checkout.
No pin covers these files; behaviour of the tools is unchanged (the directories did not exist before either).
2026-11-23 22:29:08 +01:00
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 b4db01728c Keep the Strata files Rust and the product read in third_party/strata (STRA-406)
Owner decision 2026-11-23: the vendored Strata tree engine/strata is removed for good. This first step moves what is still read
at build, test or ship time into one small directory, byte for byte:

- third_party/strata/LICENSE (MIT; `leleka engine license` embeds it, the packagers ship it)
- third_party/strata/ggml/LICENSE, project-maya/LICENSE, project-maya/NOTICE.md (licence texts the release packager ships)
- third_party/strata/serve/chat_template.jinja (one copy, embedded by control-plane server_api.rs and gateway-text prompt.rs)
- third_party/strata/serve/chat_golden.json (gateway-text prompt tests)
- third_party/strata/tests/data/native_experts/*.txt (control-plane native_pack tests)
- control-plane/tests/mcp_hub/mcp_fake_server.py next to its test harness
- third_party/strata/UPSTREAM.md replaces engine/upstream.md: pin 41cf05a0, URL, the 25 locally patched files, where the removed tree is in history

include_str! paths, deploy/build.rs (the `leleka version` Strata pin now reads third_party/strata/UPSTREAM.md), Dockerfile.static-cli,
.dockerignore, .gitattributes, the release packagers (package-5090.sh, package-release.py: the subtree facts of the removed tree are
dropped from PROVENANCE) and the evidence capture scripts follow the move. The tree itself is deleted in a later commit.
2026-11-23 21:11:53 +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 c3add435eb Scripts: paths of moved Rust files updated (update_path_refs.py) 2026-11-14 19:42:32 +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 92b03fca4e Architecture gate: named exceptions list (crate, file, ratchet, reason) so a ratchet can be zero outside documented sites; unused or reasonless entries are errors 2026-11-14 18:16:56 +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 abfc50ba7e Merge branch 'main' into claude/arch-names-high 2026-11-14 15:23:00 +01:00
Pavlo Ratushnyi a8584c545e Tool: ROOT_FILE for other crate roots 2026-11-14 15:23:00 +01:00
Pavlo Ratushnyi 5d0d96ed76 Merge claude/laptop-3080-live: VM memory gate 2026-11-14 14:38:20 +01:00
Pavlo Ratushnyi 9a6fe120f0 Laptop gates: wait for the VM memory the engine start check needs (31 GiB MemAvailable) 2026-11-14 14:38:20 +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 Ratushnyi c869a9a328 Merge claude/laptop-3080-live: stretch tooling (foreign service guard, ladder, polling gate) 2026-11-14 14:33:55 +01:00
Pavlo Ratushnyi 5091dfc10d Laptop stretch: leave a foreign Leleka service alone, ladder mode (cold prompts of growing size), 2-minute polling gate in lap_lib 2026-11-14 14:33:55 +01:00
Pavlo Ratushnyi 354a128c7f Merge branch 'main' into claude/arch-names-high 2026-11-14 14:32:15 +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