chore(ci): exclude Storybook stories from PR tiering - #2989
Conversation
Story files are dev-only fixtures that never ship in the app bundle, so their churn should not count toward production line totals or the cross-layer signal in the PR triage classifier. Add a .stories.[jt]sx? pattern to TEST_FILE_PATTERNS so they're excluded like tests.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🟢 Tier 1 — TrivialDocs, images, lock files, a dependency bump, or an automated release. No functional code changes detected. Why this tier:
Review process: Auto-merge once CI passes. No human review required. Stats
|
Greptile SummaryThis PR classifies Storybook story files as test fixtures so their churn does not affect production-line or frontend-cross-layer PR tiering.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| .github/scripts/pr-triage-classify.js | Extends the existing test-file classifier to recognize Storybook story filename suffixes. |
| .github/scripts/tests/pr-triage-classify.test.js | Adds direct assertions that TypeScript and TSX Storybook files are classified as tests. |
Reviews (2): Last reviewed commit: "Merge branch 'main' into claude/ignore-s..." | Re-trigger Greptile
|
review: Deep Review✅ No critical issues found. The change routes 🟡 P2 -- recommended
🔵 P3 nitpicks (1)
Reviewers (3): correctness, testing, maintainability. Testing gaps: No tier-level assertion that a |
E2E Test Results✅ All tests passed • 307 passed • 1 skipped • 1128s
Tests ran across 4 shards in parallel. |
Why
The PR triage classifier (
.github/scripts/pr-triage-classify.js) currently treats Storybook story files (*.stories.tsx/*.stories.ts) as regular production code. Their churn counts towardprodLines— which drives the tier — and flips on thetouchesFrontendcross-layer signal.Stories are dev-only fixtures: they're never included in the shipped app bundle and carry no production risk. They belong with tests and docs in the "excluded from tiering" bucket, not with reviewable production code.
What
\.stories\.[jt]sx?$pattern toTEST_FILE_PATTERNSso stories are excluded from line-counting exactly like.test.*/.spec.*files already are.isTestFileunit test.No behavior change for any non-story file. All 113 classifier tests pass.