Skip to content

Size Agent disk images explicitly before hdiutil creation - #1081

Merged
AnthonyRonning merged 1 commit into
masterfrom
codex/agent-dev-prod-packaging
Oct 6, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
codex/agent-dev-prod-packaging

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Two of the last four master runs of Maple Agent Desktop Builds each lost one signed macOS package at the final DMG step:

hdiutil: create failed - No space left on device
  • Run 15: Dev failed, Prod passed.
  • Run 17: Prod failed, Dev passed. This is the current master head, so it has no Prod macOS package.

In both cases signing, notarization and stapling had already succeeded. Because verify-macos needs the whole matrix, neither run verified its successful package after download.

macos-release-app.sh let hdiutil estimate the -srcfolder image size, and that estimate can come up short. The other profile passed on an identical runner with nearly the same content, and the preceding ~100 MB ditto copy succeeded. That points at the estimate rather than a full runner disk. The logs don't record free space, though, so a full disk isn't ruled out.

Change

  • Measure the image folder's logical size without following the /Applications symlink, add 20% plus 64 MB, and pass it to hdiutil as an explicit -fs HFS+ -size. create-dmg and Tauri, which Research's DMGs use, do the same.
  • If creation still fails, print the computed sizes and df -h for the output and temp volumes, then exit through the existing cleanup trap. df is called by its absolute path, /bin/df, matching the no-PATH-lookup rule from Fix Gatekeeper tool paths in Agent packaging #1078.

Validation

  • New fixture tests check that both signed and unsigned packaging pass an explicit HFS+ size above the payload. On failure they check the free-space report, keychain deletion, search-list restore and staging cleanup.
  • Both new tests fail against the current master script.
  • Run locally: all 28 packaging fixtures pass (one macOS-only test skipped), plus the build-info, smoke, AppImage and dylib suites. test_agent_workflows.py and test_signing_workflows.py also pass, and shellcheck reports only the existing SC2163 warning.
  • CI coverage on this PR:
    • The two unsigned macOS packaging jobs run the real hdiutil create -fs HFS+ -size … command on hosted macOS 26 runners.
    • repository-checks, which runs the flake check and these Python fixtures, is path-filtered to workflow, CI-script and flake changes, so it won't run here. The local runs above are the fixture evidence.
  • Not verifiable before merge: the signed path on master, where the intermittent failure happened. The next master run is the proof. If it fails again, the log will show whether the disk was actually full.

Possible follow-ups, not in this PR:

  • Packaging and verify jobs currently install the full Rust dev shell even though they only need Python and Apple's tools. A slimmer shell would save several GB of disk and about a minute per job.
  • repository-checks could also trigger on apps/maple-agent/scripts/**, so these packaging fixtures run in CI when they change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MKzcTgkhQizMC3VRwJDb4q

Two master runs each lost one signed macOS package at the final DMG step
with "hdiutil: create failed - No space left on device", after signing,
notarization and stapling had succeeded; the other profile on an identical
runner passed. hdiutil was left to estimate the -srcfolder image size.

Compute the payload size, add 20% plus 64 MB of headroom, and pass an
explicit HFS+ size, as create-dmg and Tauri do. If creation still fails,
print the sizes and free space so the next failure identifies a full disk.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MKzcTgkhQizMC3VRwJDb4q
@AnthonyRonning
AnthonyRonning merged commit c61712a into master Oct 6, 2026
36 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex/agent-dev-prod-packaging branch October 6, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants