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.
This commit is contained in:
Pavlo Ratushnyi
2026-11-05 20:42:48 +01:00
parent 5dc28316ab
commit ff6cb3dcbf
23 changed files with 299 additions and 147 deletions
+8 -1
View File
@@ -68,11 +68,18 @@ def main(argv):
moved.append((key, new_same[0]))
only_before.remove(key)
only_after.remove(new_same[0])
# A test that moved to another crate keeps its full module path: pair those when unique too.
for key in list(only_before):
same = [k for k in only_after if k[1] == key[1]]
if len([k for k in only_before if k[1] == key[1]]) == 1 and len(same) == 1:
moved.append((key, same[0]))
only_before.remove(key)
only_after.remove(same[0])
for old_key, new_key in moved:
if before[old_key] != after[new_key]:
changed.append((old_key, before[old_key], after[new_key]))
else:
print(f"MOVED {old_key[0]} :: {old_key[1]} -> {new_key[1]} ({after[new_key]})")
print(f"MOVED {old_key[0]} :: {old_key[1]} -> {new_key[0]} :: {new_key[1]} ({after[new_key]})")
for key, was, now in changed:
print(f"CHANGED {key[0]} :: {key[1]}: {was} -> {now}")
for key in only_before: