feat: MergeFailureFinal → Coding via operator FixupRequested
MergeFailureFinal was unreachable from move_story: the only transitions out were Freeze (→ Frozen) and a self-loop on MergemasterAttempted, so once mergemaster exhausted its 3-retry budget the only way to get a story coding again was to delete + recreate it. The respawn budget is a mergemaster bookkeeping detail, not a hard ceiling. A human operator inspecting a Final story can reasonably decide the gate failure is fixable, so this adds the same FixupRequested → Coding edge that already exists for plain MergeFailure. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -411,6 +411,9 @@ fn map_stage_move_to_event(
|
||||
(Stage::Merge { .. }, "current") => Ok(PipelineEvent::MergeAborted),
|
||||
// Story 971: send MergeFailure story back to Coding so a coder can fix it.
|
||||
(Stage::MergeFailure { .. }, "current") => Ok(PipelineEvent::FixupRequested),
|
||||
// Operator override on the exhausted-respawn terminal state: still
|
||||
// a coder fixup, but reached via the budget-exhausted path.
|
||||
(Stage::MergeFailureFinal { .. }, "current") => Ok(PipelineEvent::FixupRequested),
|
||||
// Story 972: send MergeFailure story back to Qa for a QA agent to re-review.
|
||||
(Stage::MergeFailure { .. }, "qa") => Ok(PipelineEvent::ReQueuedForQa),
|
||||
// Story 974: reopen a Done story for a post-merge hotfix.
|
||||
|
||||
@@ -307,6 +307,15 @@ pub fn transition(state: Stage, event: PipelineEvent) -> Result<Stage, Transitio
|
||||
// ── FixupRequested: MergeFailure → Coding (coder fixup) ────────
|
||||
(MergeFailure { .. }, FixupRequested) => Ok(Coding),
|
||||
|
||||
// ── FixupRequested: MergeFailureFinal → Coding (operator override)
|
||||
//
|
||||
// The exhausted-respawn-budget terminal state is not actually
|
||||
// terminal as far as the operator is concerned; a human can decide
|
||||
// the gate failure is fixable and send the story back for another
|
||||
// coder attempt. The budget counter is a mergemaster bookkeeping
|
||||
// detail, not a hard ceiling.
|
||||
(MergeFailureFinal { .. }, FixupRequested) => Ok(Coding),
|
||||
|
||||
// ── ReQueuedForQa: MergeFailure → Qa (re-review) ────────────────
|
||||
(MergeFailure { .. }, ReQueuedForQa) => Ok(Qa),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user