117 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 51a4eceff0 control-plane: the request counters of /metrics belong to Services, not a process cell (STRA-338)
The request middleware, the backend worker and the metrics handler now share one RequestMetrics value that Services holds, so the LazyLock registry of request_log.rs and its architecture.json exception are gone. The middleware gets it through Observe, the worker through BackendWorkerConfig, and prometheus::render takes it as an argument; the counters, histograms, labels and log lines are unchanged, and the unit tests now count into a registry of their own instead of one shared by the whole test process.
2026-11-24 03:44:23 +01:00
Pavlo Ratushnyi d4aba09cab leleka-inference: tests of the verification flags (the policy belongs to its command line, not to the process) 2026-11-23 12:19:39 +01:00
Pavlo Ratushnyi 82c306b49e engine: one MemoryServices and one VerifyPolicy per engine, injected from the composition root; no process-global governor, inventory or stamp registry
spawn_backend_configured creates the MemoryServices (the first Load installs the governor into it, at the same moment
as before) and hands it to the owner thread (LoadEnv), the Original runner (Run, ReopenEnv, GenerateEnv), the stack
(StackConfig.memory) and the status proxy. The prefix cache, the conversation device, the expert tier, the inventory
classes and the page-cache release ask it instead of Governor::global. NativeBackendConfig.verification carries the
stamp policy of leleka-inference (--verify-stamps, --verify-rehash, --kar-attested-by-stamp) to the shard and archive
verification. The nine Governor::global exceptions of architecture.json and the three singleton exceptions of
leleka-memory and leleka-model-format are deleted; the smokes and probes make their own services.
2026-11-23 12:16:30 +01:00
Pavlo Ratushnyi 12cba8095c Merge codex/leleka-arxiv-paper into main: docs/ moved to MCP, 120-column formatting, CI fixes, hooks; conflicts resolved on main's side and re-formatted
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-typecheck (push) Successful in 1m27s
Rust port / port-linux-tests (push) Failing after 4m34s
Rust port / port-fast (push) Successful in 5m56s
Desktop foundation / core (ubuntu-latest) (push) Successful in 5m7s
Linux / verify (push) Failing after 8m49s
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
Product / product (push) Failing after 16m46s
Rust port / port-oracles (push) Successful in 11m11s
2026-11-23 09:42:41 +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 c7ee5b1068 Merge branch 'claude/debt-rename' into claude/debt-hot-control 2026-11-14 20:54:18 +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 e8421945f1 Hot paths of the control side: env switches parsed in env_settings, time read through the Clock ports (worker, backend worker, admission pool, responses deadlines, views, stage trace)
env-read strata-control -> 0 outside env_settings.rs (debug_failed_output is read per call instead of cached in a OnceLock; request_log profile and stage trace mode come from env_settings), instant-now strata-control 15 -> 0 and strata-desktop-core 4 -> 0 outside the adapters: tokio-clock deadlines read SystemClock / RuntimeClock (zero-sized adapters, the same Instant::now call inlined), MemoryView and PrefixView hold an AnyClock, the request monitor and GenerationMetrics stamp with leleka-obs SystemClock. No change of order, branching or timing semantics. NOT merged: waits for the two-binary bitwise identity run (hot path: admission, streaming, gRPC client).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 19:52:01 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 21967f3de4 strata-desktop-core: env_settings reader, evaluation_measurement is a lib module, RuntimeClock port, explicit imports, doc headers and renamed modules
env-read 13 -> 0 outside env_settings.rs, path-include 2 -> 0, allow-unused-imports 9 -> 0, node inventory cache and ssh tunnel / managed worker deadlines through a clock. Modules renamed by responsibility (gateway/pool_gateway, runtime_gateway/{tool_responses,text_responses,registry,model_control}, runtime_rpc/{generation_lifecycle,server_state}, managed_worker/{worker_process,manager}, runtime_tools/tool_declarations).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 19:40:18 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 3498bab1c6 Explicit imports: desktop-core binary root; debt register numbers
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 15:30:42 +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 7f3d5a5935 WIP (not compiled yet): rename vague module files to what they hold, explicit-import tool handles supported-target gate and feature cfg, config env reader, node credential reader
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 12:39:01 +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 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 46e62255db STRA-338 params p01: control-plane functions to at most 5 parameters (WorkerInbox, TensorSpan, PartLimits, SessionInputs, EnginePipes and other groups) 2026-11-08 00:14:49 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c4e99d2ca6 STRA-338: rustfmt of the merged size-gw files
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 09:41:44 +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 4b9fc18794 STRA-338 size-fn2: the remote probe is two adjacent raw literals joined by concat! (payload byte-identical to cbc1a9587, no line over 120 columns) 2026-11-06 22:21:27 +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 887668add3 STRA-338 size-fn2: desktop-core runtime_rpc decisions apart from state changes (load verdict judged, described and applied by three functions; generation admission checked apart from the reservation; a proven nonacceptance releases the reservation in release_reservation, settle_rejection gone) 2026-11-06 21:30:00 +01:00
Pavlo Ratushnyi 7bfd821019 STRA-338 size-fn2: desktop-core production functions within the limits (hardware::inventory, node respond, node_connection::session, node_proxy::respond, planner::plan, Pool::new, ToolResponse::complete/preflight; desktop-core fn>30 20 -> 0, cx>10 -> 0, wide 13 -> 0); validate() of the Responses request split into one check per field
Each helper does one action and is named verb+object (sample_host, add_nvidia_accelerators, check_pool_bounds, index_groups,
subscribe, publish_ready, follow_updates, respond_request, refusal_status, read_headers, relay_body, build_response,
publish_text, publish_call, terminal_status, total_tokens, call_size ...). New modules: node/respond.rs, runtime_tool_response/preflight.rs.
Behaviour unchanged (same error texts and order). The remote probe script wraps its nvidia-smi line with a shell line
continuation (same command).
2026-11-06 21:11:51 +01:00
Pavlo Ratushnyi 7d4740d62c STRA-338 size-fn2: single-responsibility assert helpers in strata-desktop-core tests (profile selection, digests, stale epoch / output budget) 2026-11-06 21:05:13 +01:00
Pavlo Ratushnyi 01ddd43e50 STRA-338 size-fn2: desktop-core functions within the limits: cli node serve/parse_mode, worker run, check_output_directory, relay next_chunk, main/file_command, managed_worker start/Owner::command/run, remote inventory parse, runtime_rpc pump, and the tests of remote, runtime_gateway and runtime_rpc (prod fn>30 8 -> 0, cx>10 8 -> 0, test fn>30 6 -> 0 in these files; test ids unchanged) 2026-11-06 20:22:09 +01:00
Pavlo Ratushnyi ec2dbe54e1 STRA-338 size-fn: rustfmt of the files this batch changed (strata-control, strata-desktop-core, runtime-client, deploy) 2026-11-06 19:11:35 +01:00
Pavlo Ratushnyi 521c3d0d91 STRA-338 size-fn: dyn-trait aliases in desktop-core bins, result_large_err allowed where the error is the HTTP response 2026-11-06 19:11:19 +01:00
Pavlo Ratushnyi 00c8e39fcc STRA-338 size-fn: desktop-core: handle_generate and Sizing::dedicated within the limits 2026-11-06 19:04:22 +01:00
Pavlo Ratushnyi 03c7e83b07 STRA-338 size-fn: desktop-core planner, evaluation_measurement, managed_worker within the function limits 2026-11-06 19:00:46 +01:00
Pavlo Ratushnyi e9a82e5f73 STRA-338 size-fn: desktop-core runtime_gateway: responses, render, load, tool_responses, credential within the function limits 2026-11-06 19:00:08 +01:00
Pavlo Ratushnyi b3aca3ddd9 STRA-338 size-fn: desktop-core journal, remote install, remote probe and ssh tunnel within the function limits 2026-11-06 18:57:47 +01:00
Pavlo Ratushnyi e6306202c3 STRA-338 size-fn: desktop-core runtime_rpc: generate, load, unload, reconfigure, watch, pump, snapshot and four tests within the limits 2026-11-06 18:57:40 +01:00
Pavlo Ratushnyi c4952262b2 STRA-338 size-fn: desktop-core main binary: command parts in cli modules (fn>30 3 -> 0) 2026-11-06 18:38:53 +01:00
Pavlo Ratushnyi c0736acf44 STRA-338 size-fn: desktop-core hardware: probe within the limits 2026-11-06 18:24:02 +01:00
Pavlo Ratushnyi 229694aa33 STRA-338 size-fn: desktop-core runtime_rpc: handle_cancel within the limits 2026-11-06 18:14:26 +01:00
Pavlo Ratushnyi d66cbeac95 STRA-338 size-fn: desktop-core gateway responses, runtime_tools history/plan/policy/fields, Gateway::with_token within the function limits 2026-11-06 18:12:45 +01:00
Pavlo Ratushnyi cdbfb53861 STRA-338 size-fn: desktop-core bin: option dispatch, owner table and one test within the limits 2026-11-06 17:57:32 +01:00
Pavlo Ratushnyi aaa09d67bd STRA-338 size-fn: desktop-core bin: all binaries within the function limits (fn>30 22 -> 0, wide lines 4 -> 0) 2026-11-06 17:50:13 +01:00
Pavlo Ratushnyi 801ee44d46 STRA-338 size-fn: desktop-core bin: leleka-inference main and original_serve within the function limits 2026-11-06 17:36:09 +01:00
Pavlo Ratushnyi fa27e2229a STRA-338 size-fn: desktop-core tests and examples within the function limits (fn>30 44 -> 0, wide lines 16 -> 0) 2026-11-06 17:12:46 +01:00
Pavlo Ratushnyi a5078a9c84 STRA-338 size-gw: 6 more production functions within the limits; doc comments and cfg attributes given back to the functions they belong to
settings_from, planner candidate, request_monitor begin and render, PrefixView::prefix_match and settings_post now use
helpers. Earlier helper insertions had taken the doc comment (or, for validate_auto, the #[cfg(unix)]) of the function
below them: restored for tool_markup, decode_tensor_row, read_events, one_layer, model_control_prelude,
check_activation_link, validate_auto and finish; the unix-only helpers carry the same #[cfg(unix)] (checked with a
Windows host `cargo check`, which shows no new warning in the two crates).

