Commit Graph
115 Commits
Author SHA1 Message Date
Pavlo RatushnyiandClaude Sonnet 5.5 cd83f843bc Speed program lever 1: sm_120 ATTN_DAILY + GU_SWIGLU on in the 5090 profiles (teacher-forced identity PASS, decode +1.85% paired)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 04:10:45 +01:00
Pavlo Ratushnyi 3d38a23cc3 Merge branch 'claude/par-p01' into claude/hexagonal-finish-14ee3a 2026-11-08 01:30:29 +01:00
Pavlo Ratushnyi 27b3038904 STRA-338 params p01: split native_pack/dense_files.rs (pack_publication) and deploy e2e harness.rs (harness/up_plan) under 400 lines 2026-11-08 01:30:18 +01:00
Pavlo Ratushnyi 78cda328cc Merge branch 'claude/par-p01' into claude/hexagonal-finish-14ee3a 2026-11-08 01:02:11 +01:00
Pavlo Ratushnyi 672e4bfc72 STRA-338 params p01: deploy, gateway-domain, gateway-text, desktop-core and the rest of control-plane to at most 5 parameters; domain names for the new structs 2026-11-08 00:59:37 +01:00
Pavlo Ratushnyi 4cecb118ac STRA-338 params p02: native-cpu-expert, cpu-sys, cpu-kernels, cpu-worker, obs down to 5 parameters 2026-11-08 00:36:16 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 5ba57146ed STRA-338: deploy USAGE wide lines wrapped with string continuations (cooked bytes identical), archcheck python within the limits, baselines at zero
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 17:37:52 +01:00
Pavlo Ratushnyi a830d8f110 STRA-338 size-fn2: check_* that act are named for what they do (cancel_stalled_generation, probe_host, fail_if_api_exited, fail_if_engine_exited, read_assistant_text, detach_if_unattached), helpers named verb + object (report_stopping / report_engine_lost leave the Flow to the caller, count_failed_start, answer_refused_start, require_free_endpoint + spawn_worker_process, pin_engine_gpu, describe_load_verdict, run_worker_action, open_watch_stream, ...), the cold path reuses catalog_changed, the three Supervisor types are AttachLoop, SessionSupervisor and ServiceSupervisor; behaviour unchanged 2026-11-06 23:07:59 +01:00
Pavlo Ratushnyi b3fcb3cf76 STRA-338 size-fn2: restore the newline of the e2e_windows reconfigure message and the single-line nvidia-smi command of the remote probe (payload byte-identical to cbc1a9587) 2026-11-06 22:15:49 +01:00
Pavlo Ratushnyi 4b72ddf054 STRA-338 size-fn2: gptoss softmax_inverse_denominators renamed softmax_scores_in_place (it rewrites the scores; doc says so; arithmetic and attributes untouched), store_rotated_qkv split into rotate_queries (pure) and store_rotated_kv (cache write); stale docs of the cpu-sys VNNI block helpers and deploy recover_engine fixed 2026-11-06 21:30:02 +01:00
Pavlo Ratushnyi acc7fbf9b0 STRA-338 size-fn2: single-responsibility check helpers in leleka-deploy, leleka-serving-policy and leleka-experimental-ref tests (two-action helpers split, one verb+object name each; test ids and assertions unchanged; four test functions kept within 30 lines by extracting a helper) 2026-11-06 21:05:12 +01:00
Pavlo Ratushnyi 0ea7fa75ae STRA-338 size-fn2: leleka-deploy lines within 120 columns (307 -> 33 wide lines; the 33 left are the byte-exact lines of the --help text USAGE that scripts/release/package-5090.sh parses); comments reflowed by paragraph, long messages continued with a trailing backslash (cooked bytes unchanged), JSON macros re-wrapped, URL/raw-string constants split with concat!; reconfigure_by_restart helper keeps the function within 30 lines 2026-11-06 20:01:55 +01:00
Pavlo Ratushnyi 5198b90da5 STRA-338 size-fn2: leleka-deploy test functions within the limits (64 -> 0 test functions over 30 lines; helpers are not tests, test names, ids and assertions unchanged; e2e_windows checks moved to tests/e2e_windows/checks.rs) 2026-11-06 19:48:01 +01:00
Pavlo Ratushnyi 6d64ad9919 STRA-338 size-fn: leleka-deploy: split the persisted-numbers check 2026-11-06 18:58:17 +01:00
Pavlo Ratushnyi 0b20e0250f STRA-338 size-fn: leleka-deploy: reconfigure e2e checks in their own module 2026-11-06 18:55:05 +01:00
Pavlo Ratushnyi 01ff42428e STRA-338 size-fn: leleka-deploy: remaining e2e and unit test helpers 2026-11-06 18:53:20 +01:00
Pavlo Ratushnyi 6db99bb45a STRA-338 size-fn: leleka-deploy: more e2e helpers 2026-11-06 18:43:38 +01:00
Pavlo Ratushnyi 6f225ee466 STRA-338 size-fn: leleka-deploy: e2e tests split into scenario helpers, wide messages with named arguments 2026-11-06 18:36:34 +01:00
Pavlo Ratushnyi e8d49f89ed STRA-338 size-fn: leleka-deploy: more test helpers 2026-11-06 18:01:07 +01:00
Pavlo Ratushnyi 05398b9a3f STRA-338 size-fn: leleka-deploy: no new dyn, remaining helpers within 30 lines 2026-11-06 17:58:59 +01:00
Pavlo Ratushnyi 0b89649e6b STRA-338 size-fn: leleka-deploy: wrap comments and long literals, split the last helpers over 30 lines 2026-11-06 17:53:11 +01:00
Pavlo Ratushnyi 6d50d8a478 STRA-338 size-fn: leleka-deploy: split the longest unit tests into checks, remaining prod functions within 30 lines 2026-11-06 17:46:28 +01:00
Pavlo Ratushnyi cdf963ea4a STRA-338 size-fn: leleka-deploy: further helpers for the functions still above 30 lines 2026-11-06 17:35:39 +01:00
Pavlo Ratushnyi 28cd67752c STRA-338 size-fn: leleka-deploy: winfront, wsl paths, units, http, status, doctor, logs, steps, profile and fake runtime split into stage helpers (second batch) 2026-11-06 17:23:39 +01:00
Pavlo Ratushnyi e0f43a59af STRA-338 size-fn: leleka-deploy: supervisor, startup, reconfigure, plan, cli flags, logview, steps, facts, winservice split into stage helpers (first batch) 2026-11-06 17:07:49 +01:00
Pavlo Ratushnyi 5628289171 STRA-338 size-deploy: merge origin/claude/hexagonal-integ (d0b2b633b); architecture baseline re-run with --update-baseline, limits baseline re-run (allowlist 349 entries) 2026-11-06 15:55:35 +01:00
Pavlo Ratushnyi b495f972d9 STRA-338 size-deploy: Profile::validate and resources::compute within the limits (one function per rule / per sizing stage, messages unchanged); oversize files 0; fn>30 101/89, cx>10 48/0, nesting>4 7/0, wide lines 305/63; 220 tests, ids and outcomes unchanged 2026-11-06 15:52:19 +01:00
Pavlo Ratushnyi 38e570872a STRA-338 size-deploy: mechanical child modules renamed after what they hold, export lines compacted, split recorded in docs/architecture/size-split-deploy.md; oversize files 0; fn>30 103/89, cx>10 50/0, nesting>4 7/0, wide lines 339/63; 220 tests, ids and outcomes unchanged 2026-11-06 15:46:38 +01:00
Pavlo Ratushnyi 95676884b4 STRA-338 size-deploy: every .rs file of leleka-deploy within 400 lines (15 oversize files split into named modules; preflight and plan steps decomposed into one function per check/step); crate census oversize files 15 -> 0; fn>30 105/89 -> 103/89, cx>10 53/0 -> 50/0, nesting>4 7/0, wide lines 387/67 -> 339/63; 220 tests, ids and outcomes unchanged 2026-11-06 15:38:57 +01:00
Pavlo Ratushnyi d0b2b633b8 STRA-338: the archive-pin test of leleka-deploy reads the child file that now holds the pinned profile tests 2026-11-06 15:23:41 +01:00
Pavlo Ratushnyi 331e28c265 STRA-338 size-deploy: e2e lifecycle covers KarSource::None (the test target did not compile); crate census unchanged (oversize files 15; fn>30 105/89, cx>10 53/0, nesting>4 7/0, wide lines 387/67) 2026-11-06 15:14:16 +01:00
Pavlo Ratushnyi a4ceeab69c STRA-338 S22: the Qwen3.5 CUDA engine moves to the adapter crate leleka-engine-qwen35-cuda (L3, edges to cuda-driver, model-format, native-cpu-expert declared); leleka-runtime is a one-line facade over it; scripts, CI and the baseline follow the path. Test fixes found on the way: the digest pin test reads backend/config.rs, the bring-up print gate understands rustfmt-split cfg attributes and the settings snapshot guards 2026-11-06 11:34:15 +01:00
Pavlo Ratushnyi 5aec7c2c5f STRA-338: integrate the kar-off-ab branch (GGUF-PLE profile, replay smoke) into the hexagonal base so backend.rs can be split on top of it 2026-11-05 18:24:17 +01:00
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 84880a1a6d STRA-338 S12a (fix): rustfmt the moved test files of the format-gated crates
The dedent by four spaces changed how rustfmt wraps some test lines; the 25 affected tests.rs files (strata-control, desktop-core, runtime-client, deploy, gateway-text and the strict crates) are formatted so cargo fmt --check stays clean for the crates that CI gates on. Only test files change.
2026-11-05 15:00:36 +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 RatushnyiandClaude Sonnet 5.5 dc988dc53b engine: opt-in Original serve without a KAR archive (LELEKA_ORIGINAL_SERVE_GGUF_PLE=1, set by rtx5090-32g-gguf-ple); install script takes the engine binary
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 10:48:41 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c8501da9d8 deploy: the low-RAM fallback keeps kar_source none (no archive to map)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 10:31:38 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 98effcdabd deploy: experimental kar_source none and profile rtx5090-32g-gguf-ple (Leleka without the KAR archive, PLE rows from the GGUF shard)
kar_source none passes no --kar-archive-*/--kar-provenance, loads qwen4exp-native-mtp-v1, skips the kar step and the archive checks, rejects --kar-fd.
Engine env of the new profile: LELEKA_PLE_DIRECT=0 (page cache instead of O_DIRECT). Default profiles unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 10:21:01 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 731f060b74 style: cargo fmt on leleka-deploy (no functional change; fmt --check is clean, 173 lib tests pass)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 11:16:13 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 1b795f8dd4 release 5090: two stale deploy e2e tests (sparse memfd is no longer EXPERIMENTAL and its digest is pinned), acceptance job: hard-linked overlay dirs, standalone mode, product seal timing
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 23:19:05 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4cbbd2729c Merge claude/window-policy: draft-floor ceiling default 0.60 (LELEKA_SPEC_POLICY=legacy restores 0.9), replay-arm policy tooling, spec-trace bar/slope, run-e2e ATTN_DAILY_MTP default
Paired A/B 245k (8 blocks): +1.09% tok/s, se 1.86 (not resolved); replay screening +0.35..+1.72 tok/s; argmax flips 1.9-2.0% vs A/A 1.3-1.55% (<2.8% bound). Not claimed as a speedup.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 05:57:14 +01:00
Pavlo Ratushnyi 0111c3dc62 Merge claude/single-copy: sparse memfd (PLE extents only) is the rtx5090-32g default; O_DIRECT loading, page-cache release; file source kept as experimental
Identity PASS (2057/2057 rows, 1036/1036 draft traces); 245k A/B +0.58% (n.s., 5/6 blocks); MemAvailable +36.6 GiB; seal 79-97 s -> 28 s.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

