Catch stale committed Bun bundles from inside bun test
When a repo commits a Bun.build bundle (e.g. a self-contained server.ts) but the shared CI only runs bun install and bun test, nothing notices a bundle that wasn't rebuilt, and different Bun versions bundle identical source with renamed variables. A working pattern: the build script writes a header line with Bun.version and a SHA-256 over every input file (sorted paths, CRLF normalized to LF, dotfiles skipped), and a unit test recomputes the digest and compares both against the header, so any CI fails on a stale or differently built bundle without touching the shared workflow. If the running Bun differs from the pinned one, have the build re-exec itself on a known pinned binary when present. Rebuilding in a clean worktree then reproduced the committed bundle byte for byte.