Repository navigation
placement: a unified card refusal names the host room - #944
Conversation
There was a problem hiding this comment.
Verdict: CLEAN: the flag reaches the one error site on every planner path, the node index is in range, and the refusal text changes only for a unified device.
Non-blocking
⚠ The tier branch has no test: planner.rs:302. The new test covers a stage card only. Mutant: change the tier index to 0 always, or to t. No assertion turns red, and a tier on another node with its own pool would get the wrong wording. Direction: add a case with tiers: vec![..], two nodes, nodes[1].unified = Some(..) and nodes[0].unified = None, and assert the host-room text for the tier's refusal.
Checked
- Duplicates: 1 new field (
unified), 0 new functions. Grep for anotherCardFreeFloorconstructor or a second "free the card" text: none.workstation.rs:1275words a different refusal (HostShort), not the same text. dryer: 0 pairs. - Complexity:
CardFreeFloor::fmt1 → 9 is two wording branches in oneDisplay, even growth, harmless.plan_rule40 → 41 is one field in a struct literal. - Silent failure: 3 sites followed.
nodes[t + 1]is in range becauseplan_rulereturnsPlacementError::Nodesunlessnodes == 1ornodes == 1 + tiers(planner.rs:231).unifiedonly picks wording. The error and itsfreeandfloorvalues are unchanged.ctx_ask.rs:166reads onlyfloorandfree. - Tests: the stage-card unified case turns red if the flag is dropped to
falseor the two texts are swapped. The tier case is open (see above). - Gates: no pin moved. Hot path: none (refusal text only). Escape catalog: no match. Ledger: no lessons in force.
Notes
- No GPU evidence in the PR body. The change touches only refusal text, so none is needed.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
|
The review is done and the contribution check passed, so I'm merging this. |
통합 메모리 장치의 카드 여유 공간 거절문이 호스트 room과 BLOOMERY_HOST_ROOM 설정을 설명하고 그에 맞는 조치를 안내하도록 고치는 수정입니다.
What and why
On a device that shares the host's memory, the free bytes the planner checks are the host room. When a plan was refused because the dense trunk did not fit, the message said "the device had N B free" and advised "free the card". A user who had set
BLOOMERY_HOST_ROOMwas told to free a card that was never the limit.The refusal for a unified device now says "the device's host room is N B" and names where that number comes from:
BLOOMERY_HOST_ROOMwhen set, otherwise the host's memory reading. Its advice reads "raise or unsetBLOOMERY_HOST_ROOMif set, or free host memory, or plan a placement on a card with room". A discrete GPU keeps the old text. The floor arithmetic, the budgets and the planner's choices are unchanged.The planner now hands
CardFreeFlooraunifiedflag taken from the node the card belongs to (the local stage, the local tier, or a tier on another node), andDisplayforCardFreeFloorpicks the wording from it.Release notes: Fixed: a card refusal on a unified-memory device names the host room and
BLOOMERY_HOST_ROOMand advises raising or unsetting the lever or freeing host memory.Code shape
CardFreeFloor'sDisplay.CardFreeFloorerror.cargo fmt --all -- --checkis clean.Duplication found or removed (
path:line): none.What I ran
Tested head
8366d3cf78f366ca1ddfa98ab8ed1b32c32c22beon upstream mainfdc0ccad2f7d45b59f1f7b017f34df2660db6240, on a CPU-only Linux machine:cargo fmt --all -- --check cargo test -p bloomery-placement --lib placement::tests::legs::a_trunk_past_the_free_bytes_is_refused_by_name -- --exact --nocapturetest result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 217 filtered out; finished in 0.00s.The test checks the discrete GPU text (no
BLOOMERY_HOST_ROOM) and a unified device with the same shortfall (host room wording, the lever and the new advice, and no "free the card").AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.