Skip to content

Reuse compatible managed worktree handles - #984

Merged
chubes4 merged 1 commit into
mainfrom
feat/982-idempotent-worktree-reuse
Jul 29, 2026
Merged

Reuse compatible managed worktree handles#984
chubes4 merged 1 commit into
mainfrom
feat/982-idempotent-worktree-reuse

Conversation

@chubes4

@chubes4 chubes4 commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

  • make exact compatible worktree add requests idempotent
  • reuse only matching branch, base, task, context, and bootstrap contracts
  • require clean, pushed, non-live existing worktrees
  • return typed reuse and refusal evidence
  • preserve existing lifecycle and task metadata
  • leave broad task-equivalence and terminal recycling for follow-up work

Testing

  • php tests/worktree-add-lifecycle.php
  • php tests/worktree-add-tool-tracker-contract.php
  • PHP syntax checks
  • git diff --check origin/main...HEAD

Part of #982.

AI assistance

OpenAI GPT-5.6 Sol using OpenCode drafted the implementation and focused tests through a general coding subagent. The resulting diff was rebased and independently re-run against the targeted tests before publication. Chris Huber remains responsible for the change.

@chubes4
chubes4 merged commit 6224688 into main Jul 29, 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.

1 participant