Why this matters
The web facts drift gate is supposed to fail CI when the tracked web/lib/facts.generated.ts file is stale. The current workflow regenerates that tracked file before running the drift check, so CI can self-heal the working tree and then compare fresh facts against freshly generated facts. That lets stale committed facts pass.
Current behavior
web/lib/facts.generated.ts is tracked:
git ls-files web/lib/facts.generated.ts
# web/lib/facts.generated.ts
The web CI workflow regenerates it before checking drift:
.github/workflows/web.yml:35-44
- name: Generate derived facts
run: npm run prebuild
- name: Check facts drift
run: npm run check:facts
npm run prebuild is node scripts/derive-facts.mjs:
check-facts.mjs then reads web/lib/facts.generated.ts as the committed source of truth, but at that point the workflow may already have rewritten it:
web/scripts/check-facts.mjs:36-50
web/scripts/check-facts.mjs:105-122
Local evidence from the current candidate shows the file is tracked and drifted in the working tree:
web/lib/facts.generated.ts
- "generatedAt": "2026-06-24T09:06:20.600Z",
- "version": "0.8.65",
+ "generatedAt": "2026-06-29T01:20:23.492Z",
+ "version": "0.8.66",
Desired behavior
- CI should check committed facts drift before regenerating
web/lib/facts.generated.ts, or verify that regeneration produces no tracked diff.
- A stale committed facts file should fail CI.
- The workflow comments should accurately describe whether
facts.generated.ts is tracked or ignored.
Repro or evidence
Inspect the workflow order and tracked file state:
git ls-files web/lib/facts.generated.ts
git diff -- web/lib/facts.generated.ts | sed -n '1,80p'
nl -ba .github/workflows/web.yml | sed -n '35,44p'
nl -ba web/package.json | rg -n '"prebuild"|"check:facts"' -C 2
The workflow runs prebuild before check:facts, while facts.generated.ts is tracked.
Acceptance criteria
Related
Why this matters
The web facts drift gate is supposed to fail CI when the tracked
web/lib/facts.generated.tsfile is stale. The current workflow regenerates that tracked file before running the drift check, so CI can self-heal the working tree and then compare fresh facts against freshly generated facts. That lets stale committed facts pass.Current behavior
web/lib/facts.generated.tsis tracked:git ls-files web/lib/facts.generated.ts # web/lib/facts.generated.tsThe web CI workflow regenerates it before checking drift:
.github/workflows/web.yml:35-44npm run prebuildisnode scripts/derive-facts.mjs:web/package.json:8check-facts.mjsthen readsweb/lib/facts.generated.tsas the committed source of truth, but at that point the workflow may already have rewritten it:web/scripts/check-facts.mjs:36-50web/scripts/check-facts.mjs:105-122Local evidence from the current candidate shows the file is tracked and drifted in the working tree:
Desired behavior
web/lib/facts.generated.ts, or verify that regeneration produces no tracked diff.facts.generated.tsis tracked or ignored.Repro or evidence
Inspect the workflow order and tracked file state:
The workflow runs
prebuildbeforecheck:facts, whilefacts.generated.tsis tracked.Acceptance criteria
web/lib/facts.generated.tsis stale in the committed tree.npm run check:factsruns beforenpm run prebuild, or CI runsgit diff --exit-code web/lib/facts.generated.tsafter generation.facts.generated.tsis gitignored if it remains tracked.cd web && npm run check:factsstill passes when committed facts match the workspace.Related