|
|
|
|
|
by nahsuhn
59 days ago
|
|
Author here. I wrote this in late March after a billing dispute and sat on it. Then the breach disclosure landed and I kept seeing the same pattern: opt-in safety, "shared responsibility" framing, architecture that doesn't protect customers unless they explicitly ask. The billing story: my functions defaulted to wall-clock billing, not CPU billing. A dead socket cost me $1,243 over 8 days. The breach story: env vars defaulted to unencrypted. One compromised employee exposed every secret that wasn't explicitly marked sensitive. I'm not claiming these are the same severity. A breach is orders of magnitude worse. But they're the same architectural decision: the dangerous option is the default, the safe option is opt-in, and when the inevitable happens, the platform points to a doc explaining it was your responsibility. I spent my weekend rotating keys out of caution. Vercel's email telling me to "take advantage of the sensitive environment variables feature" arrived at 10:02 PM last night while I was writing this post. Wild. Happy to answer questions about the migration (Part 3). It was not painless. |
|
Dub is Next.js + PlanetScale so the Astro-specific landmines (middleware shadowing, astro:env/server, module-scope auth singletons) don't appear. The Workers-dependency audit, cron redesign for maxDuration:600 routes, and Edge Config → KV adapter did, because they're in Dub's source. Whether it would catch your exact Astro chain depends on whether the RAG has enough Astro-on-Workers patterns, which is the obvious next test.
What the plan probably wouldn't catch from your post: Lesson 6 (Hyperdrive's port 5432 vs the pooler port, the double-pooling trap), Lesson 10 (module-scope setInterval bricking every route), and the three-coexisting-env-paths reality around config.ts being stuck in the client build graph. That class of landmine only surfaces in postmortems, not docs. Out of curiosity, anything you've discovered post-cutover that would be a 12th lesson if you had to write about the migration again today?