← Back to Pull requests

[TEC-432] Pin the Vercel project's Node version and document removing a protected prod resource #33

Open
unknown opened this pull request with 620 lines diff across 7 files
View on GitHub
unknown unknown commented on Nov 17, 2026 14:49 UTC
Author

Summary


A new Vercel project now runs the Node version the toolkit declares, and the README gives the exact steps to remove a protected prod resource. Part of TEC-432.

What changed

  • VercelProject's shared project now pins Node. project.nodeVersion is typed NodeVersion, which is '18.x' | '20.x' | '22.x' | '24.x': exactly the values @pulumiverse/vercel 5.21.1 accepts. The default is 24.x, the toolkit's own Node. Before this, the project set no Node version, so Vercel gave each new project its own default, which need not match the Node the product declares. It is a typed option, so products no longer need a transformation.

  • README, "Remove a protected prod resource": the exact steps to drop a protected prod resource, such as an env var.

  • 1. pulumi state unprotect
    2. pulumi state delete
    3. Release the change.
    4. vercel env rm … --project <product>-web --scope <team id>. The command names the project, so it cannot act on whatever project the directory is linked to.

    Prod and shared children stay protected and retained.

  • README, "Upgrade from 0.5": the 24.x default reaches an existing project on its next shared up. It is an in-place update, and it takes effect with the next deployment.

  • README, "Verify a Vercel domain": the _vercel TXT record Vercel may ask for is still a hand step after the first staging or prod release that binds the domain.

  • A minor changeset for @pebbletech/infra.
  • Moved out

  • Automatic _vercel TXT record: moved to its own card. Vercel stops listing the challenge once it has verified the hostname, and the provider's id for a domain is its hostname. Over three review rounds, each way of keeping a protected prod record stable hit a new edge case: verification, re-creation after a refresh, a new challenge on an unchanged domain, and a preview while the domain updates in place. That needs a design decision of its own, so this PR ships the hand step instead.

  • Stopping a project's first deployment from becoming production follows as a second PR. The shared stack will create a placeholder production deployment, so products do nothing.
  • What consumers see on upgrade

  • No code change is forced. base-app's and voicenote's infra/src type-check against this branch.

  • shared's next up sets nodeVersion: 24.x. If Vercel already has 24.x, nothing changes. Otherwise it is an in-place update of the project, and running deployments keep their Node until the next deployment.

  • voicenote can drop its pinNodeVersion transformation, or keep it, since it sends the same value.

  • Resource inventories are unchanged.
  • Checks

  • CI=true DATABASE_URL=… pnpm verify against a local PostgreSQL 18, without PGOPTIONS: 25 files, 515 passed, 4 skipped (config fidelity, which needs BASE_APP_DIR).

  • Fail-first by hand against 8eb42e3:

  • - The three Node tests fail with assertions.
    - Typecheck fails on the missing NodeVersion export and option, and on the unused @ts-expect-error for '26.x' and '24'.
    - The README steps are documentation, so no test observes them.

    Related PRs


  • https://github.com/pebble-tech/toolkit/pull/34 (gap 3, stacked on this PR)
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Vercel projects now default to Node.js 24.x. You can choose Node.js 18.x, 20.x, 22.x, or 24.x instead.
    Documentation
    Added guidance for upgrading existing projects, verifying domains, and removing protected production resources.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    <!-- CURSOR_SUMMARY -->
    ---

    [!NOTE]

    Low Risk

    Behavior change is a documented in-place Vercel project update with a safe default; README-only runbooks for prod teardown carry no runtime risk.

    > Overview

    VercelProject now sets nodeVersion on the shared stack’s Vercel project (default 24.x, overridable via typed NodeVersion). Products can drop ad-hoc Pulumi transformations that did the same thing; existing projects pick up the value on the next shared up and Node changes apply on the next deployment.

    > The README adds operational guides: upgrading from 0.5 for Node pinning, manually adding the _vercel TXT record when domain verification needs it, and the full workflow to remove a protected prod/shared resource (pulumi state unprotect, pulumi state delete, release, then vercel env rm with an explicit --project).

    > Tests and provider enum checks cover allowed Node versions; @pebbletech/infra gets a minor changeset.

    > <sup>Reviewed by Cursor Bugbot for commit 6f70532500557486433931d35fe6d13d3caa31eb. Bugbot is set up for automated code reviews on this repo. Configure here.</sup>

    <!-- /CURSOR_SUMMARY -->

    Diff: 620 lines (+465 / -155) across 7 files Reviewer: coderabbitai[bot] Review duration: 9m
    All Vouch review confidence checks passed
    Residual risk 0.34 = Change Risk (0.50) × (1 − Review Confidence (0.32)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 620 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 59% · Reviewer familiarity: 35%
    32%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.385
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #33"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 32.1% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 50.3% (MEDIUM) · Higher = larger blast radius
    50.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 32.1% · Lower = rushed or shallow review
    32.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 34.1% · Safe to merge
    34.1%