Skip to content

ci(cmux-next): fail god-file checks only on a change's own growth - #18165

Merged
teamleaderleo merged 4 commits into
feat-cmux-nextfrom
ci/godfile-check-pr-scope
Oct 7, 2026
Merged

teamleaderleo merged 4 commits into
feat-cmux-nextfrom
ci/godfile-check-pr-scope

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The 1000-line god-file limit stays. What changes is whose failure it is. On 2026-10-06, acpmux profiles.rs (1107 lines) and requests.rs (1004) landed over budget on feat-cmux-next, and then every unrelated pull request failed cmux-next checks until someone split them.

scripts/cmux-next/check-no-godfiles.sh now takes --base REF:

  • An entry over its budget, or over its baseline numbers, fails only when it is bigger than in REF. That means the change pushed it past the limit, grew it while it was already over, or added it.
  • An entry already over in REF that this change did not grow prints a note ("over budget on the base too; this change did not grow it").
  • This covers the Swift per-file limits (lines and top-level types), Swift type spans and cmux-tui Rust files.
  • REF is measured from a git archive, and only when the head would fail, so a passing PR pays nothing extra. A failing head roughly doubles the step's time (about 19 s to 38 s for the Rust half here).
  • An unknown REF prints a warning and checks every file, as without --base.

Wiring:

  • cmux-next checks: pull requests pass --base HEAD^1 (the merge commit's first parent), and the checkout fetches depth 2. Pushes keep checking every file, so base drift still shows on the push run and its attribution.
  • cmux-tui.yml lint: the exact commit's merge base with feat-cmux-next, from the compare API, fetched alone at depth 1. If that can't be read or fetched, it checks every file.

Baseline shrinks never fail. The existing check only prints a note asking for --update-baseline; this PR keeps that and adds no write-back.

Testing

  • Red first: 2a7f14d adds GodfilePullRequestScope (temp repos: an unrelated change over base reds, growth of an over-budget file or type, pushing a file past budget, a new file, shrinks, a merge commit's first parent, an unknown base, and the CI wiring). 8 failed before the fix. python3 -m unittest tests.test_cmux_next_checks_workflow: 48 OK after.
  • On this repository: --only rust --base $(git merge-base HEAD origin/feat-cmux-next) passes and notes profiles.rs and requests.rs. Without --base, it fails on them as before. --only swift passes in 57 s (60 s before).
  • actionlint is clean on both workflows.
  • python3 scripts/verify-local.py: the same 4 failures as origin/feat-cmux-next (swift-syntax, localization, localization-defaults, package-groups).

Changelog

none

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Stops god-file checks from failing every pull request because a file on the base branch is already over its limit. The check now takes a --base REF and fails only when a file's numbers grew relative to that REF; an over-budget file that this change did not grow prints a note instead. CI wires pull requests to compare against the merge commit's first parent, and cmux-tui.yml lint against the merge base with feat-cmux-next. Pushes still check every file.

The base is measured from a git archive of REF only when the check would fail, so a passing PR pays no extra time.

Written for commit 9fb9ded. Summary will update on new commits.

Review in cubic Turn on auto-fix


Note

Low Risk
CI and lint-script behavior only; no runtime product paths. Mis-scoped bases could miss or over-report god-file growth, mitigated by tests and push/full-check fallbacks.

Overview
God-file CI no longer fails unrelated pull requests when feat-cmux-next already has over-limit Swift or cmux-tui Rust files. check-no-godfiles.sh gains --base REF: violations fail only when line/function (or Swift type) counts grew versus that ref; unchanged over-budget entries become NOTEs. Base measurement uses git archive only when the head check would fail, so clean PRs avoid extra work.

cmux-next checks pass --base HEAD^1 on pull requests (checkout fetch-depth: 2); pushes still run the full tree check. cmux-tui.yml lint uses the commit’s merge base with feat-cmux-next via the compare API when fetchable, otherwise falls back to checking every file.

GodfilePullRequestScope in tests/test_cmux_next_checks_workflow.py locks in growth-only failures and the workflow wiring.

Reviewed by Cursor Bugbot for commit 9fb9ded. Bugbot is set up for automated code reviews on this repo. Configure here.

teamleaderleo and others added 2 commits October 6, 2026 18:11
A god file already over budget on feat-cmux-next (acpmux profiles.rs and
requests.rs) failed every unrelated pull request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
check-no-godfiles.sh takes --base REF. An entry over budget fails only
when it is bigger than in REF (pushed past its budget, grown while over,
or new); one this change did not grow is a note. REF is measured from an
archive, and only when the head would fail. The cmux-next checks pass
HEAD^1 on pull requests; the cmux-tui lint passes the commit's merge base
with feat-cmux-next. Pushes still check every file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c5228ad0-f5ba-4a72-ad88-3c420d7d683d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@teamleaderleo
teamleaderleo merged commit c74194f into feat-cmux-next Oct 7, 2026
69 of 83 checks passed
@teamleaderleo
teamleaderleo deleted the ci/godfile-check-pr-scope branch October 7, 2026 03:40
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/37567938071 at f43f800 failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at 86019f6. This pull request is one of 3 merged since: #18105, #18198, #18165.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/37568316271 at 169c1da failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at 86019f6. This pull request is one of 3 merged since: #18105, #18198, #18165.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/37568445230 at 3c11c5a failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at 86019f6. This pull request is one of 3 merged since: #18105, #18198, #18165.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/37568512187 at e8aa5c1 failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at 86019f6. This pull request is one of 3 merged since: #18105, #18198, #18165.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/37569422881 at 552e7cb failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at 86019f6. This pull request is one of 4 merged since: #18105, #18198, #18165, #18205.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/37569270312 at f60b3d7 failed: cmux-next checks (god files, concurrency, crash safety, l10n), cmux-next generated files.
Those jobs last passed at 86019f6. This pull request is one of 4 merged since: #18105, #18198, #18165, #18205.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/37569941713 at 46215de failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at 86019f6. This pull request is one of 4 merged since: #18105, #18198, #18165, #18205.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/37569551101 at 5976099 failed: cmux-next checks (god files, concurrency, crash safety, l10n), cmux-next generated files.
Those jobs last passed at 86019f6. This pull request is one of 4 merged since: #18105, #18198, #18165, #18205.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/37570246034 at e8a5696 failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at 86019f6. This pull request is one of 5 merged since: #18105, #18203, #18198, #18165, #18205.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

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.

1 participant