Repository navigation
placement: split placement.rs into seven concern modules - #896
Merged
Merged
Conversation
…directory
A move. The 8,473-line file is now a module root of 88 lines. Its body is in
machine, table, refusal, rule, planner, room and pool, and its tests are in
tests/{early,bounds,legs}. Every public path is re-exported from the root, so
callers do not change.
Proof: narrow-scan --worktree against the base is identical on all four
scanned bins (--no-jit). remote-static is green. The box ran
bloomery-placement's 207 tests, and all passed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
There was a problem hiding this comment.
Verdict: CLEAN: a move-class split with no changed constant, gate, attribute or public path that I could find.
Checked
- Class: move PR (split
placement.rsinto seven modules and atests/tree). Reviewed for correctness only, as the contract asks for moves. I read the diff with Grep counts, not hunk by hunk. - Moved items: 263
fn/struct/enum/trait/typelines are removed and 263 are added.#[test]is 52 removed and 52 added.#[allow],#[ignore]andunwrap_or/.ok()/let _ =sites also match in count (22 each for the last group). No silent-failure site is new. - Constants: every removed
constorstaticvalue (HEAD_TENSOR,SMALL_ALIGN,ARENA_ALIGN,STEP_PORT_COLUMNS,ARENA_LANE_SLOTS,UNION_BATCH_IDS,POOL_ROUNDS, the test constants) is re-added with the same value.POOL_ROUNDSonly gainspub(super). - Visibility: the new
pub(super)items reach onlyplacementand its children, as private items did before. The root re-exports at placement.rs:58-85 keep the public paths. - Gates:
PIN(...)comment lines are moved, not edited (one is re-indented). No gate, band or lint level moved. No test was removed. - Duplicates:
Card::same_device~CardSpec::same_deviceandCard::reserve_bytes~Host::reserve_bytes(machine.rs:219/228/376, workstation.rs:80) exist in the base file or its sibling. The move creates no new copy, so they are not findings. - Complexity: crapper lists eight "new" functions (
plan_rule40,expert_nvme_tier24,totals23, and others). They are moved bodies, not growth. - Mutation check: no test changed, so there is no new test to mutate.
- Performance: no code body changed. The PR body claims
narrow-scanidentical on four bins. I could not run it. - Escape catalog: no pattern matched (no shell, tool or script change).
Notes
- The PR body has no
nvidia-smiline, sogpu.jsonrecords no card evidence. This is a move, andnarrow-scanidentity is the right proof for the class.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
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.
A move with no behaviour change.
crates/placement/src/placement.rswas 8,473 lines. It is now an 88-line module root plus seven modules: machine, table, refusal, rule, planner, room, pool. The tests moved toplacement/tests/{early,bounds,legs}.rs. Every public path is re-exported from the root, so no caller changes.Proof (move class):
tools/narrow-scan.sh <base> --worktree: identical on all four scanned bins (bloomery-serve, gate_gpu_device, gate_kquant, gate_swap;--no-jit).just remote-static origin/main: ok.pub(super)visibility and rustfmt rewrapping.Gate reach does not drop (221 gates per code file). Reach follows the crate dependency, not the module. The split is for reading and review.
🤖 Generated with Claude Code