ci(web): check facts drift before regenerating tracked facts (#3771)#3776
Conversation
`web/lib/facts.generated.ts` is tracked, but the web workflow ran `npm run prebuild` (regenerate) before `npm run check:facts`. That let CI self-heal the working tree, so a stale committed facts file could pass the drift gate. The step comment also wrongly claimed the file was gitignored. Run `check:facts` before `prebuild`. The committed file exists at checkout, and `check:facts` ignores the volatile `generatedAt` / `latestRelease` fields by design, so it correctly compares the committed copy against the workspace; a stale committed file now fails. `prebuild` still runs afterward so tsc/build use a current file. Comment corrected to say the file is tracked. Fixes #3771
|
Claude finished @Hmbown's task in 1m 17s —— View job PR Review: ci(web): check facts drift before regenerating tracked facts
SummaryThis is a correct, minimal fix for a real CI bug. The old ordering ( AnalysisCorrectness — ✅
npm lifecycle — ✅
Comment corrections — ✅ The old comment calling the file "gitignored" was factually wrong and could confuse contributors into thinking they shouldn't commit it. The corrected "TRACKED (committed)" wording is clearer.
No No issues foundThe change is surgical and accurate. Nothing to flag. |
Summary
Closes #3771.
web/lib/facts.generated.tsis tracked, but.github/workflows/web.ymlrannpm run prebuild(regenerate) beforenpm run check:facts, so CI regenerated the file and then compared it against itself — a stale committed file could pass.Change
Reordered:
check:factsnow runs beforeprebuild. The committed file exists at checkout andcheck:factsignores the volatilegeneratedAt/latestReleasefields, so it compares the committed copy against the workspace and fails on stale.prebuildstill runs afterward for tsc/build. The misleading "gitignored" comment is corrected to "tracked".Acceptance criteria
check:factsruns beforeprebuildcd web && npm run check:factsstill passes when committed facts match