Skip to content

fix: fall back to wrappers when bun compile fails#412

Open
malikrohail wants to merge 1 commit intogarrytan:mainfrom
malikrohail:malikrohail/fix-virtiofs-browse-fallback
Open

fix: fall back to wrappers when bun compile fails#412
malikrohail wants to merge 1 commit intogarrytan:mainfrom
malikrohail:malikrohail/fix-virtiofs-browse-fallback

Conversation

@malikrohail
Copy link
Contributor

Summary

Fixes the failure mode behind #407 where bun build --compile can fail on virtiofs/devcontainer mounts but ./setup still reports success.

What changed

  • Move build orchestration into scripts/build-artifacts.sh
  • Replace the blanket || true build tail with explicit build_or_wrap handling
  • When bun build --compile fails, write executable bun run wrappers for:
    • browse/dist/browse
    • browse/dist/find-browse
    • bin/gstack-global-discover
  • Keep the normal compiled-binary path unchanged when compile succeeds
  • Add static coverage for the new build helper in test/gen-skill-docs.test.ts

Why this fixes the bug

On virtiofs mounts, Bun can fail the final rename step for compiled binaries. The old build command hid that failure behind || true, so setup could continue with stale artifacts.

This change makes the failure explicit and recovers by installing wrapper entrypoints instead of leaving stale binaries in place.

Verification

  • bun run build
  • bun run gen:skill-docs --dry-run
  • bun test test/gen-skill-docs.test.ts -t "build script validation"
  • bun test

Refs #407

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.

1 participant