Repository navigation
refactor(inference): the throughput lease, lane budgets and service-rate model live in inference/planning, not cognition - #4969
Merged
joelteply merged 2 commits intoOct 12, 2026
Conversation
…ate model live in inference/planning, not cognition Card d2aee969, step (a) of the order BigMama's review set (efe9c98d): leaves first, so the import graph only falls. throughput_lease, adaptive_throughput and service_rate import nothing from cognition (the last imports only inference::decode_knee); they are inference planning filed under cognition/, and inference reached back up for them (footprint_registry, lane, coordinator, serving_rates). They move verbatim to inference/planning/. Every caller is migrated: 13 files in cognition, inference, modules, paging, persona and resources. cognition/mod.rs drops their module declarations and glob re-exports, and resources/mod.rs's forwarding re-export of seven of their names is deleted, with its consumer (resources/broker.rs) importing from the owner. No re-export is left. Generated TypeScript paths are unchanged. Measured, crate:: references from inference/ upward, comments stripped and grouped imports expanded: cognition 29 -> 20, all upward areas 56 -> 47. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
Contributor
Author
|
Approve on the diff at 7b1cf9e (BigMama); merge on green, since CI is the compile check here. Each claim verified:
Non-blocking: the generated TS still lives under |
…he generated TypeScript matches CI on 7b1cf9e: the core tests passed (8,804), but ts-rs drift failed. The doc comment on ReclaimPolicy is ts-rs output, and I had edited it in Rust only. It also still said 'this module's' and pointed at 'cognition::* re-exports', which this PR deleted. Both are corrected, and protocol/typescript/resources/ReclaimPolicy.ts carries the same text. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
Contributor
Author
|
Re-approve at 1f0a587 (BigMama), diff and CI: 7/7 green. The delta since my approval at 7b1cf9e is 2 files (resources/lease.rs, protocol/typescript/resources/ReclaimPolicy.ts) and 0 non-comment lines changed: only ReclaimPolicy's doc and its generated TS, which fixes the ts-rs drift and drops wording that pointed at the re-exports this PR deletes. |
joelteply
deleted the
d2aee969/the-serving-plan-owner-leaves-cognition
branch
October 12, 2026 03:59
joelteply
added a commit
that referenced
this pull request
Oct 12, 2026
…ot cognition Step 5a of the crate peel (card c5cb7a04; team plan 949a834b). kv_cache_plan decides the engine's KV cache type and depends only on inference itself, config_env and the probe macro; inference reached up into cognition for it 11 times. Moved with git mv to inference/planning/kv_cache_plan.rs, beside throughput_lease (#4969). Callers updated: inference/{llama_server, lane_args, lane_process}, cognition/serving_plan/footprint, ipc/mod; doc paths in RTOS-DEBUGGER-PROBES.md. Upward edges from inference/: 55 -> 42. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
added a commit
that referenced
this pull request
Oct 13, 2026
…ot cognition Step 5a of the crate peel (card c5cb7a04; team plan 949a834b). kv_cache_plan decides the engine's KV cache type and depends only on inference itself, config_env and the probe macro; inference reached up into cognition for it 11 times. Moved with git mv to inference/planning/kv_cache_plan.rs, beside throughput_lease (#4969). Callers updated: inference/{llama_server, lane_args, lane_process}, cognition/serving_plan/footprint, ipc/mod; doc paths in RTOS-DEBUGGER-PROBES.md. Upward edges from inference/: 55 -> 42. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
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.
Card d2aee969, step (a). This PR is a verbatim move.
Why
Joel: refine and consolidate into better centralized abstractions; the architecture is why the build is slow.
The planning modules under
cognition/barely use cognition.throughput_leaseandadaptive_throughputimport nothing from it, andservice_rateimports onlyinference::decode_knee. They are inference planning filed under the wrong owner, and inference reached back up for them fromfootprint_registry,lane,coordinatorandserving_rates.The order follows BigMama's review (efe9c98d): leaves first, so every PR's import graph only goes down.
Change
cognition/{throughput_lease,adaptive_throughput,service_rate}.rsmove toinference/planning/(git renames). A newinference/planning/mod.rsdocuments the owner.cognition/mod.rsdrops the three module declarations and the two glob re-exports.resources/mod.rshad a forwardingpub use crate::cognition::{…}of seven of these names. It is deleted, and its one consumer,resources/broker.rs, imports from the owner.throughput_lease.rs's ownuse super::{ResourceClass, TargetSilicon}now namessuper::adaptive_throughput.export_topaths are unchanged, so the generated TypeScript does not move.Measured
crate::references frominference/into higher areas (comments stripped, grouped imports expanded), canary 0d4541e vs this head:Local checks:
cargo test -p source-hygiene: 28 passed.cognition::orresources::path to any moved name, checked by a scan that expands multi-line grouped imports andsuper::uses.Next on the card
Merging this closes card d2aee969, so the remaining steps move to a successor card at merge.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE