Commit Graph
141 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 1a4d4a737b Remove the vendored Strata tree engine/strata and its provenance files (STRA-406)
Owner decision 2026-11-23: the vendored tree is junk. Leleka never builds or runs it (no Cargo.toml or build.rs depends on it), the vanilla benchmark
builds from its own checkout on the server, the comparison measurements are finished and the CUDA ports are frozen. Strata is MIT: its licence text
stays and ships (third_party/strata/LICENSE, `leleka engine license`).

- git rm -r engine: engine/strata (upstream 41cf05a0 plus 25 locally patched files), engine/README.md, engine/upstream.md (its pin record moved to
  third_party/strata/UPSTREAM.md) and engine/upstream/ (the two local-patch diffs against the removed tree). They belong to the same vendored mechanism.
- The files Rust and the product still read were moved to third_party/strata and control-plane/tests/mcp_hub in the first commit of this branch.
- The full tree is in git history before this commit; 87e2633af is the last commit that changed it. Restore with `git archive <this commit>^ engine/strata`.
- Four doc-comment lines that the path rewrite made too wide are re-wrapped (check-limits stays at 0 errors).
2026-11-23 21:24:19 +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 8b34c9506e Format the control-plane, engine-host and library crates at 120 columns (rustfmt.toml) and drop stale docs/ references 2026-11-23 09:34:30 +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 RatushnyiandClaude Sonnet 5.5 11aac22f80 Modules without _and_ in their name: overlay_source_reading, preview_tensor_io, reconfigure_commit, host_actions, state_records, wsl_translation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 20:19:50 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 e2e8b78abf leleka-deploy: one env_settings reader, no dyn, supervisor and flows read time through the Clock port, explicit imports
glob-super-import 15 -> 0, env-read 41 -> 0 outside crates/deploy/src/env_settings.rs (typed accessors: home, PATH, tokens presence, route, distro; the LELEKA_* lookup is a fn pointer EnvLookup), dyn-trait 17 -> 0 (impl Fn / impl FnMut), instant-now 28 -> 0 (ServiceSupervisor holds an AnyClock, command flows use SystemClock of leleka-obs). Doc headers of the generated files are real sentences.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 19:40:18 +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 e03bedc3b1 Debt rework: doc headers everywhere, two import ratchets with the baseline, process-global counts uses and not import lists, 400-line fixes, docs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 19:48:44 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 a6f36378cf Explicit imports and generated doc headers for the small and mid-size crates (obs, gateway-*, tokenizer, context, backend-api, harmony, runtime-client, serving-policy, experimental-ref, cuda-model, engine-core, model-format, control-plane, desktop-core, deploy, npu-service, cpu-sys, native-cpu-expert headers)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 19:27:40 +01:00
Pavlo Ratushnyi fc79029ebb Merge claude/laptop-3080-finish: 3080 laptop audit, profile pin, WSL2 worker cap, profile guard, run tooling
Rust port / port-oracles (push) Failing after 26s
Linux / verify (push) Failing after 29s
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
Rust port / port-typecheck (push) Successful in 59s
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-fast (push) Failing after 20s
Rust port / port-linux-tests (push) Failing after 22s
Desktop foundation / core (ubuntu-latest) (push) Successful in 3m15s
Product / product (push) Failing after 13m24s
2026-11-13 17:53:10 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 7ccd1b8b5e Laptop 3080: audit of the 5090 defaults, profile pins the tier layout, WSL2 planner caps CPU workers at the physical cores, profile guard for switches without an sm_86 companion, laptop run tooling; live validation not run (30 W power cap)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 17:53:10 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 51b45b82d8 leleka-memory loses libc and windows-sys: PageLocking and ProcSource ports, OS adapters in the new L3 crate leleka-memory-os
The two baselined forbidden-dep violations are gone. FdMapping keeps the bounds checks and lock bookkeeping as safe Rust over plain addresses;
mmap/mlock/mincore/madvise/munmap/setrlimit are LinuxPageLocking, the Win32 host facts are WindowsProc, the glibc heap trim moved verbatim.
Governor::real is replaced by leleka_memory_os::real_governor (the page-locking adapter is part of it). No behaviour change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 17:46:38 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 cee394f6ef Tier swap bursts (ADAPT_EVERY=2, ADAPT_SWAPS=48) ON in the three 5090 profiles by the owner decision of 2026-11-13 (profiles, test, deploy.md, ledger, plan row 6c, host-round report)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 13:02:54 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 cbe9e56c36 Deploy config test: the PLE-on-chain profile test within the file-size limit
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 12:34:17 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 67bf39a984 Merge main into claude/host-round (profiles: tail skip keys from main + LELEKA_PLE_ON_CHAIN)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 12:32:33 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 25aed1375a Enable the lossy route tail skip (rank 7, max cached 100) by default in the three 5090 profiles (owner decision 2026-11-13)
Allow exactly LELEKA_ROUTE_TAIL_SKIP and LELEKA_ROUTE_TAIL_SKIP_MAX_CACHED in the profile engine_env allow-list, set them in
rtx5090-32g, -file and -gguf-ple (laptop profile unchanged), tests, docs/deploy.md, step-ledger H9, plan stage 6f, AGENTS.md exception note.
The quality gate was assessed and its open points (logit envelope 3.6 % against 2.8 %, ttt rounds) were overridden explicitly by the owner.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 12:13:28 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 937de960ee 5090 profiles: LELEKA_PLE_ON_CHAIN=on (bitwise: 2057 logprob rows and 1036 draft lines identical, A/A floor 0, verify mode compared 1000+ taken rows bit for bit; window.ple 0.194 -> 0.060 ms per round)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 09:43:14 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d1e0b431c6 Profiles rtx5090-32g, -file, -gguf-ple: EXPERT_PER_LAYER=no and PCIE_FRAC=0.65 by default (owner 2026-11-12); profile test, deploy doc, ledger H4
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 16:22:36 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 712b7edd0f Enable LELEKA_SM120_HEAD_CHAIN_BATCH (R8) in the 5090 profiles: bit-identical, tail section -27 us a graph against A/A noise 0.3 us; ledger
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 06:06:24 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d635a73c9a Enable LELEKA_SM120_DOWN_SUB16 (D1) and HITS_IN_COMBINE (D2) in the 5090 profiles (identity and probes PASS, window deltas); D3 WAIT_M_ROWS is a measured loss, stays off; ledger
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 16:52:52 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 622c16e15d Enable LELEKA_SM120_COMBINE_VEC4 (S11) in the 5090 profiles (identity PASS, window delta -0.016 ms a graph); S9 and U5a stay off, ledger
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 01:25:31 +01:00
Pavlo Ratushnyi ef128c3b04 Merge claude/speed-vs-strata-08143a: sm_120 defaults, verify side streams, fused commit, step ledger, upstream microbench
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

# Conflicts:
#	deploy/rust-runtime/profiles/rtx5090-32g-file.json
#	deploy/rust-runtime/profiles/rtx5090-32g-gguf-ple.json
#	deploy/rust-runtime/profiles/rtx5090-32g.json
#	docs/experiments/step-ledger.md
2026-11-11 01:18:50 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 079a8f3a03 merge ring prefetch; drop the ring diagnostics that added debt (skip-after-N, route trace); chain_gate in its own file; width
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 20:45:04 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 1799aee147 profiles: the expert stream starts at 1536 rows in the 5090 profiles (chunk hashes identical, prefill.read -180 ms at 1.5-4k tails); ledger Q4/Q5 ring findings
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 20:18:59 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b56e5afb58 Speed program: fused commit graph ON in the three 5090 profiles (identity P2/P3 PASS, section 509 -> 125 us); ledger closes S6/O11
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 17:46:11 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 edad5e7737 Speed program: QSA prelude on in the 5090 profiles (identity P2/P3/P8, section delta per T); ledger K6/K1/K7/K7a/S10/U3/O7 with the window results; PB/ZQ variants for the set A/B
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 12:13:58 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 62695ebd4b profiles: check merge, parking fast and decode graph reuse are on in the 5090 profiles (bitwise identity PASS)
Teacher-forced identity on night5-long-256k (job host-draft-switches-teacher-forced-identity, A/A floor): top-16 logprob rows 2057 of 2057 and draft trace 1036 of 1036 lines identical for each switch against shipped. Section deltas: Q7 -97 ms per request, B3 FAST -2.0 ms, O8 step graph 114 to 105 nodes. The profile allow-list accepts LELEKA_PREFIX_* and LELEKA_DECODE_*. Not on the laptop profile (the check-batch asset has no sm_86 companion).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 05:26:56 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 22d7e9d824 prefill: the loan ladder (LELEKA_PREFILL_LOAN_TIERS=1) is on in the shipped 5090 profiles
Identity: chunk residual hashes equal (PREFILL-R, jobs id1-id4). Paired A/B n=10 on the sparse holder:
session TTFT sum -3.0 s +-0.3, median -104 ms per request, <= 2048 new tokens -154 ms (19 of 19 faster),
above 2048 tokens -10 ms. The engine default stays off; the profile allow-list accepts LELEKA_PREFILL_*.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 00:58:37 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 7570247d92 Merge claude/verify-decode-graph-reuse-handles; decode graph reuse (Q7) wired behind LELEKA_DECODE_GRAPH_REUSE
Merge of the speed session's driver part (DeviceRef handles, OriginalVerifier park/rearm, OriginalVerifyCanonicalGdn reseed; ptx manifest and seal plan entries of both sides kept, ledger rows of both sides kept) with the owner loan: the journal's owners are Option behind accessors, lend() uses the same idle precondition as the speed session's require_idle.

DecodeResources implements HeldAssembly for real (park, rearm from the session priors, lend and take_back through the journal loan; every refusal retires the set). OriginalServeStack holds a GraphReuse; decode assemble asks begin first (re-arm, refill queue; or the owners back to record), teardown keeps the assembly for a clean request (drafter end_request_keep_bank, shared-expert pin, park, lend, adopt) or runs the old teardown; retirement releases the drafter before the bank closes, in begin, close and reset_expert_tier. The MoE cache pins the shared experts while a set is held and counts freed window entries (weights epoch). Switch off: begin is not called and teardown runs the old body unchanged.

Tests: GraphReuse policy with a logging probe (switch off touches nothing, key change, moved owners, refused re-arm, lost owners, order release before drop), keepable outcomes, the lifecycle fake scenarios, the GPU-free loan state machine. Not run on a GPU. No speedup claim.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 00:50:19 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 fa21dfd34d revert the ladder-profile deploy test files swept into the merge (they wait for the ladder A/B; patch kept)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:18:02 +01:00
Pavlo Ratushnyi a4a8d597fe Merge branch 'claude/host-decode-graph-reuse-2' into claude/prefill-latency
# Conflicts:
#	crates/engine-qwen35-cuda/src/settings/serve.rs
#	crates/engine-qwen35-cuda/src/settings/serve_tests.rs
#	docs/experiments/step-ledger.md
2026-11-09 23:17:14 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 dd73d3c892 Speed program: wrap a doc line (width 120)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 21:20:31 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 a199b3ad11 Speed program: S6/O11 plan (fused commit graph exists, to be measured and enabled), LELEKA_DRAFT_* allowed in profile engine_env, CF/CU CUPTI variants
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 21:16:33 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 a838d0abe7 Speed program: SIDE_QSA and SIDE_SHARED on by default in the 5090 profiles; ledger V3a/V3b/V4a/V4/S3 fixed (section delta + identity)
Owner method: a step closes on a measured section delta plus identity; the set A/B (spd-sqa, M against M+QSA+shared) checks the set for regression.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 21:14:37 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4f310457ce Speed program: SIDE_MIXER on by default in the three 5090 profiles (identity PASS, decode +1.39 % paired); ledger V3a/V3b/V4a identity
Teacher-forced gate spd-sqid1: P2 (SIDE_MIXER), P3 (SIDE_QSA), P4 (SIDE_SHARED) against P1: 2057 top-16 logprob rows bit-identical, 0 argmax flips, draft trace 518/518 identical. The A/A arm did not open (InputAllocation) in any process, so no A/A floor.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 18:37:48 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 9ec9eca26c Merge branch 'claude/speed-vs-strata-08143a' into claude/prefill-latency (the step ledger)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 15:23:02 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 9c77d603d7 single-copy RAM: refuse a full sealed memfd for a ple_only profile, lab holder seals sparse, design page
The 2026-11-09 server reading (Shmem 58.6 GB, MemAvailable 7-8 GB) is the lab holder's full 55.3 GB memfd
(single-copy-holder.sh sealed without --sparse-ple), not the sparse memfd of leleka up. The supervisor
now checks the allocated bytes (st_blocks) of an inherited descriptor against the profile and refuses a
ple_only profile on a full copy (LELEKA_ALLOW_FULL_MEMFD=1 overrides, logged); the holder script seals
--sparse-ple by default (HOLDER_MEMFD=full keeps the old form). Design, candidates and the ordered
measurements: docs/design/single-copy-ram-2026-11-09.md. No GPU/server run; identity/A-B pending.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 11:13:17 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 04287257f2 Speed program: split the profile kernel test under the 30-line limit; limits baseline lowered
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 14:34:16 +01:00
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 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 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 01ff42428e STRA-338 size-fn: leleka-deploy: remaining e2e and unit test helpers 2026-11-06 18:53:20 +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