Repository navigation
fix(queue): preserve pending backlog across dispatcher pauses - #601
Merged
Merged
Conversation
Contributor
Author
|
@clawsweeper review |
Contributor
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
This was referenced Jul 15, 2026
azaj01
pushed a commit
to azaj01/clawsweeper
that referenced
this pull request
Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve each pending exact-review item's own retry time when the dispatcher is paused or blocked, while making the dispatcher's retry deadline an explicit admission barrier.
Problem
During a dispatcher preflight pause/block, the queue rewrote every pending item's
nextAttemptAtto the dispatcher retry time. Repeated transient pauses could therefore keep moving an entire backlog forward, even where capacity was available. An alarm already scheduled for an expiring lease could also run before that dispatcher retry and accidentally admit retained due work.Implementation
Validation
node --test test/dashboard-worker.test.ts— 106 passed, 0 failed.pnpm run build:dashboardpnpm run lint:dashboardpnpm exec oxfmt --check dashboard/worker.ts test/dashboard-worker.test.tsgit diff --checkcodex review --uncommitted— clean after focused proof.codex review --base origin/main— clean after commit.pnpm run review -- --local-range --target-repo openclaw/clawsweeper --target-dir C:\clawsweeper-work\worktrees\csw-041-queue-recovery --base origin/main --artifact-dir C:\clawsweeper-work\local-reviews\csw-041-pr-final2— final local ClawSweeper review: patch correct, no actionable findings.The final local review used the known-good reviewer baseline
7d58c63, which already includes the selected-current-Codex-CLI local-review support from #541. It caught two earlier queue-timing edge cases; both were fixed before this final pass.Risks and rollout
This changes internal Durable Object queue scheduling. The local review identifies the remaining limitation accurately: proof is unit-test/source-reproduction only, not a redacted after-fix Durable Object or staging trace. It does not change capacity, GitHub tokens, labels/comments publication, or state-branch publication.
After deployment, rows previously deferred by a pause remain held only until the current dispatcher retry; once active at or after that retry, they are admitted naturally. Monitor pending, dispatching, and leased counts together with exact-review run completion and GitHub label/comment publication.
Incident alignment
This addresses the queue-admission component of the recent review-backlog incident. It is deliberately scoped and does not claim to fix independent state-publication contention, token/permission errors, or GitHub label/comment publication failures.