fix(webhook): skip self-triggered events at the dispatch gate - #120
Merged
Conversation
The webhook gate dispatched events whose sender is the bot itself (e.g. jared's own PR review submission on a jared-labeled PR). That woke a container and booted Flue only for the in-container router to discard it via skip condition #1 (sender == $ME) — a wasted dispatch per self action. Mirror that skip at the Worker gate: drop events where sender == botLogin, except check_suite / workflow_run (CI on the bot's own commits is actionable and feeds fix-ci / mark-pr-ready), matching the router exception. Co-authored-by: Cursor <cursoragent@cursor.com>
MathurAditya724
enabled auto-merge (squash)
August 5, 2026 14:54
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
jared | b400dc3 | Aug 05 2026, 02:54 PM |
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
The webhook gate dispatches any event on a
jared-labeled PR/issue — including events whose sender is the bot itself. When jared submits a PR review, GitHub firespull_request_review.submittedwithsender = jared-outpost[bot]; since the PR carries thejaredlabel, the gate marked itdispatched, woke a container, and booted Flue just for the in-container router to discard it via skip condition #1 (sender == $ME).Observed on getsentry/cli#1363: the agent reviewed the PR, posted a comment review, and its own review submission re-dispatched a fresh container that only skipped.
This mirrors that skip at the Worker gate: drop events where
sender === botLogin, exceptcheck_suite/workflow_run(CI on the bot's own commits is genuinely actionable and feedsfix-ci/mark-pr-ready) — matching the exception already injared.md.Changes
apps/server/src/routes/webhooks/github.ts: computeisSelfTriggeredand fold it intoisSkipped.Test plan
vitest run(server) — 51/51 passbiome checkclean on the edited filetsc— no new errors (3 pre-existing errors in unrelated files, present onmain)dispatchedeventMade with Cursor