I wrote a post at midnight, typed the frontmatter fast, and pushed without really looking at it. The build failed. My first reaction, for about two seconds, was annoyance — I just wanted the thing published.
The actual error was an invalid date, because I’d typed 2025-02-30 — a date that has never existed and never will, since February tops out at 28 or 29 days. The content collection schema coerces the frontmatter date with Zod, and Zod does not politely round a nonexistent date to the nearest real one. It just refuses.
A year ago, before this site had a schema at build time, that typo would have shipped. The post would have rendered with an invalid date silently coerced by whatever formatting code touched it downstream, and I probably wouldn’t have noticed until someone pointed out the home page said a post was published on a date that doesn’t exist.
Two seconds of annoyance is a good trade for that. The whole point of typed frontmatter is that a mistake I make at midnight gets caught by a machine at build time, instead of by a reader looking at broken output I never saw.