Skip to content

converge.ts not self-healing against a partial/non-git /workspace/repo #59

Closed

Description

@pdettori

Discovered during P3 live verification (PR #58, epic #49).

harness/src/converge.ts buildConvergeScript guards the clone with [ -d "$REPO/.git" ] || git clone ... "$REPO". If /workspace/repo exists but is not a git repo (no .git) — e.g. a pod killed mid-clone leaves a partial dir, or external cruft on the durable RWO PVC — the guard skips the clone yet the dir is non-empty, so git clone would fail destination path already exists and is not an empty directory (exit 128) and the leaf's converge wedges permanently for that pod (every retry re-fails; it never recovers).

Observed live: stale P2 test cruft (/workspace/repo without .git) on the pool pods' durable PVCs made every converge fail exit 128 until the dirs were manually removed.

Suggested fix: make converge self-healing — if $REPO exists but $REPO/.git is absent (or git -C $REPO rev-parse fails), rm -rf $REPO and re-clone. Low risk; the repo is a disposable object store.

Scope: P2 (converge.ts), not P3. P3 worked around it operationally.

Activity

  1. pdettori commented on Jul 6, 2026

    @pdettori
    MemberAuthor

    Verified addressed on main by PR #68 (923708e). buildConvergeScript no longer uses git clone; it now does [ -d "$REPO/.git" ] || { rm -rf "$REPO"; git init -q "$REPO"; } followed by a fetch that retries once after rm -rf+git init on failure. The non-git-but-non-empty /workspace/repo case (exit-128 wedge) and the corrupt-.git case are both self-healing. Closing.

    Assisted-By: Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions