Quiz - Ship to Vercel and go live
Your branch ruleset requires all four CI jobs to pass before a PR can merge. A teammate, in a hurry, pushes a hotfix commit directly to main, bypassing the PR. CI starts running. What happens to production?
main is rejected by the ruleset, so production is untouched.main, not the production alias. Vercel’s deploy and GitHub Actions run in parallel and independently; the deploy doesn’t wait for CI by default. A direct push to main re-aliases production right away — which is exactly why pushing to main before the gate can vouch for it is dangerous. Making the deploy itself wait on CI requires Vercel Deployment Checks, not the branch ruleset.You import your repo, accept Vercel’s auto-detected settings, and deploy. The build log shows it ran npm install instead of pnpm install, even though your repo uses a pnpm lockfile. What’s the most likely cause?
packageManager field is missing from package.json, so Vercel couldn’t detect pnpm and silently fell back to npm.pnpm install on the Configure Project screen.package.json’s packageManager field to decide which package manager to use. With it present (e.g. "pnpm@11.5.0"), Vercel installs with pnpm and your committed lockfile, matching your machine. Without it, the build silently falls back to npm — the “works on my machine” drift you don’t want under a production build. You don’t override Install Command; you fix the field.Under Fluid Compute, one warm instance now serves several requests concurrently. Which piece of code is genuinely unsafe to keep at module scope?
let currentOrgId that each request handler writes from the incoming request before reading it back.let currentOrgId holds per-request data: request B can overwrite it between the moment request A sets it and reads it back — serving one tenant’s data to another, a cross-tenant leak invisible to single-request local testing. A pooled DB client and a compiled regex are stateless or built for concurrent use, so sharing them is fine. Per-request state belongs in function locals or AsyncLocalStorage.You add a custom domain on Vercel, DNS resolves, and Let’s Encrypt provisions the certificate automatically. What part of HTTPS is still your job, not the platform’s?
Strict-Transport-Security (HSTS) header — it’s an application response header you configure in next.config.ts, not something Vercel adds.next.config.ts and verify in the launch checklist.The course wires migrations into the Build Command (pnpm db:migrate && next build) so each preview branch’s schema matches its PR. Why is that exact pattern safe for previews but a “loaded gun” for production?
main branch is real customer data, so an automatic migration on every push to main could drop a column out from under live traffic with no human in the loop.main. For an ephemeral preview branch that’s exactly right: it’s disposable, so a bad migration costs nothing. For production it’s dangerous, because a naive destructive migration runs automatically with no approval. The senior call: build-command migrations for previews, gated/approved CI step for production. (Migration safety itself is the next chapter.)The course’s R2 setup used long-lived R2_ACCESS_KEY_ID / R2_SECRET_ACCESS_KEY env vars. The OIDC-federation upgrade replaces them with short-lived tokens. What is the single property that makes OIDC the senior default?
A bad deploy double-charged some customers and inserted bad rows before you caught it. You hit Instant Rollback and traffic flips to the previous good build in seconds. Select everything the rollback did not undo. Select all that apply.
main.main; that’s Layer 2, the git revert, without which the next merge re-ships the bug. The data-state problem is a separate, forward fix.For the uptime monitor, why does the launch checklist ship a dedicated /api/health endpoint that runs a select 1 instead of just pinging the homepage for a 200?
200 while the database behind it is unreachable; pinging the DB with a cheap query proves the app can actually do its job, not just that the web server is up./api/health is cached at the edge and effectively free.200 proves only the web server is alive — the static shell can stream while every data-driven path quietly fails against an unreachable database. /api/health answers the honest question by doing a trivial select 1: success returns 200, a throw returns 503, which is what trips the monitor. It’s unauthenticated by design (the monitor is a non-browser client) and kept cheap on purpose, since it runs every minute forever.Quiz complete
Score by topic