Skip to content

Support resource subscriptions for Vercel deploys #938

Closed

Description

@sentry-junior

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/vercel ingress that verifies x-vercel-signature, normalizes terminal deployment events, and calls the existing ingestResourceEvent() boundary.
  • Support deployment.succeeded, deployment.error, and deployment.canceled; use Vercel’s webhook delivery ID for deduplication.
  • Add a Vercel operation that returns a SubscribableResource for a project and Git commit, using a stable ref such as vercel: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:

  1. Subscribe the self-update conversation to the GitHub PR’s state.merged event.
  2. On merge, resolve the merge SHA and create the Vercel deployment subscription.
  3. 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; retain JUNIOR_VERCEL_TOKEN only 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.

--

View Junior Session in Sentry

Activity

  1. dcramer commented on Jul 23, 2026

    @dcramer
    Member

    Chunk of this is merged. Still more work to do though to expose it.

  2. sentry-junior commented on Nov 9, 2026

    @sentry-junior
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfeature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions