Repository navigation
docs: propose Vercel hosting and PR previews - #1382
Conversation
Consider Vercel before building an isolated AWS preview planeThis ADR designs a second S3 and CloudFront plane for previews. The sibling docs site already solves the same problem a different way. Vercel measured against the #1009 requirements: External-fork authorization and secret exposure. Met with config. A Docusaurus build needs no build secrets, so a fork build has nothing to leak. Vercel gates fork deploys behind team approval and lets you scope env vars out of Preview. This is the trust split the ADR reimplements as a two-stage workflow. Same-site isolation from mecatl.dev. Met natively, and stronger than the proposed design. Previews serve from Redirects, headers, caching, domains. Met, and an improvement on one point. Observability. Gap. Logs and analytics live on Vercel, not in the AWS account. There is no CloudFront access log in-account, and any WAF is Vercel's, not a self-managed AWS WAF. The isolated AWS plane wins this line when in-account logging or an AWS-owned WAF is a firm requirement. Retention and cleanup. Partial gap. Preview builds are ephemeral, but old preview URLs stay reachable until a retention policy or an API delete removes them. Vercel does not tear down on PR close the way this ADR's close workflow and reconciler do. A Vercel deployment-retention policy closes this. Optional Deployment Protection requires a login to view a preview and further limits the public surface. Migration and rollback. Met, low risk. A previews-only stage changes nothing in production. A later production move points mecatl.dev DNS at Vercel, keeps S3 and CloudFront as the rollback target, and decommissions them in infra after verification. Recommendation against the #1009 candidates:
The password gate is gone after launch per #1009, so it no longer argues for the AWS plane. One question decides this. Does the docs team or security require access logs and a WAF inside the AWS account, plus a guaranteed teardown on PR close? If yes, this ADR is the right design. If no, Vercel meets every other requirement with far less to own. The ADR should then adopt candidate C now, with candidate A as the target. |
|
Thanks, this comparison was the right forcing function. We discussed it and agree that Vercel is the right end state for both production and previews. The revised ADR adopts candidate A. It uses Vercel Git Fork Protection, a secret-free Preview environment, provider-generated preview domains, and repository-owned HTTP redirects. S3 and CloudFront remain available only through production verification and an agreed rollback window, then the bespoke AWS deployment is decommissioned. We are not retaining candidate C as a permanent split. The cutover will naturally run both hosts for a bounded period, but production and previews converge on Vercel. I also renumbered the ADR to 0331 because other open pull requests claimed 0327 after this draft opened. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Merging based on @jbeda approval in Slack. |
Summary
mecatl.devand the provider for documentation pull request previews.website/as the root, builds limited towebsite/anduser-docs/changes, Git Fork Protection enabled, and Deployment Protection disabled for previews.mecatl.devsame-site boundary, and enables Vercel's source and build-log protections.Development stage
and the in-PR plan declares
**Expected tasks:** 1, a non-placeholder**Combined rationale:**, and no runtime/public/operator/persistence/trust-boundaryinterface change (
None — rationale; workflow-only meta-changes may review processdocs/skills here)
Contract linkage
Interface conformance
No interface change. The ADR proposes boundaries for later review and implementation.
Issue relationship
Relates to #1009
Type of change
Test plan
Baseline checks
task lint)task test)go run ./cmd/mecademo)task docs)task site:build)task api:check)task api:update+engine/CHANGELOG.mdtask ac-trace-strict)/panel-reviewChanges
docs/adr/0331-documentation-hosting-and-pr-previews.mddocs/adr/README.mdUser-facing change
None. This PR records a proposed architecture decision and changes no website or deployment behavior.
Special notes for reviewers
The team has agreed on Vercel as the end state for both production and previews. The Vercel project is prepared with the security and build settings recorded in the ADR. Review should focus on whether those requirements and the remaining migration constraints are sufficient before implementation planning.
The ADR moved from 0327 to 0331 because other open pull requests claimed 0327 after this draft opened. ADR 0331 was unused on
mainand across open pull requests when this revision was pushed.