mirror of
https://github.com/bitbaum/datacat.git
synced 2026-12-03 20:48:14 +01:00
`pnpm run verify` — the command this repo's definition of done names — exits non-zero on a clean checkout of main, for two independent reasons that have nothing to do with any change. CI cannot see either one. **1. Generated output from tooling that was removed.** #254 replaced contentlayer with bip-kit and deleted the `.contentlayer` line from frontend/.prettierignore. Correct — the tool is gone. But the directory it generated survives in every checkout that had built the blog before then, and losing the ignore entry moved it from "invisible" to "in prettier's scope". Prettier cannot parse its import assertions, so `format:check`, the FIRST gate, died with a SyntaxError naming a generated file nobody wrote. A fresh clone has no such directory, which is exactly why CI is green. Two checkouts here had it, including the worktree of a session running right now, whose verify is red for this reason as I write it. So preflight grows a fourth check — same shape as the stale-node_modules one, and covering every worktree rather than just the current one: ! generated output from removed tooling: frontend/.contentlayer .claude/worktrees/complete-fetch/frontend/.contentlayer `--fix` deletes them. Proved by recreating the exact stale state, watching the read-only run flag both paths, then watching --fix clear them. **2. A required artifact that no step in the gate produced.** `typecheck` ran `tsc` against a Prisma client that only ever got generated by `@prisma/client`'s own postinstall hook, or by `build` — which runs *after* typecheck. The hook fires in CI; it did not fire here, because pnpm gates dependency build scripts and caches their side effects. So a clean `pnpm install --frozen-lockfile` left the client ungenerated and verify died: src/lib/db.ts(1,10): error TS2305: Module '"@prisma/client"' has no exported member 'PrismaClient'. Reproduced from an empty node_modules twice before changing anything. The fix is not to re-approve a hook: a gate should not depend on an install side effect it does not control. `typecheck` now runs `prisma generate` itself (~300ms) and the artifact exists because the step that needs it made it. Both fixes are the same principle — `verify` must depend on the repo, not on what a previous install or a previous version of the tooling happened to leave behind. The CLAUDE.md build section is corrected alongside: it still described contentlayer as the blog pipeline and told the reader to run `pnpm exec contentlayer build`, which would have recreated failure #1. verify, from a wiped frontend/node_modules: prettier ok, lint 0 errors / 152 warnings, tsc clean, 96/96 tests (76 frontend + 20 backend), build ok. Claude-Session: https://claude.ai/code/session_01LKTTAr8jsTvoZN6HneFtK9 Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>