fix: unblock beta conflict recovery#19068
Conversation
Regenerate bun.lock with bun install when dependency conflicts appear, and let the resolver repair typecheck errors in related packages/opencode files. This keeps beta merges focused on restoring a valid merged state instead of hand-merging lockfiles.
There was a problem hiding this comment.
Pull request overview
Updates the beta-merge automation script to avoid manual bun.lock conflict resolution during beta conflict recovery, and to allow narrowly-scoped follow-up edits when bun typecheck reports issues after a merge.
Changes:
- Adds an
install()step that deletesbun.lock, runsbun install, and stages the regenerated lockfile whenbun.lockis part of the conflict set. - Adjusts the opencode resolver prompt to (a) avoid hand-merging
bun.lockand (b) permit limited additional edits to fixpackages/opencodetypecheck failures surfaced post-merge.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| async function install() { | ||
| console.log(" Regenerating bun.lock...") | ||
|
|
||
| try { | ||
| await fs.rm("bun.lock", { force: true }) | ||
| await $`bun install` | ||
| await $`git add bun.lock` |
There was a problem hiding this comment.
install() runs fs.rm("bun.lock") and bun install relative to the current working directory. If this script is executed from a subdirectory (e.g. packages/opencode), it will regenerate/stage the wrong lockfile (or none) and may run bun install against the wrong package.json. Consider resolving the repo root (e.g. via git rev-parse --show-toplevel) and running both the rm and bun install with an explicit .cwd(repoRoot) / absolute path to bun.lock.
Summary
bun.lockwithbun installinstead of hand-merging it during beta conflict recoverypackages/opencodefiles surfaced bybun typecheck, while keeping those edits narrowly scoped to the current merged state