Skip to content

ci(decision-model-lint): Skip PRs over 200 files or 10k added lines - #131821

Merged
azulus merged 1 commit into
masterfrom
ci/decision-model-lint-skip-large-prs
Nov 19, 2026
Merged

azulus merged 1 commit into
masterfrom
ci/decision-model-lint-skip-large-prs

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

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 lint job now runs only when the PR changes at most 200 files and adds at most 10,000 lines. The check comes from the pull_request event 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:

p99 p99.9 max
changed files 51 240 3,256
added lines 1,662 4,664 40,991

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]

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]>
@azulus
azulus marked this pull request as ready for review November 19, 2026 17:13
@azulus
azulus requested a review from a team as a code owner November 19, 2026 17:13
@sentry-junior
sentry-junior Bot requested a review from azulus November 19, 2026 17:13
@azulus
azulus requested a review from gricha November 19, 2026 17:18
@azulus
azulus merged commit 38f3645 into master Nov 19, 2026
68 checks passed
@azulus
azulus deleted the ci/decision-model-lint-skip-large-prs branch November 19, 2026 17:22
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.

2 participants