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.
5.0 KiB
Size split of control-plane and desktop-core (STRA-338, batch GW-1)
The owner order: no .rs file over 400 lines, no function over the limits of docs/architecture/limits-gate.md. This
page records how the 19 oversize files of strata-control (control-plane/) and strata-desktop-core
(desktop-core/) were split, and how the test ids moved. Every module is named after what it holds, never _2/_3.
Test ids
A test id is <module path>::<test name>. A split changes the module path and nothing else:
- 543 tests before and after in the two crates (
cargo test -p strata-control -p strata-desktop-core --all-targets, Linux): 0 missing, 0 new, 0 outcome changes; 241 ids differ only in the module path (the topic module is inserted). - Cargo test targets keep their names:
tests/<name>.rsbecametests/<name>/main.rs, which Cargo discovers under the same target name. - Two families of tests start themselves as a child process with
--exact <id>.credential_child("<name>")inruntime_gateway_sdetandnative_tools_retry_sdetnow names"<module>::<name>"; thefixturetest ofmanaged_workerstays in the target root (main.rs) so its id (fixture) is unchanged. - A shared module holds what several topics use:
fixturesfor unit tests,harnessfor integration targets (thetests/common/module of control-plane stays where it was and is loaded with#[path = "../common/mod.rs"]).
Unit tests (<module>/tests.rs becomes <module>/tests/)
| Was | Now (tests/ modules) |
|---|---|
control-plane/src/responses/tests.rs |
fixtures, tool_policy, custom_tools, tool_replay, input_items, history, stateless_replay, validation, text_preview, sampling, live_endpoint, reasoning, reasoning_live, structured_output, stream_termination, live_tools, control_tokens |
control-plane/src/ggml_bridge/tests.rs |
iq3, iq4, q8_iq4xs, k_quants, q6_q2, iq2s_iq3xxs |
control-plane/src/gguf_f32_stream/tests.rs |
iq3_iq4, q8_iq4xs, k_quants, q6_q2, iq2s_iq3xxs |
control-plane/src/prepare_preview/tests.rs |
fixtures, convert, source_kinds, sharded, overlay, ple_partition |
desktop-core/src/runtime_rpc/tests.rs |
fixtures, load_dedup, lifecycle, auth_and_capacity |
Integration targets (tests/<name>.rs becomes tests/<name>/main.rs plus topic modules)
| Target | Modules next to main.rs |
|---|---|
control-plane/tests/backend_worker_http |
harness, text_answers, engine_failures, tool_calls, text_formats, runtime_status, prompt_limits, codex, monitor |
control-plane/tests/vision_http |
harness, delivery, encoder, rendering |
control-plane/tests/memory_gate_http |
harness, gate, soak |
control-plane/tests/tool_corpus |
harness, corpus, quoted_values |
control-plane/tests/mcp_hub |
harness, stdio_servers, http_and_config |
desktop-core/tests/api_over_runtime |
harness, streaming, engine_loss, scale_and_prefix |
desktop-core/tests/runtime_gateway_sdet |
harness, text_flow, dispatch_faults, lifecycle |
desktop-core/tests/native_tools_sdet |
harness, declarations, calls_and_history, publisher |
desktop-core/tests/native_tools_retry_sdet |
harness, retry, usage_accounting |
desktop-core/tests/managed_worker |
harness, lifecycle, stop_and_cli |
desktop-core/tests/gateway |
harness, routing, failures |
Sources
desktop-core/src/bin/leleka-inference.rsbecamesrc/bin/leleka-inference/main.rs(flags andmain) with one module per operator option group:arguments,execution,sources,streamed_spill,retained_scratch,resident_owners,adaptive_slots,original_serve,evaluation_output. Each module starts withuse super::*;; the root re-exports the module items it calls.control-plane/examples/cp_replay.rsbecameexamples/cp_replay/main.rswithinstant_backend,stack,client,liveandverify;desktop-core/examples/cp_replay_grpc.rsloads it from the new path.desktop-core/src/runtime_rpc/impl_proto_runtime_server_runtime.rs(one 463-line trait impl) becameservice.rs, whoseRuntimeimpl delegates each RPC tohandle_<rpc>insession_rpc,model_rpcandgenerate_rpc(bodies unchanged).- Mechanical child modules renamed after what they hold:
kar_overlay/base_provenance,messages/count_tokens,model/manifest_fetch,mtp_fetch/fetcher,request_monitor/{record,capture},gateway/in_flight,runtime_tools/{tool_policy,tool_plan},runtime_rpc/server. Paths re-exported by the parents are unchanged.
Why the limits allowlist grew
The diff gate treats a function that moved to another file as added. The test and source functions that moved
verbatim and still miss a limit are in limits-allowlist.json (owner STRA-338, reason "moved verbatim"). Each entry can
only fall; scripts/check-limits.py --update-baseline drops an entry when its function is brought within the limits.