Repository navigation
refactor(serving): lane demand is its own submodule of serving_daemon (slice 1 of 11,822 lines) - #4996
Closed
joelteply wants to merge 6 commits into
Closed
refactor(serving): lane demand is its own submodule of serving_daemon (slice 1 of 11,822 lines)#4996joelteply wants to merge 6 commits into
joelteply wants to merge 6 commits into
Conversation
… (slice 1 of 11,822 lines) BigMama's step 6, card dbc9711c. serving_daemon.rs mixed every concern of serving in one 11,822-line file. Slice 1 moves the lane-demand authority into serving_daemon/lane_demand.rs: LaneDemandState, its statics, the pure demand decisions (settles_this_tick, ready_edge, knee_model, resident_lane_demand, sustained_leased_in), and quiesce/release. Items the parent still uses are pub(super) and imported once. The external callers (airc_runtime_registry, benchmark_resume) move to serving_daemon::lane_demand:: with no re-export. While moving them: the five lock-poison expects now carry their reason. The unjustified unwrap baseline ratchets DOWN 2257 -> 2253. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
… and snapshot are serving_daemon submodules (slice 2) Card dbc9711c, BigMama's step 6. serving_daemon.rs goes from 11,822 to 9,863 lines. Six concerns move into serving_daemon/: - gates: floor, downshift, lane admission, pin fit; - host_budget: host budget inputs, steady/ludicrous holds, pool kind; - vram: governed ceiling, last good reading, engine device bytes, serving attribution; - prompt_cache: per-launch cache grant, rotating minds, sidecar headroom; - candidates: servable models, refusals, hardware tier; - snapshot: sticky window, wedge-heal floor, published snapshot. Mechanics: - Private top-level items are pub(super), and the parent imports each submodule once. - Trait-impl methods keep no visibility. - External callers move to the new paths, with no re-exports: eval, ai_provider, working_set, lane_args, serving_consumer, exam_serving, system_profile. Found while moving: six production unwraps the unwrap gate never counted, because the rule treats everything after a file's first #[cfg(test)] as test code, and serving_daemon.rs has one early. Out of that shadow they count. Each now carries its reason: the 0 or default is either never used as a quantity or is the documented honest answer. The baseline holds at 2253. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…ost_budget (the one path my rewrite missed) CI at 4bbdff4: E0603 at commands/agent/solve.rs:385. The caller-rewrite skipped names followed by '::'; it now handles them, and solve.rs was the only one. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…ring, intent, plan, measure, reconcile, health, publish) beside its state Slice 3 of card dbc9711c. serving_daemon.rs drops to 5,929 lines. Moving the methods exposed production unwraps that the hygiene production half had hidden after the first #[cfg(test)]. Each one now carries a same-line reason. The two fingerprint-lock unwraps in the health heartbeat could have killed the spawned heartbeat silently, so they now recover the poisoned value like every other lock in this module. The serving snapshot's to_value names its boundary: the bus event that reaches remote subscribers. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
… so a seam is found wherever it moved CI on 1194287: a_refusal_names_the_pin_that_caused_it and the_serving_daemon_installs_the_admission_authority failed. They searched only serving_daemon.rs, and the refusal probe and lane_admission_authority now live in candidates.rs and plan.rs. The one negative assertion (no pin_store.clear()) was checked against the package with grep and still holds. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…rites follow the code into the package #5000 (time::EpochMs) rewrote nine clock sites in serving_daemon.rs, and #4996 had moved most of that code into serving_daemon/. The conflict keeps the split file, and every #5000 rewrite is applied where its code now lives: chat::now_ms and trace::now_ms become EpochMs::now().millis() (serving_daemon.rs, measure.rs, prompt_cache.rs, health.rs, reconcile.rs x3); vram.rs's private epoch_ms() is deleted and its two callers read EpochMs; snapshot.rs's ready_verified_at_ms reads EpochMs::read. source-hygiene, including #5000's wall_clock gate, exits 0. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
Contributor
Author
|
Closed in the queue sweep (Fable, 2026-10-24): obsolete: the 6,274-line serving_daemon move predates the crate cuts; the files it moves were split or deleted since. Reopen if this is wrong. |
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.
BigMama's step 6, card dbc9711c. serving_daemon.rs mixed every concern of serving in one
11,822-line file. Slice 1 moves the lane-demand authority into serving_daemon/lane_demand.rs:
LaneDemandState, its statics, the pure demand decisions (settles_this_tick, ready_edge,
knee_model, resident_lane_demand, sustained_leased_in), and quiesce/release. Items the parent
still uses are pub(super) and imported once. The external callers (airc_runtime_registry,
benchmark_resume) move to serving_daemon::lane_demand:: with no re-export.
While moving them: the five lock-poison expects now carry their reason. The unjustified
unwrap baseline ratchets DOWN 2257 -> 2253.
Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE