Skip to content

fix(taskctl): fix adversarial worktree directory, resilient branch creation (#381, #382, #383)#404

Merged
randomm merged 2 commits intodevfrom
feature/issue-381-382-383-taskctl-worktree-fixes
Apr 8, 2026
Merged

fix(taskctl): fix adversarial worktree directory, resilient branch creation (#381, #382, #383)#404
randomm merged 2 commits intodevfrom
feature/issue-381-382-383-taskctl-worktree-fixes

Conversation

@randomm
Copy link
Copy Markdown
Owner

@randomm randomm commented Apr 8, 2026

Summary

Fixes three taskctl pipeline bugs that prevented autonomous development from working reliably.

#383 — developer-pipeline starts in main worktree instead of assigned worktree:

#382 — Pulse not detecting commits in worktrees causing adversarial never to spawn:

#381 — Make start command resilient to existing branches:

  • Root cause: git checkout -b fails if branch already exists from a previous failed run
  • Fix: Check if branch exists with git rev-parse --verify, checkout existing branch instead of creating
  • Handle remote branch already exists by setting upstream instead of failing

Fixes #381
Fixes #382
Fixes #383

randomm added 2 commits April 8, 2026 15:19
…eation (#381, #382, #383)

- Fix spawnAdversarial to use safeWorktree instead of parentSession.directory
  so adversarial sessions run in the correct worktree (fixes #383, #382)
- Make taskctl start resilient to existing branches by checking with
  git rev-parse --verify before git checkout -b (fixes #381)
- Handle remote branch already exists gracefully by setting upstream
- Add branch-resilience.test.ts for existing branch handling

Fixes #381
Fixes #382
Fixes #383
@randomm randomm merged commit cc79ef2 into dev Apr 8, 2026
1 check passed
@randomm randomm deleted the feature/issue-381-382-383-taskctl-worktree-fixes branch April 8, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant