@runuai/host 0.8.19 → 0.8.20
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 -1
package/package.json
CHANGED
package/scripts/agent/task-up.sh
CHANGED
|
@@ -198,7 +198,15 @@ while IFS= read -r project_obj; do
|
|
|
198
198
|
[ -n "$project_default" ] || project_default="main"
|
|
199
199
|
|
|
200
200
|
mkdir -p "$(dirname "$worktree_target")"
|
|
201
|
-
if
|
|
201
|
+
if [ -e "$worktree_target/.git" ]; then
|
|
202
|
+
# Resume (ADR-028): the task worktree survived the stop — reuse it as-is
|
|
203
|
+
# (a linked worktree's .git is a FILE, hence -e). Re-running `git
|
|
204
|
+
# worktree add` would refuse ("already exists" / branch exists) and
|
|
205
|
+
# errored EVERY resume of a worktree-preserving stop within seconds
|
|
206
|
+
# (found live 2026-07-21). The task branch and any uncommitted work are
|
|
207
|
+
# exactly what the user expects back.
|
|
208
|
+
log "worktree for $project_slug already present — resuming with it"
|
|
209
|
+
elif git -C "$mirror_dir" rev-parse --verify --quiet \
|
|
202
210
|
"refs/remotes/origin/$project_default" >/dev/null 2>&1; then
|
|
203
211
|
# Normal case: branch the task worktree off origin/<defaultBranch>.
|
|
204
212
|
step "WORKTREE_FAILED" "git worktree add ($project_id)"
|