Test ids: 543 before and after, 0 missing, 0 outcome changes; warnings in the two crates 0 (Linux).
Counts (strata-control / strata-desktop-core), functions over 30 lines / complexity 10 / nesting 4 / wide lines, prod:
151/123/17/185 -> 146/122/17/185 and 63/56/6/52 -> 62/56/6/52.
2026-11-06 15:01:37 +01:00
Pavlo Ratushnyi 83565a456b STRA-338 size-gw: 11 more production functions of control-plane and desktop-core within the limits (helpers extracted, behaviour unchanged)
Vision::encode, StdioTransport::request, handle_cancel, RuntimeServer::{serve,reserve}, finish (legacy done line wrapped
with a string continuation, text unchanged), event_to_proto, ResponseHistory::insert_with_limit, ToolStream::{text,
finish_text} (json! bodies wrapped, key order unchanged), cuda_memory::inventory, HarmonyDecoder::translate and
Server::call.

Test ids: 543 before and after, 0 missing, 0 outcome changes; warnings in the two crates 0.
Counts (strata-control / strata-desktop-core), functions over 30 lines / complexity 10 / nesting 4 / wide lines, prod:
158/127/17/194 -> 151/123/17/185 and 67/58/6/54 -> 63/56/6/52.
2026-11-06 14:30:18 +01:00
Pavlo Ratushnyi ba93550022 STRA-338 size-gw: 22 test functions of control-plane and desktop-core within the limits; the size split recorded in docs/architecture
Helpers extracted from test functions that were moved verbatim by the split (their allowlist entries are gone):
native_pack one_layer, service_install unix tests, request_monitor streams, vision fetch, config control_vector_file,
kar_writer, node_reconnect launch, worker lifecycle, model hub token, kar_codec f16, the backend_worker_http prompt
limits, wire gen lines, lifecycle admission, service_switch journal, node_contract proxy, memory_gate reconfigure,
the ggml Q6/Q2 block builders, gguf_f32_stream IQ3/IQ4 truncation and the control-token rendering test.
docs/architecture/size-split-control-plane-desktop-core.md records where every oversize file went and how test ids moved.

Test ids: 543 before and after, 0 missing, 0 outcome changes; warnings in the two crates 0.
2026-11-06 14:07:28 +01:00
Pavlo Ratushnyi c1aa6d0194 STRA-338 size-gw: 13 more production functions of control-plane and desktop-core within the limits (helpers extracted, behaviour unchanged)
The five operator_*_execution parsers of the inference binary share select_execution_flag; the others are
mtp_pack::check, preflight_space, check_activation_link, service_install show, validate_auto, Ssh Config::arguments,
Manager::with_journal, Terminal::feed, Pool::acquire, Agent::build, enqueue_with, GenerationMetrics::finish and
NativeModel::validate.

Test ids: 543 before and after, 0 missing, 0 outcome changes; warnings in the two crates 0.
Counts (strata-control / strata-desktop-core), functions over 30 lines / complexity 10 / nesting 4 / wide lines, prod:
166/130/17/194 -> 158/127/17/194 and 77/59/6/54 -> 67/58/6/54.
2026-11-06 13:50:36 +01:00
Pavlo Ratushnyi 1f8effb97e STRA-338 size-gw: 25 production functions of control-plane and desktop-core brought within the limits (helpers extracted, behaviour unchanged)
Extracted helpers: ReqCtx::new, Profile::gateway, RuntimeServer::new, props, Generate::line, Http::request,
read_events, parse_macos, parse_nvidia, validate_nested_slices, sample_windows, tool_markup, count_input_tokens,
model_control_prelude, vision fetch, admit, decode_tensor_row, Registry::observe, provenance_value,
decode_source_tensor, service_install parse, provision prepare, provision arguments, write_group, pool relay.

Test ids: 543 before and after, 0 missing, 0 outcome changes; warnings in the two crates 0.
Counts (strata-control / strata-desktop-core), functions over 30 lines / complexity 10 / nesting 4 / wide lines:
prod 187/135/17/196 -> 166/130/17/194 and 81/59/6/54 -> 77/59/6/54; test unchanged (214/17/30/133, 65/3/3/27).
2026-11-06 13:30:31 +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 e049e24fe3 STRA-338 S20: EngineFamily seam in leleka-engine-core, Qwen35Cuda family in leleka-runtime, the scripted engine as leleka-engine-fake; the inference binary and the full-chain test start their engines through spawn::<F>. Ratchets raised by the Box<dyn Backend> signatures of the seam (core +2, fake +1, runtime +1) and 2 test lines: the Backend trait object is the process boundary the gRPC server already held 2026-11-06 11:20:57 +01:00
Pavlo Ratushnyi 3530208024 STRA-338 S7: AppState in four groups, app/ routes split by role, main.rs becomes a dispatcher plus the composition root
AppState (app/state.rs) is now lifecycle + EngineLink (client port, control channel, worker status, pool,
queue timeout) + HttpPolicy (api key, CORS, trusted origins) + ModelView (name, aliases, tokenizer, template,
vision port, prefix-cache and memory views) + Services (response store, monitor, MCP port, settings, clock,
started_at). Field uses were rewritten mechanically (state.worker -> state.engine.worker, ...); no handler logic
changed. The old impl_default_for_appstate.rs, which held the route table and the admin handlers, is app/routes.rs,
app/admin_routes.rs and app/readiness.rs.

main.rs (1156 lines: an 840-line argument match, the serve function, two helpers) is now 8 lines. The argument match
is split into command groups under src/cli/ (operations, model_fetch, model_inspect, model_ensure, model_prepare,
kar_inspect, kar_verify, kar_overlay, model_text; each owns its arms in their old order and answers Ok(false) for a
line it does not own), serve() and shutdown_signal() are src/serve.rs (the composition root), the usage text is
cli/usage.rs. The binary name and every command line are unchanged.

Architecture gate: control-plane/src/main.rs leaves the oversize list (1156 -> 8). --allow-increase was used because
the type change forces the AppState struct literals in seven already-oversize test/example files to nest by group:
cp_replay.rs +7, responses/tests.rs +11, backend_worker_http.rs +14, mcp_hub.rs +3, memory_gate_http.rs +7,
vision_http.rs +6, desktop-core api_over_runtime.rs +6 (55 lines in all, against 1148 lines removed from main.rs).
Test outcomes are unchanged (597 ok / 2 ignored before and after, 14 new tests from S16).
2026-11-05 20:22:10 +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 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