Skip to content

tools/lock-back.sh: do nothing under BLOOMERY_BOX_LOCAL=1 - #804

Merged
juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-lockback-boxlocal
Oct 25, 2026
Merged

juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-lockback-boxlocal

Conversation

@juliankang4

@juliankang4 juliankang4 commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

BLOOMERY_BOX_LOCAL=1 일 때 tools/lock-back.sh가 ssh를 시도하다 실패하던 문제를 고쳐, 로컬 모드에서 just check가 정상 종료되게 합니다.

What and why

tools/box.sh has a local mode: with BLOOMERY_BOX_LOCAL=1 it runs cargo in the current tree instead of on a remote box. tools/lock-back.sh, which just check calls last to bring the box's refreshed Cargo.lock back, did not know about that mode. It still tried to reach the remote host, so a local just check ended with ssh: Could not resolve hostname ws and exit code 255.

lock-back.sh now exits 0 at once when BLOOMERY_BOX_LOCAL=1. In local mode cargo ran in this tree, so there is no remote lock to bring back. It uses the same ${BLOOMERY_BOX_LOCAL:-0} test as box.sh. The remote path has no changed line.

Release notes: internal: just check no longer fails under BLOOMERY_BOX_LOCAL=1 because the lock-back step skips the remote copy it does not need.

Code shape

  • No second copy. The change reads the same BLOOMERY_BOX_LOCAL variable that box.sh reads and adds no new logic.
  • Model code holds only architecture facts. No model code is touched.
  • Dead code is gone. Nothing was made unused.
  • No silent failure. The early exit applies only in local mode. The remote path is unchanged.
  • Comments state what is true now. One comment line says why local mode exits early.
  • No relaxed gate. No band, tolerance or lint moved.
  • cargo fmt and cargo clippy are clean on what I touched. This change touches only two shell scripts and no Rust, so I did not run them.

Duplication found or removed (path:line), or "none": none.

What I ran

The tested head is 9c6519a2a4834c83f21e8c1b1a06162ea51b1eac, based on 0ccbb7b00938483bb968fba064c1c2d2d095e072. The card-tests suite already has a local-mode block (it runs only on Linux when /root/bloomery-cpu.lock is absent). I added two regression checks there: lock-back.sh succeeds in local mode, and it reaches no ssh.

  • With the old lock-back.sh restored in the tree, both new checks failed: one with "rc 1" and an empty lock, one with "ssh or rsync ran". With the fix, both pass and the suite shows no other failure.
  • Running the old script with BLOOMERY_BOX_LOCAL=1 gave ssh: Could not resolve hostname ws and exit code 255. The new script exits 0. BLOOMERY_BOX_LOCAL=1 just check printed Finished and ended with CHECK rc=0.
  • I did not find an open upstream PR that changes lock-back.sh, box.sh or check. I did not search with gh; the check was against the current upstream/main.

I did not run any just gate-* command, because the change touches no GPU path. The checks ran on an RTX 5090 host with driver 595.99.02. I have no CUDA version line saved for that run, so I do not list one.

Hardware (if the change is for a machine)

Not a machine-specific change. The checks above ran on one RTX 5090 host (driver 595.99.02).

AI help

AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.

@github-actions github-actions Bot added the tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo label Oct 25, 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: Local lock synchronization exits before side effects, and the remote path remains unchanged.

Checked

  • Duplicates: 0 new definitions. No existing lock-back local-mode test found. The two assertions cover exit status and network avoidance.
  • Complexity: no Rust functions changed; the shell change adds one early exit.
  • Silent failure: 1 default followed. Unset, empty and zero retain remote mode; local mode needs no lock copy.
  • Tests: both scripts pass bash -n. Inspection shows that deleting the guard at tools/lock-back.sh:12 reaches the SSH stub, whose empty output fails the success assertion and whose log fails the network assertion. Each invocation resets the SSH/rsync logs. The PR reports both assertions failed before the fix.
  • Gates: no existing gate, pin or case changed.
  • Escape catalog: C1–C4 do not match the added lines; the harness captures the command's exit code directly.

Notes

Dryer and crapper did not run because no Rust file changed. Validation reran syntax checks; it did not run the full card-tests suite or execute mutations. No GPU gate evidence was supplied; this change touches only tools.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@juliankang4

Copy link
Copy Markdown
Collaborator Author

The review is done and the contribution check passed, so I'm merging this.

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

Labels

tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant