@runuai/host 0.8.33 → 0.8.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/agent/task-up.sh +9 -0
package/package.json
CHANGED
package/scripts/agent/task-up.sh
CHANGED
|
@@ -206,6 +206,15 @@ while IFS= read -r project_obj; do
|
|
|
206
206
|
# (found live 2026-07-21). The task branch and any uncommitted work are
|
|
207
207
|
# exactly what the user expects back.
|
|
208
208
|
log "worktree for $project_slug already present — resuming with it"
|
|
209
|
+
# Self-heal an ORPHANED worktree. The bare mirror is shared by every task
|
|
210
|
+
# on this project, so a prune of it (auto-gc, or a sibling's task-down)
|
|
211
|
+
# can delete THIS worktree's admin dir (repo.git/worktrees/<name>) while
|
|
212
|
+
# its working tree is momentarily unreachable — e.g. the re-mount window on
|
|
213
|
+
# resume. The .git file is then a dangling pointer and every in-container
|
|
214
|
+
# git op dies "fatal: not a git repository" (found live 2026-07-24, a
|
|
215
|
+
# blocked agent unable to commit). `git worktree repair` rebuilds the admin
|
|
216
|
+
# dir from the intact working tree; it is a no-op when the link is healthy.
|
|
217
|
+
git -C "$mirror_dir" worktree repair "$worktree_target" 2>/dev/null || true
|
|
209
218
|
elif git -C "$mirror_dir" rev-parse --verify --quiet \
|
|
210
219
|
"refs/remotes/origin/$project_default" >/dev/null 2>&1; then
|
|
211
220
|
# Normal case: branch the task worktree off origin/<defaultBranch>.
|