`tsc -b` in CI caught what `tsc --noEmit` locally did not:
src/lib/routes.ts(131,3): error TS2322:
Type '"" | Window | null' is not assignable to type 'Window | null'.
`segment && LEGACY_WINDOWS[segment]` returns `''` for an empty path rather than
falling through to the `?? null`, so the root route's window was typed as the
empty string. Checked explicitly instead.
The real lesson is the command: CI runs `pnpm build`, which is `tsc -b && vite
build`. `tsc --noEmit` resolves a different project graph and `vite build` does
no type checking at all, so running those two is not the same gate and passed
over this. Run `pnpm format:check && pnpm lint && pnpm build` before pushing —
which is what the workflow itself runs, verbatim.
Nothing deployed from the failed run: `deploy-api` and `deploy-web` were both
skipped, so the site stayed on a consistent pair.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jp6a8EDar9ueEhAxzep4V5