Skip to content

fix(installer): skip re-download when release binary is already cached#36

Merged
DonPrus merged 3 commits intonullclaw:mainfrom
vernonstinebaker:fix/cache-release-binary-v2
May 5, 2026
Merged

fix(installer): skip re-download when release binary is already cached#36
DonPrus merged 3 commits intonullclaw:mainfrom
vernonstinebaker:fix/cache-release-binary-v2

Conversation

@vernonstinebaker
Copy link
Copy Markdown
Contributor

Summary

  • downloader.download() was called unconditionally on every install, even when the binary was already present in ~/.nullhub/bin/
  • This forced every reinstall (e.g. reconfiguring provider credentials on an existing instance) to pay the full network round-trip cost for a binary that hadn't changed
  • Add the same existence check that stageLocalBinary already uses: attempt to open the target path; if it succeeds, the binary is cached and the download is skipped entirely

Validation

  • zig build test -Dbuild-ui=false --summary all — all tests pass, 0 leaks
  • zig fmt --check src/ — clean
  • Manual test: installed nullclaw once (binary downloaded), then reinstalled — second install skipped the download and completed immediately

Notes

  • The fix is intentionally minimal and mirrors the existing pattern in stageLocalBinary (src/installer/orchestrator.zig:754)
  • A forced re-download (e.g. for a corrupted binary) can still be triggered by deleting the file from ~/.nullhub/bin/ manually; a --force flag could be added later if needed

vernonstinebaker and others added 3 commits May 4, 2026 22:40
downloader.download() was called unconditionally on every install, even
when the binary was already present in ~/.nullhub/bin/. This made every
reinstall (e.g. updating provider config on an existing instance) pay
the full network round-trip cost.

Add the same existence check that stageLocalBinary already uses: open
the target path; if it succeeds the binary is cached and the download
is skipped entirely.
@DonPrus DonPrus merged commit ebeed76 into nullclaw:main May 5, 2026
3 checks passed
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