Repository navigation
tools/box.sh: check the cargo-oxide pin against the executable Cargo runs - #560
Conversation
There was a problem hiding this comment.
Verdict: CLEAN: No must-fix findings remain after validation.
Checked
Duplicates: no new named functions/types/constants; compared the root-aware fixture and existing cargo stubs. No duplicate owner found.
Complexity: no Rust functions changed; no crapper candidates.
Silent failure: executable lookup, symlink resolution and install-list failure paths at tools/box.sh:1172 stop with named errors and exit 70.
Tests: both changed scripts pass bash -n. Static mutation review confirms the split-root fixture rejects dropping --root, and the failed-list fixture rejects accepting pinned output from a failed command. Fixtures also cover selection precedence, symlinks, non-executable entries, missing executables and revision mismatch.
Gates: revision pin and refusal code remain unchanged; replaced fixtures have a dated reason.
Escape catalog: no C1–C4 defects matched in the changed code. Listing status is checked before parsing; the new heredoc is quoted.
Notes
Dryer and crapper did not run because no Rust file changed. The full card suite and box.sh self-test were not rerun during validation.
🔨 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. |
box.sh의 cargo-oxide 핀 대조가 PATH의 cargo-oxide와 다른 설치 루트를 읽어 컨테이너에서 멈추던 문제를 고칩니다.
What and why
tools/box.shcompares the installedcargo-oxidewith the rev pinned inCargo.tomland stops when they differ. It read the installed rev withcargo install --list, which lists only the first install root. A dev container that setsCARGO_INSTALL_ROOTto a root holding onlyjust, whilecargo-oxidesits in the default cargo root, therefore had nocargo-oxideline, and the check refused a correct install. NoBLOOMERY_BOX_LOCAL=1 just gate-*recipe could run in that container.The check now selects the
cargo-oxidethat Cargo would run:CARGO_HOME/bin(default$HOME/.cargo/bin) first, thenPATH. It resolves symlinks, reads the install list with--rootset to the root of the real executable, and compares that rev with the pin. The error names the root it read. A different rev still stops with the same error and exit code. The check also exits 70 when nocargo-oxideexecutable can be found or whencargo install --listitself fails, so a failed listing that still prints the pinned record no longer passes.Release notes: internal. The check read the wrong install root in containers that set
CARGO_INSTALL_ROOT.Code shape
tools/box.sh.cargo fmtandcargo clippyare not affected: onlytools/box.shchanges, and no Rust file.Duplication found or removed (
path:line): noneWhat I ran
Two runs back the change. The GPU run used the earlier head
0015d9b4. The card stub tests ran on commit1a1fe823, which has the same tree as the current headc72c295d.On a DGX Spark (GB10), head
0015d9b4, inside the CUDA 13.3.1 dev container withCARGO_INSTALL_ROOTset to the root that holds onlyjust, withBLOOMERY_BOX_LOCAL=1:The tree with the wrong rev still stops with rc 70 (WRONGPIN_RC=70). The correct pin passes with rc 0 (RIGHTPIN_RC=0), and
just gate-gpu-linearends with rc 0 (GATE_RC=0). I did not rerun the GPU gate on the current head.On a CPU-only Linux host (no GPU card), commit
1a1fe823,bash tools/ref/card-tests/run.shcovers split install roots, Cargo home precedence, symlink resolution, rev-mismatch refusal, a missing executable and a failing install list, each with exit code 70 where refused:The two newest cases fail on the previous check. With the failing install list the command ran with exit 0 and no refusal:
With no executable, the check read the wrong root and reported
from rev none:I did not run the
tools/box.shself-test.Hardware (if the change is for a machine)
The GPU run used a DGX Spark (GB10) in the CUDA 13.3.1 dev container. The card stub tests need no GPU. The change only picks which install root
tools/box.shreads.What I ran into
Nothing here blocks this PR.
just gate-gpu-gemmpasses the pin check and builds on this machine, then stops withio error: No such file or directory, becausegate_gemmreads model files that are not on it. I ranjust gate-gpu-linearinstead, which needs none.AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.