Skip to content

Approval gate timeout leaves pipeline in unrecoverable rejected-at-diff state #2

Description

@shaifulshabuj

Bug Report

Summary

When the diff approval gate times out (default 120s), the pipeline is permanently stopped with rejected-at-diff status. There is no way to continue, retry, or resume the task.

Steps to Reproduce

  1. Run devloop run without --auto
  2. When the diff gate appears, let it time out (120s)
  3. Pipeline prints: Approval timed out after 120s - rejecting
  4. Pipeline prints: Diff rejected at approval gate - pipeline stopped
  5. Open devloop view TASK-ID - status shows rejected-at-diff with no recovery path

Observed Behavior

After timeout:

  • Status file set to rejected-at-diff
  • Live View shows phases done but status = rejected-at-diff
  • devloop resume re-runs the entire worker phase (wrong - worker already completed)
  • No hint printed about how to recover

Expected Behavior

A timeout at a gate is different from an active rejection. Expected:

  • devloop resume TASK-ID should detect gate-stall and re-present only the gate
  • devloop resume TASK-ID --approve-diff to force-approve and proceed to review
  • Recovery hint printed after timeout: Run devloop resume TASK-ID to retry the gate
  • New status values: timed-out-at-plan, timed-out-at-diff (distinct from rejected)

Suggested Fix

  1. Add timed-out-at-diff status distinct from rejected-at-diff in session status file
  2. cmd_resume() should detect gate-stall status and re-present the gate, not re-run worker
  3. Consider per-gate timeout config: DEVLOOP_PLAN_GATE_TIMEOUT, DEVLOOP_DIFF_GATE_TIMEOUT
  4. Print recovery hint immediately after timeout

Environment

  • DevLoop: v5.1.0
  • Gate: diff gate
  • DEVLOOP_APPROVAL_TIMEOUT: 120 (default)

Related Code

  • devloop.sh _approval_gate() - gate resolver and timeout
  • devloop.sh cmd_resume() - needs to handle gate-stall status
  • .devloop/sessions/TASK-ID/status - needs new timed-out states

Metadata

Metadata

Labels

bugSomething isn't workinggood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions