fix: handle du exit code for missing paths in sandbox script (Issue #57)#58
Merged
fix: handle du exit code for missing paths in sandbox script (Issue #57)#58
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #57
Root cause: The Issue #55 fix switched Homebrew and Rust measurement to use `du -sb` instead of `df` deltas. When Homebrew installation fails (sandbox user has no NOPASSWD sudo for brew installer), `install_homebrew` returns 0 (due to `|| true`) so the success branch is taken. However `du -sb ... "$HOME/.linuxbrew"` exits with code 1 when `$HOME/.linuxbrew` doesn't exist, and `set -euo pipefail` kills the entire sandbox sub-script even though stderr is redirected with `2>/dev/null`. Fix: Before calling `du`, build an array of only the paths that actually exist, then conditionally call `du` only when at least one path exists. Applied to both Rust (`.rustup`/`.cargo`) and Homebrew (`linuxbrew` prefix paths) measurements. Also adds docs/case-studies/issue-57/ with CASE-STUDY.md, CI log, and timeline reconstruction of the regression. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit ae3733c.
Member
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
Member
Author
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
konard
added a commit
that referenced
this pull request
Feb 26, 2026
Not intended for the main codebase. Follows same pattern as PR #58. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
konard
added a commit
that referenced
this pull request
Mar 2, 2026
… releases Analysis of why v1.3.11 was never released after PR #58 merged, and why the manual workflow_dispatch created v1.3.12 instead of retrying v1.3.11. Root causes identified: 1. Transient network timeouts on GitHub-hosted runners caused the push-triggered build for v1.3.11 to fail (ghcr.io/Docker Hub connectivity issues) 2. GITHUB_TOKEN-based pushes (from apply-changesets) don't trigger new on:push workflows — so when the build fails, there is no automatic retry path 3. No release-only workflow_dispatch mode — bump-and-release always creates extra version increment Includes full CI logs for both relevant workflow runs, timeline reconstruction, root cause analysis, online research, and proposed solutions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merged
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #57 — CI/CD "Measure Disk Space and Update README" fails with exit code 1 after the Issue #55 fix.
Root Cause
The Issue #55 fix changed Homebrew and Rust measurement to use
du -sbon specific directories. When Homebrew installation fails (sandbox user cannot usesudonon-interactively),install_homebrew()returns 0 (due to|| true), so the success branch runs. But then:brew_bytes=$(du -sb /home/linuxbrew/.linuxbrew "$HOME/.linuxbrew" 2>/dev/null | awk ...)$HOME/.linuxbrewdoesn't exist →duexits with code 1 →set -euo pipefailkills the entire sandbox sub-script → CI step fails.The
2>/dev/nullsuppresses the error message but not the exit code. This is the regression.Fix
Before calling
du, build an array of only the paths that actually exist:Applied to both Homebrew and Rust
du-based measurements in the sandbox sub-script.Files Changed
scripts/measure-disk-space.sh— fixduto only measure existing pathsdocs/case-studies/issue-57/CASE-STUDY.md— full root cause analysis, timeline, reproducersdocs/case-studies/issue-57/ci-job-64665886012.txt— CI failure log preservedVerification
Local test confirms:
du -sb /nonexistent 2>/dev/null→ exit code 1 → kills scriptThis PR was created automatically by the AI issue solver