Repository navigation
Description
Intent
Extend Junior’s provider-neutral resource-event system to support webhook-driven Vercel deployment updates. The motivating flow is getsentry/junior-prod self-update: after its update PR merges, the originating conversation should learn whether the resulting production deployment succeeded, failed, or was canceled without scheduled polling.
Proposed MVP
- Add a signed
/api/webhooks/vercelingress that verifiesx-vercel-signature, normalizes terminal deployment events, and calls the existingingestResourceEvent()boundary. - Support
deployment.succeeded,deployment.error, anddeployment.canceled; use Vercel’s webhook delivery ID for deduplication. - Add a Vercel operation that returns a
SubscribableResourcefor a project and Git commit, using a stable ref such asvercel:deployment-source:<project-id>:<commit-sha>. - Configure one durable, project-scoped Vercel account webhook rather than creating a provider webhook for each Slack subscription.
- Preserve the existing core ownership of conversation association, TTL, locking, deduplication, terminal completion, and queued headless turns under
packages/junior/src/chat/resource-events/.
Self-update integration
The self-update flow opens a draft PR before the eventual production commit is known. With merge commits, Vercel deploys the merge SHA rather than the PR branch head, so the flow should chain subscriptions:
- Subscribe the self-update conversation to the GitHub PR’s
state.mergedevent. - On merge, resolve the merge SHA and create the Vercel deployment subscription.
- On a terminal deployment event, report the outcome. For failures, optionally inspect Vercel build/runtime logs and correlate new Sentry errors.
Do not depend on deployment.created; installing the deployment watch after merge avoids coupling correctness to that race.
Implementation surface
- Core: register Vercel webhook ingress alongside the existing GitHub route and add normalization/tests.
@sentry/junior-vercel: expose the subscribable deployment resource and document webhook configuration.@sentry/junior-maintenance: update the self-update skill to perform merge-to-deploy subscription chaining.getsentry/junior-prod: configure a project-scoped account webhook and secret; retainJUNIOR_VERCEL_TOKENonly for deeper log inspection.
Vercel account webhooks support project scoping and the required terminal deployment events on Pro/Enterprise plans: https://vercel.com/docs/webhooks
Related abandoned polling approach: https://github.com/getsentry/junior-prod/pull/126
Requested by David Cramer via Junior.
--
Activity
docs(vercel): Document webhook signature constraint
fix(vercel): Allow plugin tools in skill
fix(vercel): Resolve watch projects by name
fix(vercel): Normalize webhook secret once
fix(vercel): Name deployment watch tool correctly
feat(vercel)!: Add deployment webhook subscriptions
docs(vercel): Document webhook signature constraint
fix(vercel): Allow plugin tools in skill
fix(vercel): Resolve watch projects by name
fix(vercel): Normalize webhook secret once
fix(vercel): Name deployment watch tool correctly
feat(vercel)!: Add deployment webhook subscriptions (#1008)
dcramer commentedon Jul 23, 2026
Chunk of this is merged. Still more work to do though to expose it.
sentry-junior commentedon Nov 9, 2026
Fixed on main by #1008 and follow-ups: Vercel deployment tools return a subscribable deployment resource with succeeded/error/canceled events (
packages/junior-vercel/src/events/deployment.ts).Closed during a tracker cleanup. Reopen if something here is still missing.