Skip to content

tools: resolve bind-mounted model drives through the shared reader - #604

Merged
juliankang4 merged 1 commit into
midagedev:mainfrom
Burntgogi:fix/issue524-drive-device
Oct 21, 2026
Merged

juliankang4 merged 1 commit into
midagedev:mainfrom
Burntgogi:fix/issue524-drive-device

Conversation

@Burntgogi

Copy link
Copy Markdown
Contributor

Addresses the container drive-device item of #524; does not close the issue's separate class-target item.

Fix

  • One drive_source owner uses findmnt --nofsroot; drive_dev resolves PKNAME, then KNAME for a whole-disk alias, then retains the existing basename/counter guard.
  • engram-rate uses the shared drive reader instead of duplicating discovery; nvtier's witness mount-source lookup uses the same source owner. The existing depth/nvtier drive_dev callers inherit the fix.
  • Missing mount/counters remains a named exit 2, before timing. The Spark container documentation states the required readable /sys/block/<disk>/stat.

Verification

  • FAIL-first existing card harness reproduced /sys/block/models]/stat for /dev/testp1[/models] and the missing-KNAME alias failure.
  • After the fix LC_ALL=C bash tools/check-recipes.sh --block cardtests: 874 tests, 0 failed. The five new cases cover bind roots, whole-disk aliases, canonical fallback, unreadable counters and unreadable mounts, without requiring Linux /sys or a real disk.
  • check-recipes.sh --block fnowner: 191 scripts, 9 fixtures, passed.
  • check-recipes.sh --block recipescheck: 149 gate rows held to derivation, passed.
  • nvtier-read.sh --self-test: 7 checks, 0 failures; --parse-only --rounds 1 passed; bash -n on all changed shell scripts passed.
  • Real, untimed workstation smoke: drive_source Cargo.toml → /dev/nvme0n1p2, drive_dev Cargo.toml → nvme0n1, drive_sectors → numeric kernel counter. This host's mount is not the reporter's DGX bind mount; the bind behavior is the deterministic FAIL-first regression. No DGX/NVIDIA timed arm or throughput result is claimed.

@github-actions github-actions Bot added dgx-spark The DGX Spark (aarch64, GB10) port documentation Improvements or additions to documentation tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo labels Oct 21, 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: The shared reader resolves bind-root sources and whole-disk aliases while preserving named refusals before timing.

Checked

Duplicates: 5 new functions checked, including test stubs; no duplicate owners found. Mount-source discovery has one production owner.

Complexity: no Rust functions changed. The production change adds a source resolver and one guarded device fallback.

Silent failure: both suppressed lsblk results lead to the readable-counter guard. Mount and counter failures reach caller exit 2.

Tests: all 5 isolated drive cases and syntax checks on all 4 changed shell files passed. Removing --nofsroot or the mount diagnostic at drive-read.sh:11, KNAME at drive-read.sh:21, basename at drive-read.sh:22, or the counter guard at drive-read.sh:23 made a corresponding assertion fail. Successful but empty PKNAME output and a spaced target argument also passed.

Gates: no thresholds moved or existing cases removed. The PR reports FAIL-first reproduction for bind roots and aliases.

Escape catalog: no C1–C4 defects confirmed. The three runners share discovery, and named diagnostics expose refusal paths.

Notes

The full card harness and real hardware were not run during validation.

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

@juliankang4
juliankang4 merged commit c705a31 into midagedev:main Oct 21, 2026
6 checks passed
@juliankang4

Copy link
Copy Markdown
Collaborator

@Burntgogi Thanks for the contribution. The review is done, so I'm merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dgx-spark The DGX Spark (aarch64, GB10) port documentation Improvements or additions to documentation tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants