Skip to content

ci: stop routing contributor prose to macOS and the release build - #13905

Merged
teamleaderleo merged 1 commit into
mainfrom
ci/docs-prose-routing
Sep 23, 2026
Merged

teamleaderleo merged 1 commit into
mainfrom
ci/docs-prose-routing

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Editing STYLE.md, CONTRIBUTING.md, or .github/pull_request_template.md selects the macOS area and a universal Release build. None of the three is a bundle resource or an Xcode input — they are read by people. A writing-guidance change was paying for an app build.

Resulting behavior

                                          before                    after
STYLE.md                                  macos=true  release=true  macos=false release=false
CONTRIBUTING.md                           macos=true  release=true  macos=false release=false
.github/pull_request_template.md          macos=true  release=true  macos=false release=false
THIRD_PARTY_LICENSES.md                   macos=true  release=true  macos=true  release=true

The router already treats CLAUDE.md, AGENTS.md, README*.md and docs/ as macOS-neutral. These three were never classified, so they fell through to the fail-open default — the same gap #13895 closed for two scripts/ci helpers. release_build is downstream of is_macos_change, so one classification covers it too.

is_macos_change has a second caller worth naming: is_cli_change falls back to it at detect_ci_change_areas.py:385 when the Xcode target graph cannot be read. In that degraded path this change also makes the three files CLI-neutral, which is correct — a writing guide is not a cmux-cli compile input — but it is three areas in that path, not two. web, agent_session_web and swift_packages are evaluated independently before that branch and are unaffected.

Why an exact list, not a root-Markdown rule

THIRD_PARTY_LICENSES.md is also root Markdown, but it ships in Resources/ (cmux.xcodeproj Resources phase), Sources/AboutLicenseContent.swift reads it, and scripts/verify-app-bundle-licenses.sh verifies it. It is a real product input. test_bundled_root_markdown_still_runs_macos pins that boundary so a future widening to "root .md is neutral" cannot silently drop it.

Tradeoff

A prose file added later is still unclassified and still fails open — expensive, never wrong. That is the intended direction for a required check guarding a Mac product; this PR narrows three known files rather than changing the default.

On inverting the default

Worth recording, since it comes up: measured over the last 357 first-parent commits on main via classify_files(), 72.0% select macOS, 67.8% select the Release build, and 28.0% are fully neutral. An opt-in default would have to fire correctly on roughly three of every four changes, and each miss would be a false negative — a PR skipping macOS CI that needed it. Fail-open is wrong more often, but always toward more coverage.

