Repository navigation
feat(automations): Select event automation resources with match filters - #2572
Merged
Merged
Conversation
Event automation triggers from the agent tools now name their resource with match filters instead of an identifier. Subscribable tool results carry a match value next to the identifier, so the agent copies filters from the tool result. Watches keep exact identifiers. updateAutomation changes filters key by key: a value sets a filter, null removes it, and a filter left out keeps its saved value. Slack channel-message automations use a channelId filter set from the destination channel. Saved triggers with an identifier keep running. Refs #2362 Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
7 screenshot changes — 7 changed · 0 added · 0 removed Review screenshots in Frameshift |
GitHub and Vercel tests now check that the match of each subscribable tool result selects the same webhook events as its identifier. Slack tests cover a saved channel identifier and an update that tries to drop the channel filter. The automation card test mocks the title model instead of relying on the model call failing. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
dcramer
approved these changes
Nov 2, 2026
This branch was successfully deployed
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.
Hard cutover on agent input for event automation triggers, as proposed in the #2442 review. An event trigger from
createAutomation/updateAutomationis nownamespace + events + match. Watches keep exact identifiers. Refs #2362.Tool input
identifierandresourceTypeare gone from the event trigger schema of both tools.updateAutomationchangesmatchkey by key: a value sets a filter,nullremoves it, and a filter left out keeps its saved value. So an update can't broaden a trigger by leaving a filter out. A namespace change starts with no filters.searchEventTypesnow describes reach in terms ofmatch.reach: "resource"events (timers, workspace snapshots) are only usable by Watches.Subscribable results
SubscribableResourcegets an optionalmatch. It is missing for Watch-only resources.{repo, pullRequest}, issue{repo, issue}, repo{repo}, deployment{repo, commitSha, environment?}, release{repo, tag?}. Vercel deployment fills{projectId, target?, commitSha?}. No identifier parsing.teamKey/issueIdentifier,projects/issueId/alertRuleId) already cover single-resource scoping, so Sentry does not block dropping the identifier.Slack channel messages
message.postedmoves fromreach: "resource"to{ anyOf: ["channelId"] }. The tools setchannelIdfrom the destination channel, andrequireSlackChannelMessageScopestill rejects other channels.Saved triggers with an identifier
pullRequest: 8on a row saved asgetsentry/junior#7, the trigger stops matching. Core can't detect that without the plugin conversion that [DO NOT MERGE] feat(events): Convert saved event automation triggers in the heartbeat #2447 adds.Dedupe: no change. Runs are keyed on
(automationId, namespace, eventKey), so a filter-only automation that matches the PR copy and the repo copy of one webhook still runs once.Verification
pnpm typecheckandpnpm lintpass.@sentry/juniorrun, these failed in this sandbox:agent-dispatch-work,annotation-cards,durable-queue,event-wake-delay,bot-image-hydration, and the generated-title assertion inevent-automations. They also fail on unmodifiedmainin the same sandbox (mostly 5s timeouts), so I'm treating them as environment failures. CI is the real check.event-automations/management,credentials, andguardian/scheduled-work.via @dcramer.
--
View Session [Sentry]