Repository navigation
fix(review): acknowledge pull requests at webhook receipt - #1079
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 9, 2026, 12:46 AM ET / 04:46 UTC. ClawSweeper reviewWhat this changesThis PR moves the pull-request receipt acknowledgement ahead of source-head verification and review-queue admission, while retaining the existing acknowledgement marker and cleanup behavior. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain The patch narrowly fixes the reported acknowledgement gap, but it needs required real-behavior proof and an OpenClaw Bay impact statement before merge. Priority: P2 Review scores
Verification
How this fits togetherThe dashboard Worker receives GitHub pull-request webhooks, verifies the live source head, and adds eligible work to the exact-review queue. The fast acknowledgement comment provides immediate visible feedback before the review workflow starts. flowchart LR
A[GitHub pull request webhook] --> B[Webhook classification]
B --> C[Receipt acknowledgement]
C --> D[Live head verification]
D --> E[Exact review queue]
E --> F[Review workflow]
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the early acknowledgement ordering, then add a redacted production-boundary or Crabbox local-container trace proving acknowledgement precedes a forced verification failure and record whether Bay is unaffected or update its proof. Do we have a high-confidence way to reproduce the issue? Yes for source reproduction: current main returns from deferred verification and stale-head handling before the acknowledgement call, and the branch test exercises both paths. No real webhook trace has been supplied. Is this the best way to solve the issue? Yes: emitting a receipt acknowledgement before verification is the narrowest way to make the message truthful across both early exits, provided the runtime proof confirms the intended behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1ab4350383c2. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…1082) * fix(webhook): grant pull request fast-ack tokens pull_requests write The PR receipt fast ack minted its installation token with pull_requests: read, but posting a comment on a pull request through the issues API requires pull_requests: write for App tokens. GitHub answered 403 Resource not accessible by integration, the ack threw, and between PR #1078 and #1079 that uncaught throw returned HTTP 500 to every pull_request opened/ready_for_review webhook delivery (outage window 2026-08-09 04:12-04:52Z); after #1079 the same failure was swallowed silently, so no PR ever received its receipt comment. Also mint App installation tokens with the documented repositories parameter instead of repository_names, which GitHub ignores - tokens were silently granted installation-wide repository_selection=all instead of being scoped to the named repository. Log swallowed fast-ack failures so the next regression is visible in wrangler tail. * docs: reference PR number in changelog entries
What Problem This Solves
Follow-up to #1078, driven by a production miss: openclaw/openclaw#120874 (opened 04:15:08Z) received no fast acknowledgment. The #1078 ack ran only after a successful enqueue — below the "head verification deferred" catch (which a single throttled GitHub read triggers, and throttle cycles are routine) and the stale-head return. Any event taking those paths acknowledged nothing.
The Fix
The acknowledgment moves to event receipt: posted immediately after webhook classification for
opened/ready_for_review, before source-authority reservation, head verification, and enqueue. Semantics now match the copy — "Pull request received" — true regardless of what verification later decides. Same marker, idempotency, prune, and settle machinery; ack failures are caught so the webhook flow never degrades.Proof
pnpm test:unit1,971 pass / 0 fail;pnpm run check3,207 pass; coordinator autoreview clean (0.99).Note: the #120874 event may also have suffered an ingress-delivery gap (no dispatcher run fired either — plausibly Actions-trigger suppression for a service-account author); the App webhook delivery log check is tracked separately. This change hardens the code path that is ours regardless.