rust_modtree.py: a cfg(feature = "preview-path") attribute was taken for a #[path] attribute (two modules were invisible to the tools).
path_to_modules.py keeps a file that two parents declare (native_down_pair_io.rs, one copy of the state each).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
scripts/dev/path_to_modules.py moves each module declared with #[path] to the file the compiler looks for without the attribute, moves the
children of a path-loaded file with it (such a file owns its directory like mod.rs) and rewrites include_str!/include_bytes! paths. Only the
two declarations that point into the crate's tests/ directory keep their attribute. No code changes: parent files lose attribute lines.
Gates that quote source paths follow: smoke-groups.json (directory patterns for runtime-gr/gdn/moe/qsa/ple/mtp; 7 real-model smokes now classify as
model-assets, 3 fallback smokes now sit in their runtime group), docs/gpu-bringup.md table, docs and the qsa oracle pin path.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
git mv of the files and of the module directories next to them, mod declarations, #[path] attributes and
the paths that name the modules, rewritten by scripts/dev/rename_mechanical.py from a reviewed name table.
Two files lost one to two lines so the 400-line limit holds again (qsa_prompt_index, original_verify_expert_probe).
limits-baseline.json: test fn_lines 0 -> 1 is --allow-increase for crates/deploy builtin_profiles.rs:149 (37 lines,
the speed-vs-strata session's file, not touched here); the prod params census falls 108 -> 1 (w_launch, extern C ABI).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
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.
* 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.
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.