Skip to content

feat(automations): Select event automation resources with match filters - #2572

Merged
dcramer merged 3 commits into
mainfrom
feat/automation-trigger-match-only
Nov 2, 2026
Merged

dcramer merged 3 commits into
mainfrom
feat/automation-trigger-match-only

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Hard cutover on agent input for event automation triggers, as proposed in the #2442 review. An event trigger from createAutomation / updateAutomation is now namespace + events + match. Watches keep exact identifiers. Refs #2362.

Tool input

  • identifier and resourceType are gone from the event trigger schema of both tools.
  • updateAutomation changes match key by key: a value sets a filter, null removes 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.
  • searchEventTypes now describes reach in terms of match. reach: "resource" events (timers, workspace snapshots) are only usable by Watches.

Subscribable results

  • SubscribableResource gets an optional match. It is missing for Watch-only resources.
  • GitHub fills it from the parts it already has: PR {repo, pullRequest}, issue {repo, issue}, repo {repo}, deployment {repo, commitSha, environment?}, release {repo, tag?}. Vercel deployment fills {projectId, target?, commitSha?}. No identifier parsing.
  • Linear and Sentry have no subscribable builders. Their match fields (teamKey/issueIdentifier, projects/issueId/alertRuleId) already cover single-resource scoping, so Sentry does not block dropping the identifier.

Slack channel messages

  • message.posted moves from reach: "resource" to { anyOf: ["channelId"] }. The tools set channelId from the destination channel, and requireSlackChannelMessageScope still rejects other channels.

Saved triggers with an identifier

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 typecheck and pnpm lint pass.
  • Automation integration suites pass (66 tests), as do the GitHub plugin suite (266) and the Vercel plugin suite (33).
  • In the full @sentry/junior run, these failed in this sandbox: agent-dispatch-work, annotation-cards, durable-queue, event-wake-delay, bot-image-hydration, and the generated-title assertion in event-automations. They also fail on unmodified main in the same sandbox (mostly 5s timeouts), so I'm treating them as environment failures. CI is the real check.
  • I didn't run the evals locally. Updated assertions are in event-automations/management, credentials, and guardian/scheduled-work.

via @dcramer.

--

View Session [Sentry]

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 <[email protected]>
@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 2, 2026 10:46pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

7 screenshot changes — 7 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Attachment · Mobile
Conversation Attachment · Mobile
Changed
Conversation Attachment Modal · Desktop
Conversation Attachment Modal · Desktop
Changed
Conversation Child Agent Drawer · Desktop
Conversation Child Agent Drawer · Desktop
Changed
Conversation Child Agent Drawer · Mobile
Conversation Child Agent Drawer · Mobile
Changed
Conversation Event Log · Mobile
Conversation Event Log · Mobile
Changed
Show 1 more changed screenshot
Settings Mcp · Desktop
Settings Mcp · Desktop
Changed

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 <[email protected]>
@dcramer
dcramer marked this pull request as ready for review November 2, 2026 22:59
@dcramer
dcramer merged commit 50b17be into main Nov 2, 2026
48 checks passed
@dcramer
dcramer deleted the feat/automation-trigger-match-only branch November 2, 2026 22:59
@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 2, 2026

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 5517c7c5 Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant