Skip to content

fix: a dead rollout no longer fails its task; serialize worktree setup - #24

Merged
3ae3ae merged 1 commit into
mainfrom
fix/dead-rollouts
Oct 19, 2026
Merged

3ae3ae merged 1 commit into
mainfrom
fix/dead-rollouts

Conversation

@3ae3ae

@3ae3ae 3ae3ae commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Summary

CI on #23 failed intermittently on macOS / Python 3.12 in the end-to-end test:

[default] 1/2 partial  fix-add :: agg: FileNotFoundError: ... /adapt/tasks-claude-agg2/fix-add/missing/meta.json

There are two layers:

  • Masking: a rollout that dies is recorded with run dir missing, as designed. The evidence step then read that rollout's meta.json through the tasks suite, which raised. One dead rollout failed the whole mode and hid the real error. The suite now treats a rollout without meta.json as one with no deliverable, no files and no cost.
  • Cause (most likely): rollouts run in threads. One thread's git worktree prune can delete a worktree another thread is still creating; this race came in with the prune added in feat: Claude and ChatGPT subscriptions through the installed CLIs #14. Worktree prune/add/remove now run under a lock, and the agent runs themselves stay parallel.
    • Reproduction: 16-way concurrent workspace creation, 5 × 32 attempts. Without the lock it failed once; with it, never.

Test plan

  • New tests: dead-rollout reads; 16 concurrent project workspaces with no leftover worktrees
  • Core suite passes locally; ruff
  • CI

🤖 Generated with Claude Code

CI caught an intermittent failure on macOS: one rollout of a k=2 task
died, and the evidence step then read that rollout's missing
meta.json, so a single dead rollout failed the whole mode and hid the
original error. The tasks suite now reads a rollout that never wrote
meta.json as one with no deliverable, no cost and no files.

The rollout most likely died because rollouts run in threads and one
thread's `git worktree prune` can delete a worktree another thread is
still creating. Worktree prune/add/remove now run under a lock (the
agent runs themselves stay parallel). With the lock removed, 16-way
concurrent workspace creation failed once in 160 attempts; with it,
never.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@3ae3ae
3ae3ae merged commit 601b8d8 into main Oct 19, 2026
5 checks passed
@3ae3ae
3ae3ae deleted the fix/dead-rollouts branch October 19, 2026 13:50
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