Skip to content

Enqueue a DELETE_BRANCH compensation when a saga plants its loop branch #433

Closed

Description

@hadamrd

Parent: #431

Part of epic: "Compensate the branch a failed worker abandons"

At dispatch, when a saga is created for a worker that plants a loop/ branch, append Compensation(kind=DELETE_BRANCH, target='loop/') to the saga's compensation tuple alongside the existing REMOVE_WORKTREE compensation. Primary falsifiable acceptance: a saga created by the dispatch path for issue #n carries a DELETE_BRANCH compensation whose target equals the exact branch name planted for that worker.

Customer story

As an operator dispatching workers on a real repository: every branch a worker creates must be registered for reclamation at the moment it is created, so no failed worker can leak a branch the control plane doesn't know to delete.

Activity

  1. added
    loop:readyLoop runner will autonomously attempt this issue
    and removed
    loop:readyLoop runner will autonomously attempt this issue
    on Jun 8, 2026
  2. hadamrd commented on Jun 8, 2026

    @hadamrd
    OwnerAuthor

    forge-loop attempt — ⏳ PR OPEN (~1546s)

    PR: #437

    Note: critic blocked merge: [sev1/correctness] Enqueuing DELETE_BRANCH on every worker saga breaks existing worktree recovery. reconcile_stale_sagas computes unhandled as any kind not in _HANDLED_COMPENSA

    fingerprint: 9e83ba624693

    {
      "ts": "2026-06-08T18:11:51+00:00",
      "status": "open",
      "pr_url": "https://github.com/hadamrd/forge-loop/pull/437",
      "duration_s": 1545.5,
      "note": "critic blocked merge: [sev1/correctness] Enqueuing DELETE_BRANCH on every worker saga breaks existing worktree recovery. reconcile_stale_sagas computes `unhandled` as any kind not in _HANDLED_COMPENSA",
      "event_count": 1,
      "brief_fingerprint": "9e83ba62469390bb1f0b485872ff6458b5002ca5ed86e25b34bfbad2c87b6aa1"
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions