Repository navigation
server: GET /engine/steps on the shipping line (#119 ported); the loop copies typed fields into a preallocated ring, no JSON on the loop - #132
Open
joelteply wants to merge 1 commit into
Conversation
…k loop copies typed fields into a preallocated ring, no JSON on the loop #119 (fable/engine-steps, against the old pin branch) carried onto codex/s4-per-mind-integration (one include conflict: both kept). While porting, its capture built nlohmann::json trees and a std::map on the task loop every step a subscriber was attached; Joel's rule is no serde on a hot path. Now: - server-engine-steps.h is a fixed ring of typed records (began: chosen task ids; ended: each slot's work), allocated once when the subscriber opens it, with inline room for every slot; a step copies fields into the next free record (no allocation, no JSON); a full ring counts its loss and publishes it in position as one `missed` record, as before; - the per-slot token counts are a vector indexed by slot id, the step's buffers live on the context and are reused (no per-step map or array allocation); - the SSE text is formatted at the edge, on the HTTP reader's thread (next_frame); the frames are the same as before (kind, at_us, step, chosen / work with task, depth, prefilled, decoded, accepted_draft, seq), so the core reader (continuum ggml-org#6059) is unchanged. Receipt (qwen35-0.8b, M5, 2026-11-16): a 24-token completion with a subscriber: "opened", then 24 began and 24 ended records, 0 missed, all 49 frames parse as JSON; a second subscriber is refused ("another subscriber holds the engine-step stream"); capacity 0 is refused. 0 warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#119 ported onto
codex/s4-per-mind-integration. It is the producer half of continuum ggml-org#6055, whose core reader is ggml-org#6059, and the per-step measurement the live read of every speed change needs.Fixed while porting
#119 built
nlohmann::jsontrees and astd::mapon the task loop every step a subscriber was attached. Now:Receipt (qwen35-0.8b, M5, 2026-11-16)
opened, then 24beganand 24ended, 0missed. All 49 frames parse.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo