OutputDecoder split into two types over the shared Bytes, so what one reading offers cannot be asked of the other:
LiveDecoder (raw_text, notes) and AtEndDecoder (notes, accepted_call_in_reasoning, split_text) replace the enum with its
mode-specific accessors that returned None or false in the wrong mode. TextCodec gets live_decoder and at_end_decoder.
LiveDecoder::finish now hands the Harmony tail to the reader, so a live reading of gpt-oss would lose nothing.
push and finish after the generation ended return a decode error. AtEndPlan.preview: the non-stream answer no longer runs
the reasoning previewer. The two expect calls of the buffered stream are a response.failed path (DECODER_GONE).
TokenDecoder, QwenDecoder, decode_all and TextCodec::decoder are gone (HarmonyDecoder has push and finish of its own;
its tests drive it directly). AtEndReader::finish is split: Generation::split (split.rs) cuts the bytes and counts the
tokens, the plan flush, the debug copy, the events and the answer reading are functions of their own; the rule 'an
answer has one text event, empty if nothing else' is ensure_text. Names: decode_lossy, convert_segments, build_item,
wrap_reasoning_delta, finish_generation, BufferedRun::build (one result, the initial events are a field).
drain_utf8 is private to the output module (its test reads through the live decoder). The </think> marker search and
hold-back live in think_marker.rs, used by the previewer, the at-end split and the reasoning budget.
Unit tests added: keep_raw/raw_text/split_text, the no-preview plan, finishing twice, a cut character at the end.
Proof: the golden recorded on 08afbf216 (130 cases, 260 captures) passes unchanged; strata-control lib 315 and
gateway-domain 32 tests pass; architecture-baseline.json tightened (dyn-trait gateway-domain 4 to 2, strata-control 12
to 11).
84 lines
3.1 KiB
JSON
84 lines
3.1 KiB
JSON
{
|
|
"_comment": "Debt that exists today. Every number may only fall (scripts/check-architecture.py --update-baseline refuses to raise one). Do not edit by hand; regenerate. Policy: architecture.json.",
|
|
"violations": [
|
|
"forbidden-dep leleka-memory libc",
|
|
"forbidden-dep leleka-memory windows-sys"
|
|
],
|
|
"oversize": {},
|
|
"source": {
|
|
"dyn-trait:leleka-backend-api": 1,
|
|
"dyn-trait:leleka-cpu-worker": 4,
|
|
"dyn-trait:leleka-cuda-driver": 48,
|
|
"dyn-trait:leleka-deploy": 17,
|
|
"dyn-trait:leleka-engine-core": 18,
|
|
"dyn-trait:leleka-engine-fake": 1,
|
|
"dyn-trait:leleka-engine-qwen35-cuda": 50,
|
|
"dyn-trait:leleka-experimental-ref": 3,
|
|
"dyn-trait:leleka-gateway-domain": 2,
|
|
"dyn-trait:leleka-gptoss": 10,
|
|
"dyn-trait:leleka-gptoss-igpu": 4,
|
|
"dyn-trait:leleka-gptoss-npu": 4,
|
|
"dyn-trait:leleka-gpu-npu-worker": 6,
|
|
"dyn-trait:leleka-memory": 17,
|
|
"dyn-trait:leleka-model-format": 8,
|
|
"dyn-trait:leleka-tokenizer": 1,
|
|
"dyn-trait:strata-control": 11,
|
|
"dyn-trait:strata-desktop-core": 2,
|
|
"env-read:leleka-cpu-kernels": 1,
|
|
"env-read:leleka-cpu-worker": 2,
|
|
"env-read:leleka-cuda-driver": 73,
|
|
"env-read:leleka-deploy": 41,
|
|
"env-read:leleka-engine-qwen35-cuda": 1,
|
|
"env-read:leleka-gateway-text": 2,
|
|
"env-read:leleka-gptoss": 6,
|
|
"env-read:leleka-gptoss-npu": 1,
|
|
"env-read:leleka-gpu-npu-worker": 2,
|
|
"env-read:leleka-igpu": 1,
|
|
"env-read:leleka-libc-shim": 4,
|
|
"env-read:leleka-memory": 3,
|
|
"env-read:leleka-model-format": 5,
|
|
"env-read:leleka-native-cpu-expert": 19,
|
|
"env-read:leleka-native-parity-bench": 1,
|
|
"env-read:leleka-npu-service": 1,
|
|
"env-read:leleka-npu-worker": 1,
|
|
"env-read:leleka-obs": 2,
|
|
"env-read:leleka-tokenizer": 2,
|
|
"env-read:strata-control": 19,
|
|
"env-read:strata-desktop-core": 15,
|
|
"instant-now:leleka-backend-api": 2,
|
|
"instant-now:leleka-cpu-worker": 9,
|
|
"instant-now:leleka-cuda-driver": 31,
|
|
"instant-now:leleka-deploy": 28,
|
|
"instant-now:leleka-engine-qwen35-cuda": 17,
|
|
"instant-now:leleka-gptoss": 4,
|
|
"instant-now:leleka-gptoss-igpu": 5,
|
|
"instant-now:leleka-gptoss-npu": 12,
|
|
"instant-now:leleka-gpu-npu-worker": 4,
|
|
"instant-now:leleka-igpu": 1,
|
|
"instant-now:leleka-memory": 1,
|
|
"instant-now:leleka-model-format": 10,
|
|
"instant-now:leleka-native-cpu-expert": 30,
|
|
"instant-now:leleka-npu-service": 5,
|
|
"instant-now:leleka-obs": 3,
|
|
"instant-now:strata-control": 22,
|
|
"instant-now:strata-desktop-core": 15,
|
|
"path-include:leleka-cuda-driver": 118,
|
|
"path-include:leleka-engine-qwen35-cuda": 100,
|
|
"path-include:leleka-model-format": 12,
|
|
"path-include:leleka-native-cpu-expert": 2,
|
|
"path-include:strata-desktop-core": 2,
|
|
"process-global:leleka-cuda-driver": 110,
|
|
"process-global:leleka-engine-qwen35-cuda": 59,
|
|
"process-global:leleka-gateway-domain": 3,
|
|
"process-global:leleka-gateway-text": 5,
|
|
"process-global:leleka-gptoss-npu": 3,
|
|
"process-global:leleka-libc-shim": 13,
|
|
"process-global:leleka-memory": 10,
|
|
"process-global:leleka-model-format": 8,
|
|
"process-global:leleka-native-cpu-expert": 32,
|
|
"process-global:leleka-obs": 7,
|
|
"process-global:leleka-tokenizer": 4,
|
|
"process-global:strata-control": 11
|
|
}
|
|
}
|