Context
PR #130 (feat/issue-125) has 2 critical bugs. Fix them on branch feat/issue-125.
Bugs to fix
1. VOLUME in Dockerfile shadows pre-built bare repo
VOLUME ["/bare-repo.git"] causes Docker to create an empty anonymous volume, hiding the pre-cloned repo. Fix:
# REMOVE this line:
# VOLUME ["/bare-repo.git"]
The bare repo should just be a regular directory in the image layer.
2. git worktree add ... main — fails for concurrent agents
A branch can only be checked out in one worktree. Second agent fails. Fix:
# BEFORE (broken):
git worktree add "${WORKTREE_PATH}" main
# AFTER:
git worktree add -b "agent-${ISSUE}" "${WORKTREE_PATH}" main
Each agent gets its own branch from main.
3. Add locking for concurrent access
# Wrap fetch + worktree add in flock:
(
flock -x 200
git fetch origin main --depth=50
git worktree add -b "agent-${ISSUE}" "${WORKTREE_PATH}" main
) 200>/bare-repo.git/.git-lock
Instructions
git checkout feat/issue-125
- Fix
deploy/Dockerfile.agent — remove VOLUME line
- Fix
deploy/agent-entrypoint.sh — worktree branch + flock
- Commit:
fix(cloud): remove VOLUME, per-agent branch, add flock (#130)
- Push to
feat/issue-125
Context
PR #130 (feat/issue-125) has 2 critical bugs. Fix them on branch
feat/issue-125.Bugs to fix
1. VOLUME in Dockerfile shadows pre-built bare repo
VOLUME ["/bare-repo.git"]causes Docker to create an empty anonymous volume, hiding the pre-cloned repo. Fix:The bare repo should just be a regular directory in the image layer.
2. git worktree add ... main — fails for concurrent agents
A branch can only be checked out in one worktree. Second agent fails. Fix:
Each agent gets its own branch from main.
3. Add locking for concurrent access
Instructions
git checkout feat/issue-125deploy/Dockerfile.agent— remove VOLUME linedeploy/agent-entrypoint.sh— worktree branch + flockfix(cloud): remove VOLUME, per-agent branch, add flock (#130)feat/issue-125