Web release flow
How Today web freezes a release branch, validates lane staging, promotes a production candidate to today.ai, and backmerges fixes to dev.
dev is the trunk branch. Product work merges there through the normal PR and
merge-queue path.
Production releases do not use main. A release is frozen on a temporary
release/web-* branch, promoted from a Vercel production candidate, and
archived by a protected web-prod-* tag. Release-only fixes return to dev
through a normal backmerge PR.
Naming
Use two names consistently:
- lane staging:
https://staging.today.ai, built from arelease/web-*branch withNEXT_PUBLIC_TRAFFIC_LANE=staging. Browser requests and BFF upstream calls sendX-Traffic-Lane: staging. - production candidate: a production-mode Vercel deployment built from the
same release branch without
NEXT_PUBLIC_TRAFFIC_LANE. It has a preview URL and is promoted tohttps://today.aionly after approval.
The lane staging artifact cannot be promoted to production because the browser bundle already contains the staging lane value. The production candidate is a separate rebuild from the release SHA.
Normal Release
- Run
Cut Web Release Branchfromdev. This creates a temporaryrelease/web-*branch at the chosendevSHA. - The release branch push starts CI and
Deploy Web Lane Staging. The workflow builds with production API/auth settings plusNEXT_PUBLIC_TRAFFIC_LANE=staging, then aliases the deployment tohttps://staging.today.ai. - During validation, add release fixes only to the release branch. Do not rebase the release branch after staging validation starts.
- Run
Promote Web Productionfrom the release branch. Leaveskip_staging=falsefor the normal path. - The workflow builds a production candidate from the release SHA without a traffic lane and prints the candidate preview URL.
- The
web-productionenvironment approval pauses the workflow. Validate the candidate preview URL, then approve. - The workflow checks that the release branch still points at the same SHA,
runs
vercel promote <candidate>, verifieshttps://today.ai, creates aweb-prod-*tag, and opens a release-to-devbackmerge PR if needed.
Skip Staging
For an urgent or low-risk release, run Promote Web Production directly from a
release/web-* branch with skip_staging=true.
This skips the https://staging.today.ai check but still rebuilds and pauses on
the production candidate preview before promote.
Backmerge
Release fixes must land back on dev. The production workflow creates the PR
after promotion when dev does not already contain the promoted release SHA.
It creates a backmerge/web-* branch from the promoted SHA and uses that branch
as the PR head so the release/web-* branch stays frozen as release evidence.
Resolve conflicts in the backmerge PR manually and let the merge queue own the
final merge. Do not force conflict resolution into the production promote
workflow.
Branch Cleanup
Keep release/web-* branches through the immediate hotfix window. After the
release tag exists and release-only fixes are backmerged, delete the release
branch. The durable production record is the web-prod-* tag and the Vercel
deployment promoted to today.ai.
Backmerge branches are work branches only. Delete backmerge/web-* after the
backmerge PR is merged or closed.
Merge queue
How GitHub's merge queue interacts with `gh pr merge` on this repo. The `UNSTABLE` vs `CLEAN` vs `BLOCKED` states, what cancels auto-merge, and the speculative-branch double-run.
CI affected scope
How `scripts/affected.ts` computes which packages a PR actually touches and how that scopes typecheck / test / lint / visual-regression on CI.