Skip to content

fix(core): remove missing Git worktrees from inventory - #58038

Draft
xiaoheiai4719-collab wants to merge 3 commits into
anomalyco:devfrom
xiaoheiai4719-collab:remove-missing-worktree
Draft

xiaoheiai4719-collab wants to merge 3 commits into
anomalyco:devfrom
xiaoheiai4719-collab:remove-missing-worktree

Conversation

@xiaoheiai4719-collab

Copy link
Copy Markdown

Issue for this PR

Closes #57987

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Forget a saved built-in Git worktree when its directory was removed externally, and emit Updated. The active strategy must explicitly permit forgetting, so custom strategies, including an override named git, retain their existing error behavior. Files, dangling links and access errors are not treated as missing directories.

How did you verify your code works?

Linux, pinned Bun 1.4.2, CI=true and RECORD=false. Both real Git regressions fail on unchanged code. The focused suite passes 44/44; ten repetitions pass 440/440 both alone and under full-suite load. From packages/core: bun run script/test.ts test/worktree.test.ts --rerun-each 10.

Complete root lint passes with 0 errors and 1,232 repository warnings. All 34 typecheck tasks pass, run serially with no cached tasks.

Full core tests: 6,714 passed, 39 skipped, 10 failed. A clean baseline reproduces the same ten failures: patch permissions, VCS initialization, six daemon socket cases, and two configuration-discovery cases (124 passed / 10 failed across those four files). The full suite is not green. Windows was not run.

AI-assisted implementation and command execution; the publication owner has not personally rerun these checks.

Screenshots / recordings

No UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

This branch has not been deployed

No deployments
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.

Can't delete a workspace whose folder was removed outside OpenCode (DELETE /api/worktree → 400)

1 participant