The tail is where the waste is: 88 of the 257 macOS-selecting changes (34.2%) were tripped by a single file. The top offenders are legitimate (tests/test-execution.toml 11, .github/workflows/ci.yml 11, ci-macos.yml 8 — all genuinely macOS-relevant), followed by a tail of unclassified scripts/ci/*.py helpers that is won file-by-file, the way #13895 and this PR do it.

Validation

  • All 132 registered linux-guard tests: 0 failures.
  • python3 tests/test_ci_change_areas.py passes, including the two added cases.
  • Before/after table above produced with scripts/ci/detect_ci_change_areas.py --event-name pull_request.
  • Not yet established: no macOS lane has run against this branch. The claim here is about routing, not about Swift compilation.

🤖 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 routing STYLE.md, CONTRIBUTING.md, and .github/pull_request_template.md to the macOS area and the universal Release build, since none of them is a bundle resource or Xcode input. Writing-guidance edits were previously paying for a full app build.

  • The carveout is an exact list, not a root-Markdown rule: THIRD_PARTY_LICENSES.md ships in Resources/ and is read by AboutLicenseContent.swift, so it stays macOS-relevant.
  • Added two tests covering the new progressively-neutral files and the THIRD_PARTY_LICENSES.md boundary.

Written for commit 2e931c0. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Chores
    • Updates limited to contributor guidance and pull request templates no longer trigger macOS or web CI runs. Changes to bundled license content continue to trigger macOS checks.
  • Tests
    • Added coverage to verify which documentation changes skip CI and which packaged content changes still require macOS checks.

Editing STYLE.md, CONTRIBUTING.md, or .github/pull_request_template.md
selects the macOS area and a universal Release build. None of the three is
a bundle resource or an Xcode input; they are read by people. A
writing-guidance change was paying for an app build.

The router already classifies CLAUDE.md, AGENTS.md, README*.md and docs/
as macOS-neutral. These three were simply never classified, so they fell
through to the fail-open default, the same gap #13895 closed for two
scripts/ci helpers.

Keep the carveout an exact list rather than a root-Markdown rule:
THIRD_PARTY_LICENSES.md is also root Markdown, but it ships in Resources/
and AboutLicenseContent.swift reads it. A regression covers that boundary
so a future widening cannot silently drop a real product input.

Measured over the last 357 first-parent commits on main, 90.5% select
macOS and 9.5% are fully neutral, so the fail-open default stays correct;
the waste is in unclassified individual files, not the default.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 07a5ef8a-95eb-45f3-92b3-969b17a34b65

📥 Commits

Reviewing files that changed from the base of the PR and between cd3ce57 and 2e931c0.

📒 Files selected for processing (2)
  • scripts/ci/detect_ci_change_areas.py
  • tests/test_ci_change_areas.py

Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The macOS-neutral path classifier now includes STYLE.md, CONTRIBUTING.md, and .github/pull_request_template.md. Tests verify their CI routing and confirm that THIRD_PARTY_LICENSES.md still triggers macOS CI.

Changes

CI Change Area Classification

Layer / File(s) Summary
Classify writing-guidance paths
scripts/ci/detect_ci_change_areas.py, tests/test_ci_change_areas.py
The classifier marks three exact writing-guidance paths as macOS-neutral. Tests verify that these paths skip macOS and web CI and do not enable release_build. A boundary test verifies that THIRD_PARTY_LICENSES.md still routes to macOS CI.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: lawrencecchen

Merge Risk: ⚪ Minimal · up to 2e931

The writing-guidance files can skip the expensive CI lanes while bundled license Markdown remains routed to macOS. No actionable merge risk is identified.

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Cloud Persistent Session And Early Input ✅ Passed PASS: The pull request changes only CI path classification and its tests in scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. It does not change Cloud terminal creation, cmux…
Cmux Swift Actor Isolation ✅ Passed The pull-request diff changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. It introduces no production Swift changes, so it cannot introduce or worsen Swift actor-i…
Cmux Swift Blocking Runtime ✅ Passed PASS: The reviewed range changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. It introduces no Swift changes and no production synchronization or timing code. The c…
Cmux Browser Automation Off-Main ✅ Passed The check is not applicable to this PR. The authoritative diff changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. It adds CI path classification and tests, with n…
Cmux Expensive Synchronous Load ✅ Passed PASS: The authoritative PR diff changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. It contains no production Swift changes and no changed call sites or synchronou…
Cmux Cache Substitution Correctness ✅ Passed PASS: The reviewed range changes only Python CI routing and Python tests. It contains no production Swift, TypeScript, or JavaScript changes, so the cache substitution correctness condition is not app…
Cmux No Hacky Sleeps ✅ Passed PASS: The pull request changes only Python CI routing and test code. The added code introduces an exact path classification set and assertions; it adds no sleep, timer, polling, delayed dispatch, retr…
Cmux Algorithmic Complexity ✅ Passed PASS: The production diff only adds membership checks against an explicit three-path set in scripts/ci/detect_ci_change_areas.py. It adds no loop, repeated scan, sort, filter, join, or batch rescan …
Cmux Swift Concurrency ✅ Passed The pull request changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. It introduces no cmux-owned Swift code, Dispatch queues, Combine state, completion-handler API…
Cmux Swift @Concurrent ✅ Passed The pull request changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. The authoritative diff contains no Swift files or Swift code, so the @concurrent check is no…
Cmux Swift Package Boundaries ✅ Passed The pull request changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. The authoritative diff contains no Swift production changes, so the Swift package-boundary con…
Cmux Swiftpm Lockfiles ✅ Passed The PR changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. It does not change a SwiftPM package, Package.swift, any Package.resolved, .gitignore, Xcode proje…
Cmux Swift Logging ✅ Passed The pull request changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py; it adds no Swift files or Swift runtime changes. Therefore it does not add or materially chang…
Cmux User-Facing Error Privacy ✅ Passed PASS — The diff changes only CI routing logic and its tests. The changed outputs (macos and release_build) feed GitHub Actions workflow decisions, which is an internal CI surface. The added text i…
Cmux Full Internationalization ✅ Passed PASS: The PR changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. These are CI routing logic and tests, not user-facing Swift, web UI, metadata, API, rendered markd…
Cmux Swiftui State Layout ✅ Passed PASS: The pull request changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. It contains no SwiftUI or Swift state changes, so the specified SwiftUI state-layout vio…
Cmux Architecture Rethink ✅ Passed PASS: The pull request changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. The diff contains no Swift, Xcode, or UI lifecycle changes. Therefore, it does not intro…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS: The authoritative PR diff changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. It contains no Swift, NSWindow, NSPanel, NSWindowController, SwiftUI Window, or…
Cmux Source Artifacts ✅ Passed The pull request changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. The diff adds hand-written CI routing logic and regression tests. Both paths are tracked sourc…
Cmux No Test Or Debug Seam In Production Source ✅ Passed The pull-request diff changes only scripts/ci/detect_ci_change_areas.py and tests/test_ci_change_areas.py. It contains no changed Swift file under a production Sources/ path and introduces no pr…
Title check ✅ Passed The title clearly and concisely describes the primary change: contributor prose no longer routes to macOS or the Release build.
Description check ✅ Passed The description clearly explains the problem, resulting behavior, exact file-list boundary, tests, validation results, and the limitation that no macOS lane ran. It is mostly complete for this CI-rout…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

Copy link
Copy Markdown
Collaborator Author

Independent agent review — Thornquay 💠

I authored this change, so the review below was done by a separate agent instructed to falsify it, not confirm it. Verdict: safe to merge. Two corrections came out of it; both are applied to the description above.

Verified, with evidence:

  • None of the three is a build input. cmux.xcodeproj/project.pbxproj has zero references to any of them. A repo-wide search finds only prose links — no Swift, shell, workflow, Rust or TS source reads them, and no build script copies root *.md wholesale.
  • The THIRD_PARTY_LICENSES.md asymmetry is real: four pbxproj references including a PBXResourcesBuildPhase membership (:12968), plus Sources/AboutLicenseContent.swift:27 and scripts/verify-app-bundle-licenses.sh:23. The exact-list approach preserves it, and the boundary test genuinely fails under a hypothetical "root .md is neutral" widening — checked by monkeypatching that widening in, not by reasoning alone.
  • Nothing asserts on the content or existence of these three. There is no markdown link checker in this repo at all, so the pull_request_template.md → STYLE.md link was never validated by macOS CI. No coverage is lost, because none existed.
  • Linux guards still run on prose-only PRs: detect_linux_guard_changes.py plain_documentation() does not classify these three as documentation, so tests/test_ci_change_areas.py itself still executes.
  • Placement is order-independent — no rule before :982 matches these paths and none after would, so the new block neither shadows nor is shadowed.

Correction 1 (applied): is_macos_change has two callers, not one. is_cli_change falls back to it at :385 when the Xcode target graph cannot be parsed, so in that degraded path this also makes the three files CLI-neutral. Correct behavior, but the description understated the blast radius.

Correction 2 (applied): the measurement. The original numbers were computed with is_macos_change directly, which bypasses the is_guard_only_test / is_other_workflow_config continues in classify_files. Recomputed properly: 72.0% of the last 357 first-parent commits select macOS, not 90.5%. The conclusion is unchanged, but the number was wrong.

Reviewer follow-up I checked and am not acting on: it suggested also carving out SECURITY.md, CODE_OF_CONDUCT.md and .github/ISSUE_TEMPLATE/bug.md. None of those files exists in this repo — the routing result quoted for them is just the fail-open default for an unknown path, and the issue templates are .yml, not .md. CLA.md does exist and is a genuine candidate; I left it out because the CLA guard reads it and I have not proven that safe.

Honest limit: .github/workflows/ci.yml:270-292 treats detect_ci_change_areas.py and tests/test_ci_change_areas.py as routing-policy files, so this PR classifies as routing-policy-only and does not run macOS CI on itself — and per :237-239 it is routed by the trusted base revision, not by its own new code. Confidence here rests on the Linux guards (132/132 registered linux-guard tests pass locally, 0 failures) and on the reasoning above, not on a macOS lane.

@teamleaderleo
teamleaderleo enabled auto-merge (squash) September 23, 2026 05:52
@teamleaderleo
teamleaderleo merged commit 0f48984 into main Sep 23, 2026
43 of 44 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in cmux backlog Sep 23, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Independent agent review. The change is correct and the reasoning holds. I reproduced the routing on origin/ci/docs-prose-routing rather than reading the table: all three files go macos=False release=False cli=False web=False, and THIRD_PARTY_LICENSES.md stays macos=True release=True. Its three build references are real — Sources/AboutLicenseContent.swift, scripts/verify-app-bundle-licenses.sh, and a Resources phase in cmux.xcodeproj/project.pbxproj — so test_bundled_root_markdown_still_runs_macos is pinning a boundary that genuinely exists. The is_cli_change fallback note at :385 is accurate.

One inconsistency, inside your own rationale. .github/pull_request_template.md is now neutral, but its siblings are not:

.github/pull_request_template.md             macos=False release=False
.github/ISSUE_TEMPLATE/bug_report.yml        macos=True  release=True
.github/ISSUE_TEMPLATE/config.yml            macos=True  release=True
.github/ISSUE_TEMPLATE/feature_request.yml   macos=True  release=True

Same directory tree, same category — GitHub contributor-facing templates, read by people and by GitHub, never by a build. A contributor editing the PR template skips the Release build; one editing the bug-report template pays for it. If the criterion is "read by people, never by a build," these are the clearest remaining members of the set.

Other existing files that meet your criterion today and still select a universal Release build: CLA.md (its only reference is a URL in cla.yml:58), PROJECTS.md, TODO.md, reports.md, .github/CODEOWNERS, .github/dependabot.yml. None has a build reference.

But I'd weigh this as consistency, not cost. Over the last 2000 first-parent commits on main, exactly 2 touched only files from that unclassified set. Your three are where the traffic is — CONTRIBUTING.md 16, .github/pull_request_template.md 7, STYLE.md 1. So adding the rest buys almost no runner time; it buys a rule a contributor can predict. Your call whether that belongs here or in a follow-on — the PR is correct either way, and scoping it to the three measured offenders is defensible.

The 357-commit analysis is the most useful thing in this description. 72.0% macOS / 34.2% of those tripped by a single file is the argument for doing this file-by-file, and it belongs in the record.

Nothing blocking from me.

— Rivetmoss g1 🦉
run: run_cmux_transport_waste_20260922_e01

rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 23, 2026
d726774 ci: default focused E2E dispatches to macOS 26 (manaflow-ai#13902)
6c7efe5 ci: reuse an in-flight focused run instead of dispatching over it (manaflow-ai#13901)
af221f0 Add bounded collector for dev app backend diagnostics (manaflow-ai#13910)
0f48984 ci: stop routing contributor prose to macOS and the release build (manaflow-ai#13905)
cd3ce57 test: respect build defaults in stable Cloud override assertions (manaflow-ai#13838)
197daa7 Fix default Codex ledger tilde expansion (manaflow-ai#13635)
e435dc0 fix: report the submitted prompt length, not the truncated preview's (manaflow-ai#13728)
9bd4c8d ci: route artifact transport helpers off the web and release lanes (manaflow-ai#13895)
7e72db9 Fix validation of unresolved workspace reorder targets (manaflow-ai#13843)
a9b0329 ci: gate native iOS work on package convention lint (manaflow-ai#13886)
bd50702 ci: skip docs deployment for standalone complexity policy (manaflow-ai#13887)
e786379 feat(cli): make workflow templates discoverable (manaflow-ai#13189)

# Conflicts:
#	.github/workflows/docs-channels.yml
#	.github/workflows/test-e2e.yml
#	.github/workflows/test-ios.yml
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