Repository navigation
feat(dev): preload fixtures in disposable VM shell - #1042
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR preloads curated examples and deterministic benchmark-shaped patches into disposable VM shells while keeping installation of the current Hunk build behind
Confidence Score: 4/5The PR appears safe to merge, with one non-blocking staging robustness issue around validating example files that are not copied. The new fixture and optional-Hunk flows are internally consistent, but recursively validating entire example directories can make shell startup depend on unrelated, non-staged assets. Files Needing Attention: test/cli/install-vm/vm-shell.ts, test/cli/install-vm/vm-shell.test.ts Important Files Changed
Prompt To Fix All With AI### Issue 1
test/cli/install-vm/vm-shell.ts:132-134
**Unrelated files block staging**
`stageVmShellInput` recursively validates each selected example’s entire directory, but only copies the files listed in `VM_SHELL_EXAMPLE_FILES`. If an unselected asset such as a file under `before/` or `after/` becomes a symlink or special file, `vm:shell` will fail even though that asset would not enter the payload. Validate only the source files being copied and add coverage for directories containing unselected entries.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(dev): preload fixtures in disposabl..." | Re-trigger Greptile |
Problem
Manual Firecracker investigations repeatedly spend setup time recreating useful patches before Hunk can be exercised. The disposable shell already has a constrained host-to-guest staging path, but only uses it for the optional local Hunk build.
Approach
/root/fixtures/examplesin both VM modes./root/fixtures/benchmarks: many small files, a balanced changeset, and one large file./rootand include/root/fixtures/README.mdwith ready-to-run commands.--with-hunkresponsible only for building and installing the current Hunk binary and bundled skills. Default mode still contains no Hunk installation.Non-goals: mounting the checkout, shipping the benchmark harness or dependencies, adding arbitrary host copy paths, persisting fixture state, or changing the install-suite guests.
Validation
bun test ./test/cli/install-vm/vm-shell.test.ts ./test/cli/install-vm/contract.test.tsbwrap --dev-bind / / --tmpfs /tmp --bind /tmp/opencode/hunk-main-fixtures /mnt --chdir /mnt /home/bentlegen/.bun/bin/bun run test(all two shards passed; the mount namespace hides an unrelated host/tmp/node_modulessymlink)bun run typecheckbun run lintbun run format:checkbun run deps:checkbun run bench:changeset-parsebash -n test/cli/install-vm/vm-shell-controller.shshellcheck test/cli/install-vm/vm-shell-controller.sh/root, fixture index/example/benchmark present, Hunk absent, clean teardown.--with-hunk: fresh binary installed, checked-in example and generated many-file patch rendered successfully, clean teardown.bun run knipstill reports the pre-existing unusedresolveGitTreeRefAsyncexport atpackages/hunk-git/src/commands.ts:1093; this change introduces no new Knip findings.Release Notes
Empty Changeset: this only changes private repository developer tooling.