feat(github): say why a webhook delivery changed nothing - #198
Conversation
Every delivery was marked processed, including the ones that were verified and then dropped because no repository matched. A workspace whose install never bound looks exactly like one where webhooks never arrive, and there was no way to tell the two apart. Report a reason from applyGithubEvent and record it on the delivery row, which already had an unused error column. A delivery that did the work still lands as processed with no reason. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 33 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
aed2d7d to
48571dc
Compare
Why
Every GitHub delivery was marked
processed, including ones that were signature verified and then dropped on the floor.applyGithubEventreturns early when nogithub_repository_syncrow matches the payload's repository, and the route recorded that identically to a delivery that created git links and moved an issue.The practical effect: a workspace whose install never bound to a repository looks exactly like one where webhooks never arrive. There was no way to answer "are we receiving webhooks?" from inside the product.
What
applyGithubEventnow returns anignoredReason, and the route records it on the delivery row using theerrorcolumn that already existed, with statusignoredinstead ofprocessed. No migration.unsupported_eventrepository_not_connectedrepository_disabledno_issue_identifierno_matching_issueA delivery that did the work still lands as
processedwitherrornull, and the success response shape is unchanged, so existing callers are unaffected.Tests
7 new: 4 in
packages/servicescovering each reason and the success case, 3 in the route asserting the row carries status and reason.bun run verifygreen.Note
This makes the failure legible, it does not by itself make repositories sync. Merged pull request state is already handled end to end:
pullRequestStatemapsmergedand the badge renders "Merged", with apr_mergednotification and the issue advancing to a completed state.🤖 Generated with Claude Code
Greptile Summary
The PR classifies GitHub webhook deliveries that perform no work as
ignoredand records a specific reason instead of marking every verified delivery as processed.Confidence Score: 4/5
The PR is not yet safe to merge because ignored deliveries remain eligible for reprocessing and can apply stale webhook events after repository or issue state changes.
The route writes successful no-op deliveries as
ignored, but its duplicate gate recognizes onlyprocessedas terminal; redelivering the same delivery resets it toreceivedand runs the event application path again.Files Needing Attention: apps/web/src/app/api/webhooks/github/route.ts
Important Files Changed
ignoredstatus.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Signed GitHub webhook] --> B[Claim delivery row] B --> C{Existing status is processed?} C -->|Yes| D[Return duplicate] C -->|No| E[Reset delivery to received] E --> F[Apply GitHub event] F --> G{Ignored reason?} G -->|No| H[Store processed] G -->|Yes| I[Store ignored and reason] I -. Redelivery re-enters .-> BReviews (2): Last reviewed commit: "feat(github): say why a webhook delivery..." | Re-trigger Greptile