Repository navigation
ci(decision-model-lint): Skip PRs over 200 files or 10k added lines - #131821
Merged
Merged
Conversation
Mass rewrites such as formatter sweeps lint thousands of files, each with several model calls, which can exhaust the OpenRouter key's spend limit. Over 99.8% of merged PRs fall under both limits. Co-Authored-By: Jeremy Stanley <[email protected]>
gricha
approved these changes
Nov 19, 2026
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.
Decision model lint makes several model calls per changed file (one per suite), so mass rewrites cost a lot. #131758 (oxfmt sweep, 4,795 files) is the likely reason the OpenRouter key hit its spend limit today; @lcian spotted it.
The
lintjob now runs only when the PR changes at most 200 files and adds at most 10,000 lines. The check comes from thepull_requestevent payload, so a skipped PR never checks out the repo or installs packages. Only additions count, because the linter lints added, changed, and renamed files (--diff-filter=ACMR) and never lints deleted ones.Thresholds come from the 6,388 PRs merged into this repo from 2026-08-20 to 2026-11-19:
Together the two limits skip 8 of those PRs (0.13%): 7 over 200 files (codemods and repo-wide sweeps) and 1 with 3 files and about 16.7k added lines.
A skipped job counts as passing for required checks, so these PRs are not blocked. An earlier lint comment on the PR stays unchanged if the PR later grows past a limit.
Open decision: the limits are hardcoded in this workflow. getsentry/sentry-php and getsentry/seer run the same linter, so a long-term home could be a file or call limit in getsentry/decision-model-linter itself.
via @azulus.
--
View Session [Sentry]