Two runs of one repo on one host: lift the per-repo workdir lock (per-run worktrees) so a same-repo burst can use every free slot #386

Open
opened 2026-11-20 20:04:56 +00:00 by ben · 0 comments
Owner

Follow-up to #384. The allocator now refuses to send a host a second pick of a repo it already runs, which stops the wasted dispatches but leaves the capacity unused: when the ready set is concentrated in one repo, the fleet works at most one ticket per host (3 of 6 heavy slots on 2026-11-20, for over an hour).

The constraint is swarm.yml's per-repo workdir lock (/tmp/matou-workdir-<slug>.lock, idss #638 / #347), held from checkout through the land stage because two runs sharing one checkout raced each other's git reset and one pushed a sibling's commit to main.

Design question: give each run its own worktree (or clone) of the repo so two runs of one repo can share a host, keeping only the LAND step serialised per repo per host. Needs to cover: the shared pnpm store / build caches, disk cost per extra worktree, the session-runner's dedicated checkout (already separate), the landing serialisation, and removing the #384 allocator rule (fleet_dispatch_held_repos) in the same change — GOTCHAS #384 says they must move together.

Design work, not a mechanical edit — needs a human ruling before a build. Filed by an interactive session at Ben's request.

Follow-up to #384. The allocator now refuses to send a host a second pick of a repo it already runs, which stops the wasted dispatches but leaves the capacity unused: when the ready set is concentrated in one repo, the fleet works at most one ticket per host (3 of 6 heavy slots on 2026-11-20, for over an hour). The constraint is `swarm.yml`'s per-repo workdir lock (`/tmp/matou-workdir-<slug>.lock`, idss #638 / #347), held from checkout through the land stage because two runs sharing one checkout raced each other's `git reset` and one pushed a sibling's commit to `main`. **Design question:** give each run its own worktree (or clone) of the repo so two runs of one repo can share a host, keeping only the LAND step serialised per repo per host. Needs to cover: the shared pnpm store / build caches, disk cost per extra worktree, the session-runner's dedicated checkout (already separate), the landing serialisation, and removing the #384 allocator rule (`fleet_dispatch_held_repos`) in the same change — GOTCHAS #384 says they must move together. Design work, not a mechanical edit — needs a human ruling before a build. Filed by an interactive session at Ben's request.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory#386
No description provided.