Repository navigation
fix(schema-canary): scope PR runs by canary inputs, not every changed file - #1591
Merged
Merged
Conversation
… file changed-countries.ts fell back to "all" whenever a PR touched any file besides the pins file, so a pin bump that also updated docs or e2e (for example #1589) ran every country. Only the files the workflow already lists as inputs now widen the scope. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
|
Deploy preview for remote-flows ready!
Deployed with vercel-action |
Contributor
|
Deploy preview for adp-cost-calculator ready!
Deployed with vercel-action |
2 tasks
Contributor
📊 Coverage Report
|
| Metric | Current | Previous | Change | Status |
|---|---|---|---|---|
| Lines | 89.58% | 89.59% | -0.02% | 🔴 |
| Statements | 89.45% | 89.47% | -0.02% | 🔴 |
| Functions | 88.48% | 88.48% | 0% | ⚪ |
| Branches | 81.21% | 81.24% | -0.02% | 🔴 |
Detailed Breakdown
Lines Coverage
- Covered: 5396 / 6024
- Coverage: 89.58%
- Change: -0.02% (-1 lines)
Statements Coverage
- Covered: 5461 / 6105
- Coverage: 89.45%
- Change: -0.02% (-1 statements)
Functions Coverage
- Covered: 1428 / 1614
- Coverage: 88.48%
- Change: 0% (0 functions)
Branches Coverage
- Covered: 3350 / 4125
- Coverage: 81.21%
- Change: -0.02% (-1 branches)
✅ Coverage check passed
jordividaller
approved these changes
Oct 16, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/schema-canary/changed-countries.tsprintedallwhenever a PR changed any file other thanjsonSchemaVersions.ts. A pin bump that also touched docs or e2e therefore ran the canary for every country.Why
Seen on #1589 (PRT v3 to v9): the PR also changed
PRT.md, the countries README and two e2e files, so the pinned canary job ran all countries instead of PRT only.What changed
changed-countries.ts: only files the workflow lists inpull_request.paths(other than the pins file) widen the scope toall. Docs, e2e and example files are ignored. The list is commented as to be kept in sync withschema-canary.yml.changed-countries.test.ts: covers the pins file alone, pins plus docs/e2e (no widening) and each kind of real input (widening).Testing
vitest run scripts/schema-canary/changed-countries.test.ts(12 passed)No public API change.
🤖 Generated with Claude Code
Note
Low Risk
CI-only scoping logic for schema canary; wrong behavior would mean over- or under-running countries, with no production runtime impact.
Overview
Schema canary PR runs no longer fall back to
allcountries when the only extra changes are docs, e2e, or other example files alongside a pin bump injsonSchemaVersions.ts.The script introduces exported
touchesOtherInputs, which widens scope toallonly when changed files match an explicit allowlist (and anything underscripts/schema-canary/), documented to stay aligned withpull_request.pathsin the schema-canary workflow.mainnow calls that helper instead of treating any non-pins file as a full rerun trigger.Tests cover pins-only, pins plus docs/e2e (no widening), and each real canary input type (widening).
Reviewed by Cursor Bugbot for commit 76a6f9c. Bugbot is set up for automated code reviews on this repo. Configure here.