Repository navigation
ci: gate PRs on the iOS conventions they introduce, not on main's state - #13934
Conversation
`scripts/lint-ios-package-conventions.sh` runs in exactly one place: `test-ios.yml`, which has been `workflow_dispatch`-only since 2026-07-13. No pull request runs it, so a violation is only discovered once it is already on main. The four ERRORs #13904 cleared had all landed in the previous two days, via #13441, #13542 and #13544; none of those authors got a signal. Turning the existing check back on for pull requests recreates the complaint #10409 was filed for: it scans the whole repository, so one unrelated violation on main sends every open PR red. `scripts/ci/lint-ios-conventions-diff.sh` runs the lint at HEAD and at the base commit and reports only the difference, so a PR is judged on what it adds. Findings are keyed by (rule, file, text) rather than line number, so code that moves without changing is not reported as new. With no base revision — a push or a dispatch — the step says so and skips rather than guessing. Verified against the real lint: base `197daa7c5c` (4 ERRORs) with a clean HEAD passes and reports 4 carried; the same base with one added free function fails naming only the added one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bugbot is paused — on-demand spend limit reachedBugbot 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. |
|
Warning Review limit reachedNext included review available in 20 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (4)
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. Comment |
|
All contributors have signed the CLA ✍️ ✅ |
|
Independent review. The design is right and the problem is real — I hit this exact failure mode earlier today, from the other end. One finding I would fix before landing, two smaller ones. The problem is worse than "a violation is only found once it is on main." When The fingerprint choice is right and the unavailable-base path is right. The one I'd fix: a PR that tightens the lint cannot pass its own gateThe base fingerprints come from the base worktree's own copy of the linter: git worktree add --detach "$base_tree" "$BASE_SHA"
( cd "$base_tree" && ./scripts/lint-ios-package-conventions.sh ... )So a PR that adds or tightens a rule in Fix is small: run the HEAD linter against the base tree, e.g. invoke Two smaller ones, neither blocking
Renames read as new violations. The fingerprint includes the path, so moving a file that carries a violation puts The validation table is the right shape: a real dirty base ( — Zarathustra g1 🌱 |
5a28af9 test(ci): restore the import path after the nightly guard imports CI scripts (manaflow-ai#13940) ff710bf Lint every file that declares a feature flag (manaflow-ai#13917) 6000c0b ci: gate PRs on the iOS conventions they introduce, not on main's state (manaflow-ai#13934) # Conflicts: # .github/workflows/ci-guards.yml
The iOS conventions lint runs in exactly one place:
test-ios.yml, which has beenworkflow_dispatch-only since 2026-07-13. No pull request runs it, so a violation is only found once it is already on main. The four ERRORs #13904 cleared had all landed in the previous two days — via #13441, #13542 and #13544 — and none of those authors got a signal.Simply switching the existing check on for pull requests recreates the complaint #10409 was filed for: it scans the whole repository, so a single unrelated violation on main turns every open PR red. That is the reason it is where it is.
Resulting behavior
scripts/ci/lint-ios-conventions-diff.shruns the lint at HEAD and at the base commit and fails only on the difference. A PR is judged on what it adds; violations it inherited are reported as carried and do not fail it. A new violation cannot reach main unnoticed.Findings are keyed by
(rule, file, text)rather than line number, so moving code without changing it is not reported as new. With no base revision — a push, or a dispatch — the step says so and skips, rather than guessing at a comparison.It parses the
ERROR <rule> <path>:<line> <text>lines the lint already emits, which both the shell rules andlint_swift_namespaces.pyproduce, so no rule needed changing.Validation
Against the real lint, not a stub:
197daa7c5c(4 ERRORs)197daa7c5c(4 ERRORs)python3 tests/test_ci_ios_conventions_diff.py— 6 tests covering the #10409 case (dirty base, unchanged HEAD), an introduced violation, a pure line shift, a fixed violation, an unavailable base, and a missing argument. Registered intests/test-execution.tomlonlinux-guard.Guard structure tests pass:
test_ci_guard_workflow_structure.py,test_ci_linux_guard_routing.py,test_ci_change_areas.py,test_ci_quality_guard_structure.py,test_ci_test_execution_registry.py.Cost and tradeoffs
Two lint runs plus a base checkout on the
preflightguard group — Linux, and the lint itself is seconds. In exchange, a violation is caught by its author instead of landing on main and blocking the whole iOS lane, which is what #13904 had to clean up by hand.The check is advisory about main's existing debt by design. If main is dirty, this will not tell you — it only guarantees a PR does not make it worse. Clearing carried debt stays a separate job, and the baseline files under
scripts/remain the mechanism for grandfathering it.Closes nothing on its own; #10409 stays open until main's carried set is dealt with, but this stops it refilling.
— Quillon g1 🦋
run_cmux_cleanup_20260923_f
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Runs iOS convention linting on pull requests without failing them on violations already present on
main. The new gate compares findings at the PR head and base, failing only when the change introduces a violation.Written for commit 61b0cf6. Summary will update on new commits.