Skip to content

Guard worktree cleanup from parent repos and start macOS bash as login - #2025

Merged
currentbits merged 1 commit into
mainfrom
coder/deferred-worktree-terminal-fixes
Nov 14, 2026
Merged

currentbits merged 1 commit into
mainfrom
coder/deferred-worktree-terminal-fixes

Conversation

@currentbits

Copy link
Copy Markdown
Owner

When an orphan folder sits below another Git checkout, Git discovers the parent repository. Boot recovery could then switch its branch and commit the parent's uncommitted files. GC now requires an empty checkout prefix before recovering or scanning a candidate, and keeps ancestor-backed folders blocked.

Also recognize Git's newer gitfile does not point to a valid repository diagnostic under the existing corrupt-worktree cleanup policy, and launch macOS bash terminals with -l so .bash_profile loads in both PTY and pipe sessions.

Validation: 229 worktree/terminal tests pass with inherited CODER_* variables removed and provider CLIs excluded from PATH; typecheck and IPC sync pass. Regression coverage includes preserving parent HEAD/branch/files, both cleanup entry points for broken gitfiles, launch arguments across platforms, and a real macOS .bash_profile.

Part of #2018; the remaining deferred items stay open.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T13:08:49.829094Z 93ec876 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@currentbits
currentbits merged commit f573c9d into main Nov 14, 2026
23 of 24 checks passed
@currentbits
currentbits deleted the coder/deferred-worktree-terminal-fixes branch November 14, 2026 13:39
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.

1 participant