Commit Graph
6 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 0abeca4871 STRA-338 size-fn: serving-policy, gguf, worker-protocol: timings, fixed point, cors, stops, budget, shared defaults, inventory, error display and test helpers within limits 2026-11-06 18:38:54 +01:00
Pavlo Ratushnyi 5a14bc26b0 STRA-338 size-fn: gguf, kar-codec, serving-policy, worker-protocol: helpers within limits, 120-column format 2026-11-06 18:08:04 +01:00
Pavlo Ratushnyi 7545422280 STRA-338 size-fn: gguf, kar-codec, serving-policy, worker-protocol: split header/metadata/tensor reads, tensor type table, decoder, calibration, GEN/DONE parsing, sampling config, vision positions, base64 (partial) 2026-11-06 18:05:42 +01:00
Pavlo Ratushnyi c10563ab08 STRA-338 S6 (improve): streaming splits into text, buffered and tools modules; authored lines wrapped to 120 columns
responses/stream.rs (755 lines) becomes three modules of 173, 199 and 327 lines plus a 74-line root that re-exports them, a pure move with only the visibility widened to the responses tree; the documentation lines written in this work for worker-protocol, gateway-text and stream.rs are wrapped to the 120-column limit of the maintainability rules, and AGENTS.md names the architecture gate. cargo test -p strata-control and cargo fmt --check stay green.
2026-11-05 14:05:07 +01:00
Pavlo Ratushnyi 8a13a7d1d7 STRA-338 S9 (improve): Finish::from_word replaces a second spelling of the finish words in parse_done
The DONE parser matched the words stop, length and cancel by hand next to Finish::word, which writes them; the parser now uses the inverse Finish::from_word, so the three words exist in one place, and a new test proves every word round-trips and an unknown one is refused (worker-protocol 9 tests, cpu-worker 10, all passing).
2026-11-05 14:01:33 +01:00
Pavlo Ratushnyi 6155c871b0 worker-protocol: one crate for both ends of the gateway/worker line protocol (STRA-338 S9)
New dependency-free crate crates/worker-protocol (L0): events (Event, Done, Finish, parse_line, moved from control-plane/src/wire.rs),
command (GEN/STOP/QUIT parser, moved from cpu-worker/src/protocol.rs) and lines (READY/T/PP/REUSED/ERR/DONE writers, moved from
cpu-worker). Finish was defined twice (gateway and worker) and is now one enum with a word(). wire.rs re-exports the event types and
cpu-worker/protocol.rs re-exports the old paths, so no caller changes. The gateway's rich GEN writer (golden-tested against the Python
server) stays in wire.rs. New golden: every line the worker writes round-trips through the gateway parser.

Verified (host): cargo test leleka-worker-protocol 8/8, cpu-worker, strata-control all green (0 failed); the 6 moved tests keep their
bodies; clippy -D warnings clean on the new crate; fmt clean.
2026-11-05 13:37:05 +01:00