Skip to content

fix(schema-canary): scope PR runs by canary inputs, not every changed file - #1591

Merged
gabrielseco merged 1 commit into
mainfrom
fix/schema-canary-scope-ignores-non-inputs
Oct 16, 2026
Merged

gabrielseco merged 1 commit into
mainfrom
fix/schema-canary-scope-ignores-non-inputs

Conversation

@gabrielseco

@gabrielseco gabrielseco commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

scripts/schema-canary/changed-countries.ts printed all whenever a PR changed any file other than jsonSchemaVersions.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 in pull_request.paths (other than the pins file) widen the scope to all. Docs, e2e and example files are ignored. The list is commented as to be kept in sync with schema-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 all countries when the only extra changes are docs, e2e, or other example files alongside a pin bump in jsonSchemaVersions.ts.

The script introduces exported touchesOtherInputs, which widens scope to all only when changed files match an explicit allowlist (and anything under scripts/schema-canary/), documented to stay aligned with pull_request.paths in the schema-canary workflow. main now 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.

… 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>
@github-actions

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-o80y78alo-remotecom.vercel.app
Latest Commit:76a6f9c

Deployed with vercel-action

@github-actions

Copy link
Copy Markdown
Contributor

Deploy preview for adp-cost-calculator ready!

Project:adp-cost-calculator
Status: ✅  Deploy successful!
Preview URL:https://adp-cost-calculator-g4i3atewd-remotecom.vercel.app
Latest Commit:76a6f9c

Deployed with vercel-action

@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage Report

⚠️ Coverage decreased

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

@gabrielseco
gabrielseco merged commit 6614eeb into main Oct 16, 2026
23 of 24 checks passed
@gabrielseco
gabrielseco deleted the fix/schema-canary-scope-ignores-non-inputs branch October 16, 2026 09:49
@gabrielseco gabrielseco mentioned this pull request Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants