Commit Graph
445 Commits
Author SHA1 Message Date
Pavlo RatushnyiandClaude Sonnet 5.5 ac60df040f STRA-338: architecture gate forbids new mechanical file names (impl_*, *_fn, numbered), baseline lists the 964 existing; rustsplit names modules after what they hold
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 00:50:17 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4b04c24981 STRA-338: limits gate gets the params metric (max 5 parameters, self counted): scanner, diff gate, census baseline, tests, doc
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 23:54:40 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d837d3f634 Merge claude/s24-cuda-model (S24: leleka-cuda-model crate); baselines for the new keys, one doc line wrapped
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 18:00:40 +01:00
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 RatushnyiandClaude Sonnet 5.5 bd18c91065 STRA-338: archcheck test_only_modules within the limits; limits census at zero
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 17:39:39 +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 1a9ff645c6 STRA-338 size: limits-offenders.py --over lists every function over any limit 2026-11-06 23:37:13 +01:00
Pavlo Ratushnyi cc2d496d9a Merge remote-tracking branch 'origin/claude/hexagonal-size-gw' into claude/hexagonal-integ 2026-11-06 15:12:34 +01:00
Pavlo Ratushnyi a06cb92cd1 STRA-338 size-gw: merge e15ca2ae8 (hexagonal-integ) into the size-gw branch; baselines re-run with --update-baseline 2026-11-06 13:32:19 +01:00
Pavlo Ratushnyi 0b9430e2db STRA-338 size: scripts/limits-offenders.py lists the production functions over the limits, longest first 2026-11-06 13:30:59 +01:00
Pavlo Ratushnyi 70a907a58b STRA-338 S12: the seal tooling follows the split symbols table and knows chain_window.ptx is sealed (repin_expect); the fake-seal test now gets past chain_window and mtp_original_full_head_native
The remaining refusal is device_poison (sealed PTX pinned at closed_kernels.rs, plan entry has no repin_expect): plan staleness from main, not from the splits.
2026-11-06 13:26:37 +01:00
Pavlo Ratushnyi e15ca2ae82 Merge remote-tracking branch 'origin/claude/hexagonal-smoke' into claude/hexagonal-integ 2026-11-06 13:19:58 +01:00
Pavlo Ratushnyi ad87e5b57d STRA-338 size: scripts/dev/split_types.py moves the types, consts and statics of oversize files into child modules (12 more files split; width census +750 and test census +10 are the restored compact data tables and the reflow, nothing added); 1793 tests listed before and after 2026-11-06 13:16:11 +01:00
Pavlo Ratushnyi 7610ba3568 STRA-338 size-gw: the 19 oversize files of control-plane and desktop-core split by topic (no file over 400 lines); mechanical child modules renamed
Tests become directory modules named after what they test, with a shared fixtures/harness module:
control-plane/src/{responses,ggml_bridge,gguf_f32_stream,prepare_preview}/tests/, desktop-core/src/runtime_rpc/tests/;
integration targets become tests/<name>/main.rs plus topic modules and a harness (backend_worker_http, vision_http,
memory_gate_http, tool_corpus, mcp_hub, api_over_runtime, runtime_gateway_sdet, native_tools_sdet,
native_tools_retry_sdet, managed_worker, gateway); target names are unchanged. Sources: leleka-inference.rs becomes
src/bin/leleka-inference/ (main.rs plus one module per operator option group), the cp_replay example becomes
examples/cp_replay/, and the tonic service impl of runtime_rpc delegates to session_rpc, model_rpc and generate_rpc
(bodies unchanged). impl_* modules are renamed after what they hold (base_provenance, count_tokens, manifest_fetch,
fetcher, record, capture, in_flight, tool_policy, tool_plan, server). The self-spawning tests that name themselves
(credential_child, the managed worker fixture) use the new module path or stay at the target root.

Test ids: 543 before and after in both crates (strata-control, strata-desktop-core, --all-targets), 0 missing, 0 new,
0 outcome changes; 241 ids differ only in the module path. Warnings in the two crates: 0 before and after.
Counts (strata-control / strata-desktop-core): oversize files 19 -> 0 (13 + 6). Functions over 30 lines, complexity 10,
nesting 4, wide lines, prod: 187/135/17/199 -> 187/135/17/196 and 81/59/6/54 -> 81/59/6/54; test: 214/17/30/133 ->
214/17/30/133 and 65/3/3/30 -> 65/3/3/27. The 211 functions that moved verbatim are in limits-allowlist.json (owner
STRA-338) because the diff gate treats a moved function as added; the entries fall as the functions are shortened.
2026-11-06 13:13:59 +01:00
Pavlo Ratushnyi ab4280a3df STRA-338 size: data tables keep their compact form (rustfmt::skip: 1719/2051/1905 -> 933/259/360 lines), kernel_ab example becomes a directory example split into 13 modules (3992 -> 1635 in main.rs) 2026-11-06 13:05:10 +01:00
Pavlo Ratushnyi a9d80333b4 STRA-338 size: large inline modules of 15 engine-crate files move to files (extract_modules.py now emits #[path] only for files that are themselves loaded through #[path]); test lists identical (1793). Ratchets raised with reason: path-include +3 cuda-driver, +4 engine, +7 model-format... are the child declarations of files that sit under a #[path]-loaded parent (their children cannot be found otherwise); the follow-up that removes them is turning those parents into directory modules 2026-11-06 12:53:35 +01:00
Pavlo Ratushnyi adf65a53b9 STRA-338 size: 28 oversize test files of the engine crates split by topic with scripts/dev/split_tests.py (tests keep their names, gain a topic module; 1793 tests listed before and after, same leaf names; baseline tightened: 121 -> 98 oversize files) 2026-11-06 12:41:45 +01:00
Pavlo Ratushnyi b3c78c4d26 Merge commit '412d9a48a' into claude/hexagonal-smoke 2026-11-06 12:27:53 +01:00
Pavlo Ratushnyi 8934a1616a STRA-338 S22: smoke inventory follows the moved tests: helpers split into child modules stay visible, every smoke has a declared group, packages of engine-core, model-format and deploy are named, the table is regenerated
SmokeInventory failed three tests at a4ceeab69 and 8890db316.

test_gates_values_and_classes_on_known_tests (caused by the S12c/S17 splits, seen after S22): the
fixture helper of actual_expert215_native_resident_gu_and_same_source_down_diagnostic moved from
mmq_native_resident_gpu.rs into mmq_native_resident_gpu/digest_fn.rs, and only `read` there opens
files. The scanner looked for file-reading helpers in the test's own file and one call deep, so a
test that reads a private fixture was classified device instead of assets. The rule is now the
module tree (x.rs with x/*.rs, or x/y.rs with x.rs) and the helper search is transitive. The
test expectation is unchanged: the smoke needs LELEKA_REAL_GU_DIR and is an assets test. Checked
against the merge base with main: every name that exists in both has the same class, gates and
needs.

test_every_smoke_lands_in_a_declared_group_and_dependencies_precede (51 smokes, 45 of them
already ungrouped on main): smoke-groups.json declares them. Unlisted cuda-driver smokes go to
transport (src/tests.rs and device_slab/tests.rs, which were lib.rs inline tests before S17,
mapped_file_dma_stress_gpu, native_head), qsa (late selection, mapped journal), mtp (scalar short
path), dispatch (qwen_dispatch/ children after the split) and runtime-moe (expert tier
residency). New groups: prefill-stage (depends on gr, gdn), pcie-copy, serve-probes (depends on
seal-loads) and cpu-probes, kind cpu: benchmarks, scale simulations and timing probes of
native-cpu-expert, engine-core and engine-qwen35-cuda that need no GPU and stay out of the default
device run. LELEKA_PLE_PROBE_ARCHIVE, LELEKA_PLE_PROBE_ROWS and LELEKA_SYNTH_KAR are asset
variables now, so the smokes that read the 55 GB archive are no longer classed as device.
CRATE_PACKAGE names leleka-engine-core, leleka-model-format and leleka-deploy (the plan used the
directory name as package).

test_doc_table_is_current: docs/gpu-bringup.md regenerated with smoke_inventory.py --update-doc
under WSL; the section on group order mentions the new groups and the cpu kind.
2026-11-06 12:27:34 +01:00
Pavlo Ratushnyi b27dbeaf88 STRA-338 S26: scripts and documented commands that ran tests of the moved engine now name leleka-engine-qwen35-cuda (leleka-runtime is a facade with no tests); test binaries are found as leleka_engine_qwen35_cuda-<hash>; smoke inventory groups follow the crate directory 2026-11-06 11:57:14 +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 412d9a48af STRA-338: merge the STRA-367 limits gate (claude/hexagonal-integ-lints) into the integration; check-local.sh keeps both the engine-crate package names and the limits steps 2026-11-06 11:39:49 +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 a8f1d11e64 STRA-338 S21: the CI coverage list and the product test step include leleka-gateway-domain 2026-11-06 11:29:46 +01:00
Pavlo Ratushnyi 054b57bec8 STRA-367: opt-in Clippy ratchet for too_many_lines, cognitive_complexity and too_many_arguments; limits gate in check-local --product
scripts/check-clippy-limits.sh (check-local.sh --clippy-limits) counts the three lints per crate
with thresholds 30 / 10 / 5 and fails when a total over all crates rises above
clippy-limits-baseline.json. The root clippy.toml carries only the two thresholds of allow-by-default
lints: too_many_arguments is on by default, and a root threshold of 5 fails the hard Clippy gates of
strata-control and strata-desktop-core. No source enables the lints and no rustfmt.toml is added.
check-local.sh --product runs the limits self-tests and the limits gate next to the architecture gate.
2026-11-06 11:26:53 +01:00
Pavlo Ratushnyi 334af80d3d STRA-367: limits gate for lawbook 301 (function 30 lines, complexity 10, nesting 4, width 120)
New and changed code is checked against the base (merge-base with the integration branch):
every added or touched function and every added or changed line must be within the limits,
unless limits-allowlist.json lists the function with a reason and an owner; an allowlisted
function may only shrink. The legacy that exists today is a per-crate census in
limits-baseline.json whose totals may only fall (same --update-baseline semantics as the
architecture gate). Rust is measured from the rustsplit lexer, the gate's own Python from ast.
56 self-tests, including a temporary git repository.
2026-11-06 11:26:53 +01:00
Pavlo Ratushnyi 71ab80d018 STRA-338 S3: arch-install.sh can install a named second candidate (CAND_NAME) beside the one queued jobs read 2026-11-06 00:07:35 +01:00
Pavlo Ratushnyi 3179309127 STRA-338: integrate engine S13 (Settings port, EnvSource) into the hexagonal integration 2026-11-05 22:49:10 +01:00
Pavlo Ratushnyi 348e52bb1e STRA-338 S13: merge claude/hexagonal-integ, tighten the architecture baseline after the Settings port 2026-11-05 22:43:29 +01:00
Pavlo Ratushnyi c347d46b80 STRA-338 S13: diagnostics settings, and the ratchets follow modules declared inside test-only files
Diagnostics topic of Settings: the bring-up trace, the driver-error trace (the nine driver_error functions
share crate::driver_errors_traced), the PLE, prefill-residual, seed and prefix traces, the serve profile
and the prefill profile sync. A set-ness switch is on for any value, as before; the serve profile and the
spec traces stay off for 0 and the empty string. The OnceLock readers are gone.

measure.py: a module declared inside a file that is itself compiled only for tests (for example
fivecase_frames.rs under native_down_candidate_only.rs, through #[path]) is test-only too. Unit test added.
Accounting only; env-read of leleka-runtime is now 1 (ProcessEnv::get_os, the one place that calls std::env),
instant-now 45 to 42, path-include 102 to 101, process-global 69 to 61.
2026-11-05 22:41:12 +01:00
Pavlo Ratushnyi ecc774a530 STRA-338 S17: inline modules of the cuda-driver root and FFI files move to files, lib.rs and ffi/enabled.rs split by responsibility
lib.rs 3508 -> 938 lines, ffi.rs 1897 -> small, qwen_dispatch.rs 2003 and qwen_ffi.rs 1696 lose their inline test and installed-proof modules (scripts/dev/extract_modules.py, 5 self-tests; split_module.py --allow-root for lib.rs). Module paths, visibility and test ids are unchanged: 544 test ids before and after, cuda-driver tests 433 passed / 78 ignored before and after (Linux), host check clean. GPU identity and A/B follow with the combined batch 1+2 gate.
2026-11-05 22:28:30 +01:00
Pavlo Ratushnyi eecbfce60d STRA-338: integrate the engine track (kar-off-ab base, S5a, S5b, S13 ratchets) into the hexagonal base; the baseline is recomputed on the merged tree (growth only in the seven kar-off-ab files) 2026-11-05 21:51:28 +01:00
Pavlo Ratushnyi 82d31e68da STRA-338 S13: the source ratchets also skip an inline module under a test cfg
An inline `#[cfg(all(test, ...))] mod x {` proof module in a production file (gdn_chain, gdn_verification,
mtp_expert_workspace, kar_ple_cache) was counted. production_lines now skips it up to its closing brace
and still counts the code after it. Accounting only: env-read leleka-runtime 101 to 93, leleka-cuda-driver
77 to 76, instant-now strata-control 37 to 35; nothing rose.
2026-11-05 21:44:34 +01:00
Pavlo Ratushnyi a389ebb0eb STRA-338 S13: the source ratchets count production code only, not modules compiled for tests
The ratchet counted `#[path]` proof harnesses (gpu_proofs/, backend_original_serve_replay.rs) and
`#[ignore]` test files that sit outside a column-0 `#[cfg(test)] mod`, so the env-read count of
leleka-runtime (261) was mostly test-only reads that Settings cannot and should not remove.

measure.py now also skips a file declared as `mod x;` under a test cfg attribute (with or without
`#[path]`, multi-line `cfg(all(...))` included) and every file below such a module. A cfg(not(test))
module still counts. Unit test added. This is an accounting correction, not a code change: every
ratchet of the baseline can only fall (env-read leleka-runtime 261 to 101, leleka-cuda-driver 130
to 77, instant-now 79 to 45 and 45 to 31, dyn-trait, path-include, process-global), nothing rose.
2026-11-05 21:43:43 +01:00
Pavlo Ratushnyi ff6cb3dcbf STRA-338 S21: leleka-gateway-domain (layer L2): the pure gateway domain leaves strata-control
New crate crates/gateway-domain, the first member of layer L2 in architecture.json (L2 is now a pure layer: tokio, axum,
reqwest, libc and the other adapter crates are forbidden dependencies there). It depends on serde, serde_json,
leleka-sampler-ref and leleka-tokenizer only. Moved out of control-plane/src with git mv, content unchanged apart from
paths: sampling (request sampling extensions, validation) and EngineTune (was in wire.rs), reasoning_budget (the budget
driver and its tests), codec (Family, TextCodec, TokenDecoder, QwenCodec), json_order, and the Chat Completions
translation (chat_completions: Request -> Responses request, reply fields; the axum handlers stay in chat.rs).
strata-control re-exports codec, json_order, reasoning_budget and sampling under their old paths, and wire.rs re-exports
EngineTune, so no caller and no test outside the moved modules changed. 4 new tests cover the chat translation.

Architecture gate: layer entry added; dyn-trait:leleka-gateway-domain = 5 appears because the five dyn in the moved
code (Box<dyn TokenDecoder>, Box<dyn Iterator> in the budget driver, &dyn Fn, ...) change crate; dyn-trait:strata-control
fell 21 -> 16 in the same step, so the total is unchanged (--allow-increase was needed for the new per-crate key only).
Test outcomes: 597 ok / 2 ignored before, 615 ok / 2 ignored after (18 new tests); the 13 moved tests keep their ids in the
new crate and their outcome.
2026-11-05 20:42:48 +01:00
Pavlo Ratushnyi 5dc28316ab STRA-338 S7: split worker, vision, prometheus, service_install and config by responsibility; name the modules after what they hold
* worker.rs (1271 lines, 1120 of them tests) is 149 lines; the supervisor tests are worker/tests.rs (shared fixtures) and
  worker/tests/{deadlines,handshake,generation,restart,lifecycle,reasoning}.rs. The test names are unchanged; their path
  gains the topic module (worker::tests::restart::..., see scripts/dev/test-outcomes.py compare: 23 MOVED, outcomes equal).
* vision.rs 402 -> 120 lines (tests are vision/tests.rs, same test ids); prometheus.rs 441 -> 50 (the series table is
  prometheus/series.rs); service_install.rs 436 -> 30 (the unix half is service_install/unix.rs and unix/tests.rs, same ids).
* config: Config::load_with_path (430 lines in one function) hands its limits, engine-worker and MCP sections to
  config/methods/load_sections.rs; the same checks run in the same order with the same messages.
* mcp, request_log, vision, worker, config: impl_*/note_*/check_* file names are now hub.rs, server.rs, stdio_transport.rs,
  http_transport.rs, parse_config.rs, obs_handle.rs, engine_counters.rs, encoder.rs, cleanup.rs, generation_result.rs, ...
  Public paths are unchanged (the modules re-export with glob as before).

Architecture gate: five oversize entries leave the baseline (worker.rs, vision.rs, prometheus.rs, service_install.rs,
config impl_config_2_2.rs); no number rose.
2026-11-05 20:33:04 +01:00
Pavlo Ratushnyi 35bf3a03d3 STRA-338 S16: gateway ports (EngineClient, ResponseStore, Clock, ToolHub, VisionEncoder) with adapters and fakes
AppState now holds ports instead of concrete types: `engine: Option<SharedEngine>` replaces the
mpsc::Sender<GenerationCommand>, `responses: SharedResponseStore` replaces Arc<RwLock<ResponseHistory>>,
`clock: SharedClock` serves queue deadlines, uptime and response timestamps, `mcp` is a ToolHub and `vision` a
VisionEncoder. The channel (adapters::ChannelEngine), the history with its disk snapshot
(responses::HistoryResponseStore), the system clock, mcp::Hub and vision::Vision are the adapters; main.rs serve()
composes them. No behaviour change: the HTTP handlers make the same calls in the same order, the queue claim race is
unchanged, only the deadline now reads the injected clock.

Ports are called per request, never per token or stream event (docs/architecture/gateway-ports.md).
ports/fakes has an in-memory adapter per port; control-plane/tests/ports_fakes.rs (12 tests), queue.rs and
adapters/channel_engine.rs add tests that drive the real handlers through them.

Architecture gate: dyn-trait:strata-control fell 35 -> 21 (a BoxError alias replaces 20 `Box<dyn Error>` spellings,
which pays for the 6 new port aliases); main.rs 1156 -> 1155 lines. Also adds scripts/dev/test-outcomes.py (per-test
outcome comparison of two cargo test logs) and scripts/dev/wsl-cargo.sh.
2026-11-05 20:06:28 +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 3e6110f5ba STRA-338 S3: arch-install.sh can replace only the candidate binaries without disturbing a running job 2026-11-05 16:33:14 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 5cc2257ea7 kar-off-ab: results page, codex/browser evidence, cmp_report knows LELK/LELG
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 16:30:18 +01:00
Pavlo Ratushnyi cb790da36b STRA-338 S12d: long impl blocks are cut between methods and the remaining oversize modules split (53 files)
The splitter now cuts an inherent impl longer than its target into several impl blocks of the same type between associated items (the generics and where clause repeated, the doc comment kept on the first block), so the giant impls left by S12b/S12c (up to 2,000 lines) split too. 53 further module files of the cold and hot crates are split; the baseline drops to 127 oversize files holding 109,000 lines (329 files and 303,000 lines on main). Types, constants, macros, tests and the files kar-off-ab edits stay; crate roots and bins are untouched.
2026-11-05 16:16:36 +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 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 c417d9c6cb STRA-338 S3: measurement tree installer for the identity and A/B gates on the 5090
scripts/e2e/hexagonal/arch-install.sh builds and freezes /data/leleka-e2e/hexagonal (tools, shared helpers, main and branch binaries, MANIFEST.sha256 of every input) so the existing draft-round identity and paired A/B scripts run against main and the branch without touching the draft-round directory; those two scripts gain DR= and D= overrides and are otherwise unchanged.
2026-11-05 15:12:20 +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 Ratushnyi 52d554e72c STRA-338 S6 part 2: SSE streaming leaves responses.rs; architecture gate rewritten to the 301 limits
The text, buffered and tool-call streaming code of the Responses API (750 lines) moves from control-plane/src/responses.rs to responses/stream.rs without a logic change, and the architecture gate becomes a small package (scripts/archcheck) whose functions stay within 30 lines, complexity 10, nesting 4 and 5 parameters.

The source counters now stop only at a column-0 cfg(test) module, so a single cfg(test) function no longer hides the code after it; that raises some measured baselines (cuda-driver, runtime, model-format, strata-control) without any code change, and the baseline was rewritten using --allow-increase for that reason alone.

Verified: cargo test -p strata-control 277 lib tests, 0 failed; 18 gate self-tests pass; fmt clean.
2026-11-05 13:47:14 +01:00
Pavlo Ratushnyi 810c13721f control-plane: responses.rs unit tests move to responses/tests.rs (STRA-338 S6, part 1)
Pure move of the 2960-line #[cfg(test)] module into a child file (responses.rs 6490 -> 3528 lines); one relative include_str path
adjusted. Architecture gate: a split into a same-stem directory is accepted when the family does not grow; test files are not counted
by the source ratchets (they replace inline cfg(test) modules, which were already skipped).

Verified: cargo test -p strata-control --lib 277 passed, 0 failed (baseline 279 minus the 2 tests moved by S9); fmt clean.
2026-11-05 13:40:55 +01:00