2026-11-21 — Production outage from the start-up env check; check made non-fatal
The start-up check added on 2026-11-19 threw in production because NEXT_PUBLIC_SITE_URL was unset. Every server-rendered route on www.fragjulia.de failed from the first deployment that built with it until this fix. The check now only logs.
What happened
apps/web/instrumentation.ts(added in the 2026-11-19 go-live tranche) threw at server start in production whenNEXT_PUBLIC_SITE_URLwas missing.- The variable is not set in Vercel Production. The first production deployment that contained the check and built successfully was created 2026-11-21 01:45 UTC (merge of #714); the deployment of #713 had failed to build, so the previous version stayed live until then.
- From then on, every request that needed a server function on
www.fragjulia.defailed withAn error occurred while loading instrumentation hook: [env] required variables missing: NEXT_PUBLIC_SITE_URL(Vercel runtime log, routes/magazin/*,/lexikon/*,/s/faq). Prerendered pages served from the CDN were not affected. The number of failed requests was not measured. - Found 2026-11-21 ~13:45 UTC while reading runtime logs for an unrelated check. Duration until then: about 12 hours.
Cause
The check treated NEXT_PUBLIC_SITE_URL as required and fatal, although every reader of the variable has a default (https://fragjulia.de, e.g. apps/web/lib/stripe.ts:41). The check was never run against the variables Production actually has. The Vercel environment was listed as "not inspected" in the go-live map, and a fatal check should not have shipped against an uninspected environment.
Fix
instrumentation.tsnever throws. Missing Supabase variables are logged withconsole.error, everything else withconsole.warn.NEXT_PUBLIC_SITE_URLmoved to the warning list.- Verified locally:
next buildandnext startwithNODE_ENV=productionand the variable unset;/impressum,/magazin,/lexikon/grading,/robots.txtanswer 200, the 12 warnings are logged, no start-up error.
Resolved
Merged as #717; production deployment dpl_RADjrWjWefrVpTZ7kEyorwhizhvJ ready 2026-11-21 14:00 UTC. https://www.fragjulia.de/lexikon/grading (a route that was failing) answers 200 from a server function at 14:03 UTC. Total duration about 12 hours 15 minutes.
Still open (owner)
- Set
NEXT_PUBLIC_SITE_URLin Vercel for Production and Preview. Without it, Preview deployments send Stripe redirects and e-mail links to the production domain. - The same runtime log shows these Production variables unset:
CRON_SECRET,KV_REST_API_URL,KV_REST_API_TOKEN,STRIPE_SECRET_KEY,STRIPE_WEBHOOK_SECRET,STRIPE_PRICE_PLUS_MONTHLY,STRIPE_PRICE_PREMIUM_MONTHLY,RESEND_API_KEY,HMAC_SECRET,AWS_ACCESS_KEY_ID,S3_DOCUMENTS_BUCKET,DOCUMENT_PIPELINE_V2_ROLLOUT_PCT. Consequence according to the code (not observed live): chat and every other rate-limited route answer 429 (apps/web/lib/rate-limit.ts:88-95), no checkout, no transactional mail. - No uptime or error alerting exists (go-live map A13b). This outage was found by accident.
2026-11-21 — Document counter: no cross-user increments
increment_document_llm_call could be called for any user id by anyone, including callers without an account. It now only counts for the caller. Applied to the live database and verified.
2026-11-21 — Live database brought up to the repo migrations; is_admin hole closed
The live Supabase project had none of the repo migrations applied. Applied April + November migrations (except the consent and voice-bucket files), fixed the broken 0404 seed file, and closed client writes to the weekly post counter. Verified as a signed-in non-admin user.