feat(worktrees): extend the ephemeral-worktree revert to the CLI pr revert and orchestrate revertMergedPR #131

Closed
opened 2026-07-15 23:06:35 +00:00 by hexajon · 0 comments
hexajon commented 2026-07-15 23:06:35 +00:00 (Migrated from codeberg.org)

#20 (merged) moved madt_prs action=revert into a disposable OS-temp linked worktree, so a conflicted revert can no longer wedge the caller's primary checkout. Two siblings still run git revert in the primary checkout and carry exactly the wedge bug the MCP path just lost:

  • the CLI madtea pr revert path
  • orchestrate's revertMergedPR stage

Both were deliberately left out of #20's scope (the orchestrate path also needs dir=/owner_repo= plumbing, which is #14's territory).

Ask

Port the ephemeral-worktree flow from the merged #20 implementation (internal/service/git ephemeral worktree helpers; conflict rail naming the worktree + madt_* resolution/abandon steps) to both call sites. Orchestrate work should land on top of #14's schema support rather than duplicating it.

Acceptance

  • A conflicted CLI pr revert and a conflicted orchestrate revert leave the primary checkout untouched (same branch, clean tree, no in-progress state), conflict parked in a named disposable worktree - hermetic tests, same pattern as #20's.
  • Rails follow the ADR 0023 rules (madt_*/CLI sanctioned forms only).
  • Gate green.

Refs #20 (merged implementation to port), #14 (orchestrate scope plumbing this builds on).

#20 (merged) moved `madt_prs action=revert` into a disposable OS-temp linked worktree, so a conflicted revert can no longer wedge the caller's primary checkout. Two siblings still run `git revert` in the primary checkout and carry exactly the wedge bug the MCP path just lost: - the CLI `madtea pr revert` path - orchestrate's `revertMergedPR` stage Both were deliberately left out of #20's scope (the orchestrate path also needs dir=/owner_repo= plumbing, which is #14's territory). ## Ask Port the ephemeral-worktree flow from the merged #20 implementation (internal/service/git ephemeral worktree helpers; conflict rail naming the worktree + madt_* resolution/abandon steps) to both call sites. Orchestrate work should land on top of #14's schema support rather than duplicating it. ## Acceptance - A conflicted CLI `pr revert` and a conflicted orchestrate revert leave the primary checkout untouched (same branch, clean tree, no in-progress state), conflict parked in a named disposable worktree - hermetic tests, same pattern as #20's. - Rails follow the ADR 0023 rules (madt_*/CLI sanctioned forms only). - Gate green. Refs #20 (merged implementation to port), #14 (orchestrate scope plumbing this builds on).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#131
No description provided.