fix(packaging): avoid mandatory Bun in prebuilt installs - #908
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Greptile SummaryThis PR removes Bun from staged prebuilt runtime dependencies and adds packaging guards plus an opt-in Firecracker compatibility harness.
Confidence Score: 4/5The release validation should be fixed before merging because it can accept a stale or partial Firecracker result as evidence that the full current suite passed. The packaging change itself is guarded, but the newly documented release gate selects results by mtime and checks only a nonempty passing subset, so it does not enforce the stated full-suite, reviewed-tip requirement. Files Needing Attention: skills/hunk-release/SKILL.md, test/cli/install-vm/runner.ts, test/cli/install-vm/results.ts Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
Source[Source checkout] --> Build[Build prebuilt packages]
Build --> Stage[Stage meta and platform packages]
Stage --> Fixtures[Prepare synthetic registry fixtures]
Fixtures --> Controller[Controller container]
Controller --> VM[Fresh Firecracker guest]
VM --> Scenarios[Install compatibility scenarios]
Scenarios --> Results[result.json and JUnit]
Results --> ReleaseGate[Manual release validation]
Prompt To Fix All With AI### Issue 1
skills/hunk-release/SKILL.md:85-87
**Release gate accepts stale results**
When a selected scenario passes, or the current full-suite run fails before writing `result.json`, this command accepts a nonempty subset or selects an older passing result by mtime, allowing release validation to succeed without a complete passing run from the reviewed release tip.
### Issue 2
test/cli/install-vm/runner.ts:198-204
**Harness bypasses environment conventions**
The new harness reads `process.env` directly here and in fixture preparation, while several new fixture and lock helpers lack the required short TSDoc descriptions, bypassing the repository's environment-access and function-documentation conventions.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "fix(packaging): avoid mandatory Bun in p..." | Re-trigger Greptile |
Summary
bundependency into staged prebuilthunkdiffpackagesProblem
hunkdiff@0.20.1installs Bun as a mandatory dependency even though its platform packages already contain standalone executables. Bun's postinstall can move its platform executable out of pnpm 11's shared global virtual-store projection. A later global update then encounters the missing@oven/bun-*executable, as reported in #866.The mandatory dependency came from the prebuilt staging script copying the root development dependency set into the published meta-package.
Approach
Prebuilt staging now filters only
bunfrom runtime dependencies. The source checkout keeps Bun for development and compilation, while published installations continue to selecthunkdiff-<platform>without requiring users to install Bun separately. Pack and smoke checks fail if mandatory Bun or@oven/bun-*packages return.The new
test/cli/install-vm/harness is entirely opt-in. It lazily prepares checksum-pinned Firecracker assets, publishes synthetic Hunk versions through a local Verdaccio registry, and runs fourteen scenarios in fresh sparse/reflinked Linux x64 guests. It emits JSON, JUnit, command logs, assertions, and observations while excluding writable disks, keys, sockets, credentials, and cache identities from uploaded results.The workflow is manual-only because it runs privilege-bearing KVM infrastructure. Normal checkout, dependency installation, tests, typechecking, builds, and packing do not download VM assets or require Docker/KVM.
Closes #866.
Validation
bun install --frozen-lockfilebun test ./test/cli/install-vm ./scripts/prebuilt-package-helpers.test.ts— 35 passedbun run test— all 2 shards passed, 7 skipped, 0 failedbun run typecheckbun run lintoxfmt --checkbash -nandshellcheck -xacross all install-VM shell scriptsbun run deps:checkbun run check:packbun run check:docsbun run build:prebuilt:npmbun run check:prebuilt-packbun run smoke:prebuilt-installbun run test:install-vm— 14 passed, 0 failed, 0 skipped on Linux x64 with KVM; explicit result validated against the full manifest and checkout identityCoverage boundaries
Firecracker validates Linux x64 behavior only. It reproduces the shared pnpm projection mutation and Linux recovery, but not the reporter's final native macOS ARM64 command failure. Native macOS and Windows release jobs remain separate. Verdaccio may proxy uncached transitive dependencies, and the historical oracle intentionally uses pinned packages from the live npm registry.
This PR description was generated by Pi using gpt-5.6-sol