fix(recovery): exempt routine-parent issues from missing-disposition handoff (#8157)

Recognize active routine-parent issues as having a valid continuation path during successful-run handoff recovery. This prevents unnecessary missing-disposition corrective wakes when an active routine owns the next scheduled action.

Also keeps the routine-continuation guard before the productivity check so logs surface the decisive skip reason for both productive and non-productive routine-parent runs.

Verification:
- CI status checks passed on PR #8157
- Greptile Review passed at 5/5
- Focused recovery unit test passed locally

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
BuyWhere
2026-06-19 07:59:06 +07:00
committed by GitHub
parent 5c11725784
commit 67c98323b0
3 changed files with 44 additions and 0 deletions
@@ -350,6 +350,7 @@ export function decideSuccessfulRunHandoff(input: {
hasExplicitBlockerPath: boolean;
hasOpenRecoveryIssue: boolean;
hasPauseHold: boolean;
hasActiveRoutineContinuation: boolean;
budgetBlocked: boolean;
idempotentWakeExists: boolean;
}): SuccessfulRunHandoffDecision {
@@ -376,6 +377,9 @@ export function decideSuccessfulRunHandoff(input: {
if (agent.status === "paused" || agent.status === "terminated" || agent.status === "pending_approval") {
return { kind: "skip", reason: `agent status ${agent.status} is not invokable` };
}
if (input.hasActiveRoutineContinuation) {
return { kind: "skip", reason: "active routine continuation owns the next action" };
}
if (!isProductiveSuccessfulRun(input)) {
return { kind: "skip", reason: "successful run did not produce handoff-relevant progress" };
}