The controller ended a request as length when a full window did not fit, losing the rows that did, and the MTP chain drafted its full
length whatever the context had left. Near the end the window now takes the rows that fit, the chain is clamped to the cells that exist
(restored on the next round), the driver's chain loop is bounded by the ring's cells, and the draft launch no longer refuses a window
only because the unused part of a full chain would pass the ring.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
leleka_tokenizer::LiteralMarks swaps every special literal (GGUF token type 3 and 4) in a client string for a plane-15 private-use mark
before the chat template runs (a forged mark is escaped); Tokenizer::encode_marked parses the template's own literals as special tokens and
encodes each mark's literal as ordinary text. render_request marks instructions, message text, reasoning, call arguments, tool outputs and
tool descriptions/schemas; the gateway's own tool markers stay literal. Generation and /input_tokens share the one encoding; the text
contract carries the marked string and leleka-runtime reads it with encode_marked.
Not covered: strata-desktop-core still renders unmarked text; live Codex session (gate L) not run.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs/upstream.md: new pin, pin history (both SHAs of the old pin), local patches as re-applied, conflict table,
left-out list, verification. docs/upstream/*.patch: the local patches on the old and the new pin.
docs/upstream-digest-2026-10-25.md: Qwen-path shortlist for the Rust runtime, KAR generality versus the
DeepSeek-V4.1 engine, the DeepSeek engine, new tools, compatibility, server build plan (not run).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Item 5: the patch source is not in the tree but is in the git objects of the codex KAR branch; recorded what it is, what can be recovered and why it is not ported. Item 6: scope of set_stage/set_next and what a layer split needs; nothing implemented. Item 8: every production DBG/PROBE print is behind LELEKA_BRINGUP_TRACE or a switch of its own; crates/leleka-runtime/tests/bringup_prints_gated.rs keeps it so.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The CLI hands budget and preset changes to the supervisor through a request file; the supervisor checks them with the resource planner twice (before and after stopping the engine), restarts the engine with the sealed archive descriptor it holds, keeps the gateway and API processes and ports, and restores the previous settings when the planner or the new engine refuses. --persist writes the result into leleka.json (and strata.json for the context). leleka.json now records the profile before the preset changed it so that dedicated undoes workstation.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Opt-in api_monitor keeps the last 100 requests of the chat, messages and responses dialects; /metrics gains engine, live, requests, totals, hardware, history; ?format=prometheus (or a scraper Accept) renders the same document as gauges and counters. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Live Codex CRM: median prefill 2265 -> 706 ms, p90 3620 -> 1064 ms, decode unchanged; teacher-forced agreement
(job 9d4) is within the noise of a chunk-cut change (control 9d5). docs/prefix-cache.md has the numbers.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
leleka up --preset dedicated|workstation (env LELEKA_PRESET): CPU expert workers, host RAM floors and VRAM budget are
computed from cores, MemTotal/MemAvailable and free VRAM, printed, preflighted and baked into leleka.json.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>