control-plane/src/{prompt,response_tools,tool_output}.rs (pure text logic: pinned chat template renderer, tool catalog, tool-call
parser) move by git mv to the new leaf crate crates/gateway-text. strata-control re-exports them under the same module paths
(crate::prompt, crate::tool_output keep working for tests and callers); strata-desktop-core replaces its three #[path] includes with
imports. The leleka-runtime GPU proof modules that hash prompt.rs follow the new location. The only text change in the moved files is
the relative include_str path to engine/strata. serde_json features (preserve_order + float_roundtrip) equal what both hosts already
got through unification.
Verified: cargo test strata-control + strata-desktop-core + gateway-text on the host: 504 tests, 0 failed; the 30 tests that vanish
are exactly the duplicate runtime_prompt/runtime_tool_catalog/runtime_tool_parser copies of the same 30 tests (11+2+17), which now run
once. WSL x86_64-linux cargo check --tests leleka-runtime: 62 warnings, unchanged. fmt clean on the new crate.
49 lines
2.9 KiB
JSON
49 lines
2.9 KiB
JSON
{
|
|
"_comment": "Policy read by scripts/check-architecture.py (STRA-338 ADR). Layers are ordered low to high; a normal dependency must point to the same or a lower layer. L2 (core) is reserved: it is empty until the engine/gateway domain crates are extracted (steps S19, S21). Every workspace package appears in exactly one layer.",
|
|
"max_lines": 400,
|
|
"adapter_layer": "L3",
|
|
"pure_layers": ["L0", "L1"],
|
|
"forbidden_in_pure": ["tokio", "axum", "tonic", "tonic-prost", "reqwest", "hyper", "libc", "rustix", "windows-sys", "sysinfo", "wgpu"],
|
|
"layers": {
|
|
"L0": ["leleka-backend-api"],
|
|
"L1": [
|
|
"leleka-obs", "leleka-context", "leleka-sampler-ref", "leleka-quant-core", "leleka-serving-policy", "leleka-harmony",
|
|
"leleka-tokenizer", "leleka-gguf", "leleka-kar-codec", "leleka-experimental-ref", "leleka-cpu-sys", "leleka-cpu-kernels",
|
|
"leleka-shm", "leleka-openvino", "leleka-memory", "leleka-gateway-text"
|
|
],
|
|
"L2": [],
|
|
"L3": [
|
|
"leleka-libc-shim", "leleka-model-format", "leleka-cuda-driver", "leleka-native-cpu-expert", "leleka-gptoss", "leleka-igpu",
|
|
"leleka-gptoss-igpu", "leleka-gptoss-npu", "leleka-npu-service", "leleka-cpu-worker", "leleka-igpu-worker", "leleka-npu-worker",
|
|
"leleka-gpu-npu-worker", "leleka-offline-tools", "leleka-runtime-client"
|
|
],
|
|
"L4": ["leleka-runtime", "strata-desktop-core", "strata-control", "leleka-deploy", "leleka-native-parity-bench"]
|
|
},
|
|
"adapter_edges": [
|
|
["leleka-cuda-driver", "leleka-libc-shim"],
|
|
["leleka-cuda-driver", "leleka-model-format"],
|
|
["leleka-model-format", "leleka-libc-shim"],
|
|
["leleka-native-cpu-expert", "leleka-libc-shim"],
|
|
["leleka-cpu-worker", "leleka-gptoss"],
|
|
["leleka-gptoss-igpu", "leleka-gptoss"],
|
|
["leleka-gptoss-igpu", "leleka-igpu"],
|
|
["leleka-gptoss-npu", "leleka-gptoss"],
|
|
["leleka-igpu-worker", "leleka-cpu-worker"],
|
|
["leleka-igpu-worker", "leleka-gptoss-igpu"],
|
|
["leleka-npu-worker", "leleka-cpu-worker"],
|
|
["leleka-npu-worker", "leleka-gptoss-npu"],
|
|
["leleka-gpu-npu-worker", "leleka-cpu-worker"],
|
|
["leleka-gpu-npu-worker", "leleka-gptoss"],
|
|
["leleka-gpu-npu-worker", "leleka-gptoss-igpu"],
|
|
["leleka-gpu-npu-worker", "leleka-gptoss-npu"],
|
|
["leleka-offline-tools", "leleka-model-format"]
|
|
],
|
|
"source_patterns": [
|
|
{"id": "env-read", "regex": "\\benv::var(_os)?\\(", "why": "configuration must be parsed once into a Settings struct (S13), not read all over the code"},
|
|
{"id": "instant-now", "regex": "\\bInstant::now\\(\\)", "why": "time must come from an injected Clock in core logic (S14)"},
|
|
{"id": "path-include", "regex": "#\\[path\\s*=", "why": "a file compiled into two crates must be one crate (S8)"},
|
|
{"id": "process-global", "regex": "\\b(OnceLock|LazyLock|OnceCell)\\b|\\bstatic\\s+mut\\b|Governor::global\\(|serving_cells\\(\\)", "why": "process globals make core logic untestable without a GPU (S14)"},
|
|
{"id": "dyn-trait", "regex": "\\bdyn\\s+[A-Z]", "why": "no dynamic dispatch per round or token; dyn is for startup composition only"}
|
|
]
|
|
}
|