Commit Graph
7 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 40896ba217 STRA-338 S24: peel the pure host-side models out of cuda-driver into leleka-cuda-model
New L1 crate crates/cuda-model (leleka-cuda-model, forbid(unsafe_code), depends on leleka-context only) holds:
Error/Result with Display, DenseFormat, RoutedFormat, ProjectionKind (+ layout/alignment/required_modes), ProjectionSpec,
the Bf16/Q5K/Q6K projection shapes, bringup_trace_enabled, and the modules serving_context, host_profile, command_profile,
original_mtp_loader, original_prefill_schedule, qsa_prompt_attention_select, original_expert_slots, native_flash_attn,
s_gemv_legacy, device_arena, mmq_original_prefill_misc (moved with git mv; code unchanged apart from pub visibility and
#[inline] on the tiny cached-switch readers, host_profile::add split into an inlined gate and a cold body).

leleka-cuda-driver re-exports every item at its old path, so no use path in the driver, engine-qwen35-cuda or
native-parity-bench changes. Tests moved with their modules; they read the .cu sources and oracle fixtures of the driver
through driver_source!; the one loader test that needs the driver's session geometry stays in the driver.

Housekeeping: workspace members/default-members, Cargo.lock, architecture.json (L1), hexagonal.md, ci-coverage.json,
check-local.sh, port.yml, linux-tests/run.sh, AGENTS.md. architecture-baseline.json: the source ratchets of the moved code
change crate key (dyn-trait driver 56 to 49 + model 3, env-read 72 to 67 + 5, process-global 110 to 99 + 11), regenerated
with --allow-increase for the new keys only; per-pattern totals do not rise. limits-baseline.json is unchanged: no moved
function is over a limit.
2026-11-07 17:40:24 +01:00
Pavlo Ratushnyi ac50c32f31 STRA-338 S26: CI coverage list names the engine crates (leleka-engine-core, leleka-engine-fake, leleka-engine-qwen35-cuda) and leleka-gateway-domain; scripts/check-ci-coverage.py was red on the S22 tip 2026-11-06 11:43:58 +01:00
Pavlo Ratushnyi 6155c871b0 worker-protocol: one crate for both ends of the gateway/worker line protocol (STRA-338 S9)
New dependency-free crate crates/worker-protocol (L0): events (Event, Done, Finish, parse_line, moved from control-plane/src/wire.rs),
command (GEN/STOP/QUIT parser, moved from cpu-worker/src/protocol.rs) and lines (READY/T/PP/REUSED/ERR/DONE writers, moved from
cpu-worker). Finish was defined twice (gateway and worker) and is now one enum with a word(). wire.rs re-exports the event types and
cpu-worker/protocol.rs re-exports the old paths, so no caller changes. The gateway's rich GEN writer (golden-tested against the Python
server) stays in wire.rs. New golden: every line the worker writes round-trips through the gateway parser.

Verified (host): cargo test leleka-worker-protocol 8/8, cpu-worker, strata-control all green (0 failed); the 6 moved tests keep their
bodies; clippy -D warnings clean on the new crate; fmt clean.
2026-11-05 13:37:05 +01:00
Pavlo Ratushnyi 7b1922d116 gateway-text: prompt, response_tools and tool_output become one crate; desktop-core no longer compiles them twice (STRA-338 S8)
control-plane/src/{prompt,response_tools,tool_output}.rs (pure text logic: pinned chat template renderer, tool catalog, tool-call
parser) move by git mv to the new leaf crate crates/gateway-text. strata-control re-exports them under the same module paths
(crate::prompt, crate::tool_output keep working for tests and callers); strata-desktop-core replaces its three #[path] includes with
imports. The leleka-runtime GPU proof modules that hash prompt.rs follow the new location. The only text change in the moved files is
the relative include_str path to engine/strata. serde_json features (preserve_order + float_roundtrip) equal what both hosts already
got through unification.

Verified: cargo test strata-control + strata-desktop-core + gateway-text on the host: 504 tests, 0 failed; the 30 tests that vanish
are exactly the duplicate runtime_prompt/runtime_tool_catalog/runtime_tool_parser copies of the same 30 tests (11+2+17), which now run
once. WSL x86_64-linux cargo check --tests leleka-runtime: 62 warnings, unchanged. fmt clean on the new crate.
2026-11-05 13:32:35 +01:00
Pavlo Ratushnyi 0aab895444 native-cpu-expert: drop the production edge to cuda-driver; CPU-vs-CUDA parity bench moves to leleka-native-parity-bench (STRA-338 S11)
rust_bench_cuda.rs and the native_expert_parity bin (the only users of leleka-cuda-driver in the CPU expert adapter) become the new
tool crate crates/native-parity-bench (L4, cargo-checked in the product gate). leleka-native-cpu-expert no longer depends on
leleka-cuda-driver; the architecture baseline drops that violation. Code moved byte-for-byte except the use paths.

Verified (WSL x86_64-linux): cargo check --all-targets for the new crate, native-cpu-expert and leleka-runtime; cargo test -p
leleka-native-cpu-expert all ok (22+2+4+... tests, 0 failed); check-architecture and check-ci-coverage pass.
2026-11-05 13:20:39 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 cb7bcc36ed ci: cover leleka-obs (the coverage gate caught it on the rebase onto the observability merge)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 00:30:27 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4ca30c9e1c ci: build and test what ships (check-local --product, Product workflow, coverage gate) and repair the red checks
The existing workflows never built the `leleka` binary (crates/deploy) or ran the tests of leleka-deploy, leleka-memory,
leleka-runtime-client, leleka-runtime or leleka-cuda-driver (docs/ci-audit.md). New: scripts/check-local.sh --product and
.github/workflows/product.yml (default-member build, release build of the six shipped binaries, cargo check of the CUDA-feature
crates, tests, rustfmt/Clippy), scripts/check-ci-coverage.py + scripts/ci-coverage.json (fail when a workspace member has no CI
coverage entry), scripts/ci/nvidia-smi (hermetic stand-in for the deploy end-to-end tests).

Repairs found by running every step: check-local --fast failed on rustfmt in leleka-backend-api/leleka-context and on Clippy
type_complexity in leleka-tokenizer (formatting and a local type alias only); `cargo test -p leleka-cuda-driver` does not compile without
its cuda-driver feature (script now passes it); the desktop.yml hardware smoke step had no --bin (six binaries, no default-run);
the stale 8192 context assertion in crates/deploy/tests/e2e.rs (the laptop profile is 262144 since 621d35276); five trivial Clippy
lints in leleka-memory and leleka-deploy; the literal_port drift guard (red since the 2026-10-25 upstream sync) is reported as debt;
control-plane Clippy no longer lints its path dependencies; the sampler host-shim script works under Git Bash; worktree.sh creates
worktrees with core.autocrlf=false and .gitattributes marks the sealed PTX -text (a CRLF checkout makes the binary refuse to start).
No kernel, engine numeric or runtime behaviour is changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 23:32:24 +01:00