fix(queue): resolve scheduled target branches - #962
Merged
Conversation
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
default_branchonce before enqueue, and reject numeric or otherwise implausible branches before admissionsuccessplusrequeue_latestwith a five-minute retry so the item does not spend its eight-failure review budgetRoot cause
The literal
0did not come from the current planner candidate tuple. Before #889, legacy intake serializedrepo<TAB><empty branch><TAB>0; Bashreadtreated the adjacent tabs as IFS whitespace and shifted the source-authority flag intotarget_branch. PR 889 fixed new intake with NUL-delimited fields, but already-durable decisions retainedtargetBranch: "0". The parked-item recovery in #961 made that latent population execute at volume, as seen in https://github.com/openclaw/clawsweeper/actions/runs/30552037727.Proof
node --test test/repair/scheduled-review-enqueue.test.tsnode --test --test-name-pattern='exact event branch guard resolves|exact event review publishes directly|scheduled reviews feed the durable queue' test/sweep-workflow.test.tsnode --test --test-name-pattern='admission requeue_latest resets failures' test/dashboard-worker.test.tspnpm run format:checkpnpm run lintpnpm run checkThe workflow behavior test executes the real YAML step with fake GitHub responses and proves both an empty branch and
0resolve totrunk. The queue test starts at seven review failures and proves admission requeue resets the counters to zero, remains pending, and does not park.Deployment
No Worker redeploy is needed. This changes the repository workflow and the scheduled producer code built inside that workflow; it does not change the deployed dashboard Worker or queue schema. New runs after merge use the guard, while already-running jobs retain their checked-out workflow revision.