Repository navigation
fix(dispatch): recheck pull request ack marker before posting - #1083
Merged
Merged
Conversation
A PR created as draft and marked ready within seconds fires opened and ready_for_review runs that can both list comments before either acknowledgement is visible, double-posting the receipt ack (observed on openclaw/openclaw#120974). The ack step now waits 15s after a clean first check and rechecks for any existing clawsweeper-pr-ack marker immediately before posting; a superseding ready_for_review event cancels a still-sleeping opened run through the existing concurrency group.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
added a commit
to openclaw/openclaw
that referenced
this pull request
Aug 9, 2026
Propagates the canonical dispatcher step from openclaw/clawsweeper#1083 byte-identically: the acknowledgement step waits 15s after a clean marker check and rechecks immediately before posting, so near-simultaneous opened and ready_for_review runs (draft PR marked ready within seconds, as on #120974) post exactly one receipt ack.
steipete
added a commit
to openclaw/openclaw
that referenced
this pull request
Aug 9, 2026
Propagates the canonical dispatcher step from openclaw/clawsweeper#1083 byte-identically: the acknowledgement step waits 15s after a clean marker check and rechecks immediately before posting, so near-simultaneous opened and ready_for_review runs (draft PR marked ready within seconds, as on #120974) post exactly one receipt ack.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 10, 2026
…20990) Propagates the canonical dispatcher step from openclaw/clawsweeper#1083 byte-identically: the acknowledgement step waits 15s after a clean marker check and rechecks immediately before posting, so near-simultaneous opened and ready_for_review runs (draft PR marked ready within seconds, as on openclaw#120974) post exactly one receipt ack.
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.
Problem
A PR created as draft and marked ready within seconds can receive two receipt acks from the target dispatcher. Observed on openclaw/openclaw#120974 (2026-08-09):
clawsweeper-pr-ack:openedat 07:15:20Z andclawsweeper-pr-ack:ready_for_reviewat 07:15:29Z, despite the idempotency check.Root cause
The idempotency check already matches any
clawsweeper-pr-ack:marker for the item, but it runs once at step start. Theopenedandready_for_reviewruns can both list comments before either acknowledgement is visible (interleaved runs across the concurrency-group handoff, or comment-list read lag), so both proceed to POST.Fix
The "Acknowledge received pull request" step now rechecks immediately before posting: after a clean first check it sleeps 15s, re-lists, and exits if any marker appeared. This closes both race directions:
ready_for_reviewevent arrives while theopenedrun is sleeping, the existing concurrency group's cancel-in-progress cancels the sleeping run before it ever posts, leaving exactly one poster.The step stays
continue-on-errorand the marker format is unchanged.docs/target-dispatcher.mdtemplate stays byte-identical to the live workflow (enforced bytest/target-dispatcher-workflow.test.ts), plus a short prose note on the race guard.Proof
npx tsx --test test/clawsweeper.test.ts test/target-dispatcher-workflow.test.ts— 79/79 pass, including the byte-identity assertion.bash -non the extracted step script;actionlintclean;pnpm run check:static(incl.format:checkover workflows) clean.openedmarker dedupes; wrong-item / empty / null-body payloads still post.Follow-up: propagating the fixed step byte-identically to openclaw/openclaw's customized dispatcher copy (step there matched the pre-fix canonical step exactly).