# Conflicts:
#	desktop-core/src/bin/leleka-inference.rs
2026-11-03 02:15:19 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 72fc3b0820 style: cargo fmt on strata-control, strata-desktop-core, leleka-runtime-client; clear Clippy lints and two red tests on main
Mechanical rustfmt (control-plane, desktop-core and the runtime client had 360 hunks of drift; the CI format steps for control-plane and
desktop-core were red), plus, found by running `cargo clippy -D warnings` and the tests on Linux:
* control-plane/tests/log_failure_sse.rs `no_panicking_log_macros_in_the_serving_crate` was red on main since the observability merge: two
  test-only `eprintln!` samples (prometheus.rs, request_log.rs) trip its source scan. They now write to stderr with `write_fmt` and
  ignore a failed write, which is what the test asks for; the output is the same.
* tool_output.rs `is_multiple_of(2)`, an unneeded `mut` in a control-plane test, a collapsible `if` in leleka-inference.rs,
  `#[allow(dead_code)]` on observer_adaptive_slots (compiled into leleka-inference-evaluation too).
* crates/deploy/src/facts.rs: `lab_holder_running` moved above `mod tests` (clippy::items_after_test_module); code moved, not changed.
Kept as its own commit so it can be redone with `cargo fmt` if other branches touch these crates first. No behaviour change.

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
Pavlo RatushnyiandClaude Sonnet 5.5 92fd4c636c observability: middleware test, display scrub in leleka logs, engine line fields in leleka-memory, keep "fatal:" in the supervisor's message
* request_log: a test drives the real `observe` layer over HTTP (id header, session header hashed, rejection counted).
* leleka logs scrubs credentials once more on display (lines written by other programs or older builds).
* the engine's per-request line is built by leleka_memory::telemetry::request_line_fields (pure, tested for content and size: 313 bytes);
  the tier share of one request is tier_shares().
* the supervisor's fatal event keeps the "fatal: " text in its message, which crates/deploy/tests/e2e.rs and operators' greps rely on
  (crates/deploy e2e on Linux: an_engine_that_cannot_start_fails_the_service_and_names_the_log passes again).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 23:30:32 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 fb10bf0e70 observability: structured bounded logs, per-request record, metrics, leleka logs / report
* crates/obs (leleka-obs, std only): one event per line (JSON under `leleka run`, key=value on a terminal, the lab's plain lines when a
  binary is started by hand into a file), UTC ms timestamp, level, component, event, flat fields; prompt/completion text and credentials
  never appear (key classes + value scrub + registered secrets), per-event token buckets with a `suppressed` count, value and line caps,
  histogram with Prometheus exposition, size-capped file sink for requests.log.
* control-plane: `observe` middleware gives every generation request an id (x-leleka-request-id header) and a session tag (hash of the
  client's session header); the worker marks engine start / first token / terminal / error on it and one record is written at request end
  (tokens, cached prefix, queue wait, TTFT, prefill/decode tok/s, finish, error class, engine restart, GPU clock/temp/throttle). All
  elog! lines go through the log layer (sampled per call site). /metrics?format=prometheus gains request counters and histograms, engine
  lost/attached counters, uptime and supervisor restarts, PCIe, memory clock, throttle reasons, speculative tokens per round, expert-tier
  entries by tier and hit ratio.
* engine: one structured line per request with the same id (rounds, tokens per round, expert-tier share served from VRAM/PCIe/CPU for that
  request); telemetry gains spec / expert_tier / last_request; NVML sampler reads PCIe throughput, memory clock, throttle reasons.
* supervisor: structured events (engine exit, health, restarts), secrets registered with the log layer, children get LELEKA_REQUEST_LOG,
  LELEKA_STATUS_FILE, LELEKA_PROFILE and JSON logging; runtime-client and gateway log connect/probe failures as sampled events.
* leleka logs (--tail/--since/--level/--component/--source/--request/--follow), leleka report (sanitized support bundle, written only with
  --yes, nothing sent anywhere), request statistics in leleka status / verify --quick.
* generation, sampling and kernels are untouched; the lab scripts keep their plain lines (LELEKA_LOG_FORMAT=legacy or a hand-started binary).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 23:25:24 +01:00
Pavlo Ratushnyi 9f1b6baa07 rtx5090-32g: sparse memfd (memfd_extents ple_only) is the profile's form; tests describe the full copy explicitly 2026-11-02 22:41:13 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 478f0c4812 Merge claude/unattended: O_DIRECT bulk model load, supervision/hang detector/log rotation, leleka status/verify --quick, service unit + installer scripts (owner-run), soak harness
Identity gate (legacy vs new bank read, 256k replay): 2057/2057 rows, 1036/1036 draft traces identical. Soak not yet run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 22:21:46 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 5f1822d5eb Merge main (embedded expert profile) into single-copy
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 22:17:46 +01:00