Repository navigation
Fix completion blocked by idle workspace holders - #679
Merged
Merged
Conversation
Separate explicit interactive completion from workspace deletion so an idle terminal or daemon does not force users out of their checkout. Require default-No confirmation that editing has stopped and preserve every managed clone/worktree. Hold lifecycle locks throughout completion, keep lock and inspection failures non-overridable, and retain strict checks before deletion. Keep automatic, JSON, and --yes behavior conservative and make diagnostics backend-neutral. Validate with 419 focused tests under CI=true and package-wide mypy. 🤖 Generated with [OpenCode (GPT-6.1 Sol)](https://opencode.ai) Co-Authored-By: OpenCode <noreply@opencode.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
--yesmodes fail-closed for unresolved directory holders. Deletion still checks actual directory use.No processes are killed, services stopped, backend locations evicted, or security settings changed.
Related issue (if applicable)
N/A — follow-up to the reported
daf completerefusals, separate from the already merged worktree branch-selection change in #678.Type of change
Security impact
The lifecycle guard protects against completing or deleting workspaces while agents are editing them. This change distinguishes a held launch lock from a working-directory holder; it does not infer inactivity from process names, ancestry, paused tracking, or native session IDs. With all lifecycle locks acquired, only explicit interactive confirmation that editing has stopped permits completion with directory holders present. All workspaces are then preserved. Enter declines;
--yes, JSON, and non-interactive execution cannot supply that approval. Lock contention and inspection failures still refuse before session mutations. Actual cleanup retains its strict process-use checks, including sibling directories and late-arriving holders.Testing
Steps to test
--yesmode, and verify unresolved holders still refuse without metadata changes.Scenarios tested
--yesrefusals remain conservative.Commands run
The full test matrix and integration suite are left to CI.
Checklist
CHANGELOG.mdis updated for notable changes, or no update is needed.Deployment considerations
No configuration migration or new CLI flag is required. Automatic completion remains conservative; the new preservation approval is interactive only.
🤖 Generated with OpenCode (GPT-6.1 Sol)
Assisted-by: OpenCode