Commit Graph
12 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 95f768cfbf STRA-338 S12c: fns and impl blocks of 162 hot-path modules move into child modules (leleka-runtime, cuda-driver, deploy, cpu-sys)
The same lexer-based splitter as S12b, now with explicit re-exports: every moved free fn comes back to its module under its old name and old visibility (cfg attributes carried), so a name can never clash with another glob import. 162 module files of leleka-runtime (68), cuda-driver (84), deploy (10), cpu-sys, igpu and leleka-memory are split into groups of about 250 lines; types, constants, macros, nested modules and tests stay. Not touched: the files kar-off-ab edits, crate roots (lib.rs, main.rs, bin/*), and giant single impl blocks (next). This changes codegen-unit placement of engine code, so it is covered by the bitwise replay and the paired A/B on the 5090, not by a binary comparison.
2026-11-05 15:52:18 +01:00
Pavlo Ratushnyi 3254b1912b STRA-338 S12b (fix): the child module of reasoning_budget no longer shares its parent's name (clippy::module_inception) 2026-11-05 15:34:16 +01:00
Pavlo Ratushnyi 6b5fcd242e STRA-338 S12b: fns and impl blocks of 59 cold oversize modules move into child modules (model-format, gateway, desktop-core, leaf libraries)
scripts/dev/split_module.py (lexer-based, with 16 self-tests) moves the top-level fn and impl items of 59 oversize module files in control-plane, desktop-core, model-format, gateway-text, leleka-memory, experimental-ref, context, serving-policy, tokenizer, backend-api, quant-core, harmony, igpu, libc-shim, npu-service and runtime-client into foo/<name>.rs groups of about 250 lines; types, constants, macros, nested modules and tests stay, every path stays valid through pub use re-exports, restricted visibilities keep their scope one level down, include paths and super:: paths are shifted. Not touched: leleka-runtime, cuda-driver, native-cpu-expert, sampler-ref and cpu-* (hot path, next wave) and the files kar-off-ab edits.

The baseline drops from 311 to 263 oversize files and from 273,600 to about 233,000 lines; the path-include ratchet ignores dir/name.rs child declarations.
2026-11-05 15:29:39 +01:00
Pavlo Ratushnyi f78b89757c STRA-338 S12a: inline unit-test modules move to sibling tests.rs files in 118 oversize files
scripts/dev/extract_tests.py moves a trailing cfg(test) mod tests block into foo/tests.rs for 118 files of leleka-runtime, cuda-driver, control-plane, gateway-text, deploy and nine smaller crates (31,000 lines), leaving production code and test ids untouched; 22 files that are themselves loaded through a path attribute carry an explicit path to their tests file. Not touched: the files the kar-off-ab branch edits (backend.rs, backend_original_serve.rs, backend_original_serve_replay.rs, qwen4exp_resident_expert_source.rs and seven deploy files).

Verified: cargo check --all-targets for the whole workspace on x86_64 Linux and on the Windows host; the 2429 library unit-test ids of the workspace are identical before and after (Linux listing diff empty); the loadable sections of leleka-inference, leleka-daemon, leleka-cli and strata-next are byte-identical between a release build before and after (scripts/dev/elf-sections-equal.sh), so the shipped code is the same. The architecture ratchets exclude tests.rs from the path-include count; the baseline drops from 329 to 311 oversize files and from 302,000 to 273,600 lines.
2026-11-05 15:00:09 +01:00
Pavlo Ratushnyi 1b928f41f1 STRA-338 S1: gate-evidence helper keeps nested separators and reports a missing command as exit 127 2026-11-05 13:58:30 +01:00
Pavlo Ratushnyi 2bfe1856a7 STRA-338 S1: gate-evidence helper that runs a gate and prints its LeaseVibe evidence comment
scripts/dev/gate-evidence.py runs one command and prints the 5.8.3 sentinel record with the full argv, working directory, scope, the command's own exit code, the commit and the time, so a gate disposition is backed by an artifact instead of a sentence.
2026-11-05 13:48:20 +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
Pavlo RatushnyiandClaude Sonnet 5.5 bea07c3d64 vram: per-call-site device allocation ledger (LELEKA_VRAM_LEDGER=1) and a free-VRAM low-water mark
The fixed VRAM footprint of ours is 2.1-2.3 GiB above vanilla's and the load ledger could not say where: the dense-weights stage shows
4,578 MiB taken for 3,890 MiB accounted. LELEKA_VRAM_LEDGER=1 records every Context::allocate by call site (innermost workspace frames of a
backtrace), removes it on free, and prints at each `vram_note` the sites that changed since the previous note, with the bytes the driver is
estimated to reserve (allocations above 1 MiB rounded up to 2 MiB, packed below, as probed on the WDDM laptop and as the 5090 token table
shows: 322.1 MiB takes 324 MiB). Off by default; the off cost is one cached bool per allocation.

`DBG vram` lines now carry the lowest free VRAM seen so far, and a new note "decode end before disassemble" reads the card after the graph
pools and every window are captured: the real low-water mark of a request, for sizing the reserve.

scripts/dev/alloc-granularity-probe.py is the offline ctypes probe of the driver's rounding.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 10:14:22 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 96484f04f1 fix: laptop-turbo.ps1 reads enforced.power.limit (power.limit is N/A on the laptop GPU) and tolerates a missing value
Rust port / port-fast (push) Failing after 9s
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-typecheck (push) Failing after 8s
Rust port / port-oracles (push) Failing after 10s
Linux / verify (push) Failing after 16s
Rust port / port-linux-tests (push) Failing after 14s
Linux / keyless-cuda (push) Skipped
Linux / static-cuda-package (push) Skipped
Linux / hosted-cuda-package (push) Skipped
Linux / linux-static-cli (push) Skipped
Linux / linux-cli-container (push) Skipped
Linux / release-cli (push) Skipped
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 02:38:22 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 5dacd41fca chore: add laptop-turbo.ps1 to prepare the laptop for measurement runs
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-typecheck (push) Failing after 8s
Rust port / port-fast (push) Failing after 8s
Rust port / port-oracles (push) Failing after 11s
Rust port / port-linux-tests (push) Failing after 13s
Linux / verify (push) Failing after 16s
Linux / keyless-cuda (push) Skipped
Linux / static-cuda-package (push) Skipped
Linux / hosted-cuda-package (push) Skipped
Linux / linux-static-cli (push) Skipped
Linux / linux-cli-container (push) Skipped
Linux / release-cli (push) Skipped
Activates the ASUS Turbo scheme, turns off sleep/hibernate/display-off/lock-display-off on mains power and prints the GPU power limit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 02:32:17 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b175119cba dev: worktree helper skips the main checkout by position
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 01:29:54 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 02efe052e4 dev: worktrees live in .git/wt, with a helper to create and clean them
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 01:29:44 +01:00