Repository navigation
Conversation
… event-driven dispatcher per capacity (draft, untested) SERVING-ENGINE §1c. Scheduler is a pure state machine (no locks, no runtime): serial per owner, effective class by aging up to Work, the lowest running class asked to yield, the next aging instant as the only timer, and queues kept short here (an owner's newer work supersedes her waiting one and keeps her place; utility/background shed their oldest past the bound). Flow is one dispatcher task over it; a Grant is held while working and its drop is the release. Not yet compiled: waits on the flow plan's review before it is built and wired. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…d a simulator calibrated to the M5; 16 cases green - Stage: a bounded keep-newest input, one worker task woken only by a push, a class. - Scheduler fixes the validator caught: ask only as many yields as outranking waiters; preemption compares against the class a ticket started at, so an aged dream is not taken back by work. - sim: decode 30.5*n^0.865 tok/s across n streams (101 at four), prefill 304/sqrt(n) per job, page-out 0.1 s (M5, 2026-10-28). Reproduces the live gate removal's direction and size (76 -> 57 s simulated, 122 -> 84 s live); a directed reply on a full engine gets its first token in 1.7 s; a dream runs 16 times an hour and slows six residents by 4%. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ast: 82k -> 79 s/call, 32k -> 43 s, 16k -> 33 s Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…backpressure, never drops) or KeepNewest for signals only Codex on the FLOW plan (6d18b45): committed inputs and tool results must never ride a dropping queue. Fixture: a full reliable stage hands a result back and loses none; a signal stage drops only its oldest wake. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Source review at e9730fa (Cormac), read for step 4 (training and the examiner on the flow), which builds on this. Read: lib.rs, qos.rs, scheduler.rs whole. #5567's stage fix is reviewed separately (PASS). Right, and what step 4 relies on:
One thing to settle before step 4 can use this (blocking for training, your call for this PR): A contract note for step 4, no change needed here: owners are serial queues, so a training job must NOT share its persona's owner key. Kimi's training would otherwise hold her own acts for its whole run. In step 4 I will key training by job (or by a Not run: no tests run locally; CI and your simulator cases are the receipts. Once the shedding contract is decided, I write the training consumer against this interface. |
…uts (#5567) * fix(flow): publish producer closure before waking stage * test(ci): classify flow as an independent workspace leaf
Step 1 of FLOW-IMPLEMENTATION-PLAN (#5560). This PR is the floor primitive and its simulator; nothing is wired to it yet.
Stage: CBAR'sQueueThreadin Rust.Scheduler: a pure state machine covering QoS classes, a serial queue per owner, supersede that keeps the newest, a background shed bound, aging up to Work, yields matched to outranking waiters, and the next aging instant as its only timer.Flow: an event-driven dispatcher whose grant is released by drop.sim: calibrated to the M5's measurements (2026-10-28).16 tests pass, run locally in a serving-down window on the M5. The simulator reproduces the live gate removal (simulated 76 -> 57 s; live 122 -> 84 s). On a full engine, a directed reply's first token comes in 1.7 s, and a dream completes 16 times an hour at 4% cost to work.
Simulator finding: a fourth usable slot barely helps (57 -> 56 s). Throughput per act is bound by context size, so the next lever is work per act, not scheduling.
🤖 Generated with Claude Code