Skip to content

fix(daemon): resume-choice review follow-ups — steer superpipe, dedicated park counter, RPC ordering - #3087

Closed
lsm wants to merge 1 commit into
devfrom
fix/resume-choice-review-followups
Closed

lsm wants to merge 1 commit into
devfrom
fix/resume-choice-review-followups

Conversation

@lsm

@lsm lsm commented Aug 27, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #2997 (reverted in #3078): re-lands the full resume-choice park/backoff feature with all six post-merge review findings fixed.

What changed vs #2997

  1. Steer resume-choice gates → superpipe (P1): the hand-rolled branch in routeFeedSteerOutcome now delegates to a new message-blocked-steer-route decisionRun in message-delivery-pipeline.ts (resolved→requeue_now / budget→dead-letter / park-with-backoff), symmetric with message-blocked-turn-route.
  2. Dedicated resume-choice counter: resume-choice parks increment __resumeChoiceParks, isolated from the generic __parkCount, so a steer that accumulated turn_blocked parks waiting behind its turn can no longer dead-letter instantly when the turn blocks on a resume choice. Promotion reset and the reason-filtered wake reset both counters.
  3. Steer post-park recheck: steers parked on sdk_resume_choice recheck resolution after the park mutation and wake immediately if answered mid-window (parity with the turn path's TOCTOU fix).
  4. fail() clears __parkReason on the retry transition, so transient-error retries through the processor no longer match the resume-choice wake filter.
  5. session.sdkResumeChoice ordering: the action is validated (exists, correct type, unresolved) before start_fresh clears sdkSessionId/sdkOriginPath — a duplicate replay of an already-resolved choice can no longer detach a restarted session from its new transcript.

Tests: 263 across the six affected suites, including new coverage for counter isolation, the steer wake race, and the fail()-clears-stamp path.


Open in Devin Review

…ted park counter, RPC ordering

Addresses the six post-merge findings from #2997:
- Steer resume-choice gates compose as message-blocked-steer-route
  decisionRun in the delivery pipeline (P1), replacing the hand-rolled
  branch in routeFeedSteerOutcome.
- Resume-choice parks track a dedicated __resumeChoiceParks counter, so
  accumulated turn_blocked/steer parks never consume the resume budget;
  promotion reset and the filtered wake reset both counters.
- Steers parked on sdk_resume_choice recheck resolution after parking and
  wake immediately when answered mid-window (parity with the turn path).
- JobQueueRepository.fail() clears __parkReason on the retry transition so
  transient-error retries no longer match the resume-choice wake filter.
- session.sdkResumeChoice validates the action before start_fresh clears
  sdkSessionId/sdkOriginPath, so duplicate replays can't detach a live
  session from its new transcript.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@lsm

lsm commented Sep 15, 2026

Copy link
Copy Markdown
Owner Author

Closing as obsolete: the steer role and routeFeedSteerOutcome this patches were deleted in #3441. Branch retained.

@lsm lsm closed this Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant