Skip to content

placement: split placement.rs into seven concern modules - #896

Merged
midagedev merged 1 commit into
mainfrom
placement-split
Oct 28, 2026
Merged

midagedev merged 1 commit into
mainfrom
placement-split

Conversation

@midagedev

Copy link
Copy Markdown
Owner

A move with no behaviour change. crates/placement/src/placement.rs was 8,473 lines. It is now an 88-line module root plus seven modules: machine, table, refusal, rule, planner, room, pool. The tests moved to placement/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.
  • Box: bloomery-placement's 207 tests pass.
  • Lead check: the old file's code lines and the new files' lines are the same multiset, apart from the 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

…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]>
@github-actions github-actions Bot added the placement Placement planning: crates/placement label Oct 28, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.rs into seven modules and a tests/ 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/type lines are removed and 263 are added. #[test] is 52 removed and 52 added. #[allow], #[ignore] and unwrap_or/.ok()/let _ = sites also match in count (22 each for the last group). No silent-failure site is new.
  • Constants: every removed const or static value (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_ROUNDS only gains pub(super).
  • Visibility: the new pub(super) items reach only placement and 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_device and Card::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_rule 40, expert_nvme_tier 24, totals 23, 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-scan identical 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-smi line, so gpu.json records no card evidence. This is a move, and narrow-scan identity 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)

@midagedev
midagedev merged commit a3fc4d6 into main Oct 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

placement Placement planning: crates/placement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant