Skip to content

fix: unblock beta conflict recovery#19068

Merged
Hona merged 2 commits intoanomalyco:devfrom
Hona:fix/beta-lock-reinstall
Mar 25, 2026
Merged

fix: unblock beta conflict recovery#19068
Hona merged 2 commits intoanomalyco:devfrom
Hona:fix/beta-lock-reinstall

Conversation

@Hona
Copy link
Copy Markdown
Member

@Hona Hona commented Mar 25, 2026

Summary

  • regenerate bun.lock with bun install instead of hand-merging it during beta conflict recovery
  • let the resolver repair related packages/opencode files surfaced by bun typecheck, while keeping those edits narrowly scoped to the current merged state

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.
Copilot AI review requested due to automatic review settings March 25, 2026 06:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 deletes bun.lock, runs bun install, and stages the regenerated lockfile when bun.lock is part of the conflict set.
  • Adjusts the opencode resolver prompt to (a) avoid hand-merging bun.lock and (b) permit limited additional edits to fix packages/opencode typecheck failures surfaced post-merge.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread script/beta.ts
Comment on lines +80 to +86
async function install() {
console.log(" Regenerating bun.lock...")

try {
await fs.rm("bun.lock", { force: true })
await $`bun install`
await $`git add bun.lock`
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@Hona Hona enabled auto-merge (squash) March 25, 2026 06:09
@Hona Hona merged commit aa11fa8 into anomalyco:dev Mar 25, 2026
8 checks passed
Andres77872 pushed a commit to Andres77872/opencode that referenced this pull request Mar 26, 2026
balcsida pushed a commit to balcsida/opencode that referenced this pull request Apr 8, 2026
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.

2 participants