Skip to content

ci: make unit-ci compile, and fail when its unit tests skip - #14008

Merged
teamleaderleo merged 1 commit into
mainfrom
ci/unit-ci-must-run-unit-tests
Sep 23, 2026
Merged

teamleaderleo merged 1 commit into
mainfrom
ci/unit-ci-must-run-unit-tests

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

#13996 merged at a088ac12fb, a minute before the fix from its review (comment) was pushed. That fix is not on main.

As merged, unit-ci can turn a PR fully green without any app-host test running, and it happens in the ordinary way people use the label:

  1. A cmuxTests/ PR is pushed. Compile admission passes, and suite-coverage refuses the run.
  2. unit-ci is added and a fresh run starts. full_suite is still false, so the build-input reuse steps run. They find the earlier run that compiled the same inputs, and compile_admitted=true.
  3. macos-compile-admission skips. app-host-unit-tests runs only after an admission that succeeded in this run, so it skips too.
  4. macOS status requires app-host only under full_suite, so the skip passes. The label has already cleared suite-coverage. ci-status goes green.

Before #13996, suite-coverage at least refused that run.

Change

  • ci.yml: both reuse steps now skip under unit_suite, as they already do under the full suite. The existing block comment gave the reason ("the shards need the product"), and it now covers unit-ci.
  • ci-macos.yml macOS status: app-host-unit-tests is now required when macos and (full_suite or unit_suite). Any other route to a skip fails instead of passing. A caller that predates the input leaves it empty, which reads as not routed.

Testing

  • New test: test_a_unit_ci_run_cannot_pass_with_the_unit_tests_skipped fails on main. With each half of the fix reverted in turn, it still fails, so it catches both.
  • Test files: tests/test_ci_change_areas.py and tests/test_ci_product_publication.py pass.
  • Guard sweep: 136 of 137 ci-guards.yml commands pass. The failure is test_ghostty_zig_version_sync.sh, because the ghostty submodule isn't checked out locally.
  • actionlint: nothing beyond the SC2129 notes already on main.

Demo Video

Not applicable. This changes CI routing only.

Checklist

  • I tested the change locally
  • I added or updated tests for behavior changes
  • For iOS connectivity, auth, lifecycle, workspace or terminal changes, I updated the deterministic soak coverage or explained why existing coverage still applies (not applicable)
  • I updated docs/changelog if needed (not needed)
  • I requested bot reviews after my latest commit
  • All code review bot comments are resolved
  • All human review comments are resolved

— Ophelia g1 🍄
Run: run_cmux_main_red_triage_app_host_census_and_pr_review_20260923_07d8d17b

🤖 Generated with Claude Code


Summary by cubic

Fixes the CI hole where adding the unit-ci label could turn a PR fully green with no app-host unit tests run.

  • Build-input reuse steps now skip under unit_suite, matching full-suite behavior, so app-host tests always run behind a compile admission that succeeded in the same run.
  • macOS status now requires app-host-unit-tests under unit_suite, so a skip fails instead of passing.
  • Adds a regression test that fails on main and catches both halves of the fix.

Written for commit c94998d. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Unit-test CI runs now require the app-host unit tests to complete successfully. They can no longer pass when those tests are skipped or when a previously compiled product is reused.
    • macOS status checks now account for unit-test runs when determining whether the app-host unit tests are required. This makes CI results more reliably reflect whether the required tests actually ran.

unit-ci clears suite-coverage on the strength of `app-host unit tests`,
but it left the build-input reuse steps live. The usual way to use the
label is to add it after a first push, and that rerun finds an earlier
run that compiled the same inputs, sets compile_admitted, and skips
compile admission. App-host runs only behind an admission that
succeeded, so it skipped too, and macOS status did not require it
outside the full suite. The PR came out green having run no tests.

Skip reuse under unit-ci the way the full suite already does, and
make macOS status require app-host under unit-ci, so any other route
to a skip fails instead of passing.

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

@teamleaderleo teamleaderleo left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review. This is the fix posted on #13996 and pushed there as 6aad6c102f, cherry-picked onto 3c58b03f04 without changes. It changes three lines of workflow logic and adds one test.

Things I checked that aren't in the body:

  • ghosttykit_release and the compile_admitted output both read steps.unchanged_inputs.outputs.compile_admitted. When those steps skip, they fall back exactly as they already do under full_suite.
  • Forcing a compile under unit-ci costs one admission build per labeled run. The whole point of the label is to run tests against this run's product, so there's nothing cheaper that's still correct.

— Ophelia g1 🍄
Run: run_cmux_main_red_triage_app_host_census_and_pr_review_20260923_07d8d17b

@teamleaderleo
teamleaderleo enabled auto-merge (squash) September 23, 2026 15:50
@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: d497582e-052b-427a-9c9f-1d2c3b03f538

📥 Commits

Reviewing files that changed from the base of the PR and between 3c58b03 and c94998d.

📒 Files selected for processing (3)
  • .github/workflows/ci-macos.yml
  • .github/workflows/ci.yml
  • tests/test_ci_change_areas.py

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


📝 Walkthrough

Walkthrough

Unit-ci runs now compile the app host without reusing an earlier build. The macOS status check also requires app-host-unit-tests when unit_suite is enabled. A behavioral test verifies the compile conditions and status-check result.

Changes

Unit CI Requirements

Layer / File(s) Summary
Unit-ci compile admission
.github/workflows/ci.yml
The unchanged-input skip and earlier-run lookup steps do not run for unit-ci suites.
macOS unit-test status requirement
.github/workflows/ci-macos.yml, tests/test_ci_change_areas.py
The macOS status check reads the optional unit_suite input and requires app-host-unit-tests when macOS and either suite flag are enabled. The test checks compile-step conditions and verifies that skipped unit tests fail the status check.

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

Merge Risk: ⚪ Minimal · up to c9499

Unit-ci runs must compile and pass the app-host unit tests; no actionable merge risk remains after normal checks.

🚥 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 3 functions across 1 files. (2 skipped: 2 … 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 macOS CI workflow conditions and a CI regression test. The diff does not change Cloud terminal creation, cmux-tui clients, transports, manual renderers, input routi…
Cmux Swift Actor Isolation ✅ Passed PASS: The pull request changes only two YAML workflow files and one Python test file. The authoritative diff contains no Swift files or Swift declarations, so it does not introduce or worsen any Swift…
Cmux Swift Blocking Runtime ✅ Passed The review-scoped diff changes only two GitHub workflow YAML files and one Python test file. It changes no Swift or Apple project source and adds no blocking or timing synchronization primitive covere…
Cmux Browser Automation Off-Main ✅ Passed PASS: The pull request changes only CI workflow YAML and CI regression tests. It does not modify Sources/TerminalController.swift, ControlCommandExecutionPolicy.swift, browser socket routing, WebK…
Cmux Expensive Synchronous Load ✅ Passed PASS: The authoritative PR diff changes only two GitHub Actions YAML files and one Python test file. It adds no production Swift changes and no synchronous agent-history or workspace-load call sites. …
Cmux Cache Substitution Correctness ✅ Passed PASS: The PR changes only GitHub Actions YAML and a Python test. It does not introduce production Swift, TypeScript, or JavaScript changes, so the cache-substitution correctness check is not applicabl…
Cmux No Hacky Sleeps ✅ Passed PASS: The PR changes only GitHub Actions workflow YAML and a Python test. The rule explicitly excludes workflow YAML, and the added test contains no production delay or synchronization primitive. The …
Cmux Algorithmic Complexity ✅ Passed The PR changes only CI workflow predicates, a scalar unit_suite check, and test assertions. It adds no production Swift, TypeScript, JavaScript, shell, or runtime collection algorithm. The changed s…
Cmux Swift Concurrency ✅ Passed The pull request changes only GitHub Actions YAML and a Python test. It changes no Swift source or Swift concurrency patterns, so this check is not applicable.
Cmux Swift @Concurrent ✅ Passed PASS: The authoritative PR diff changes only two YAML workflows and one Python test. It adds no Swift files or Swift concurrency syntax, so the Swift @concurrent check is not applicable.
Cmux Swift Package Boundaries ✅ Passed The reviewed range changes only two GitHub Actions YAML workflows and one Python test file. It contains no production Swift changes, so it cannot violate the Swift package boundary rule.
Cmux Swiftpm Lockfiles ✅ Passed The PR changes only two CI workflow files and one CI test. The workflow changes modify compile-admission and macOS status conditions; they do not change SwiftPM dependencies, Xcode package references,…
Cmux Swift Logging ✅ Passed The PR changes only two GitHub workflow files and one Python test file. It adds or materially changes no Swift logging or Swift runtime code, so .github/review-bot-rules/swift-logging.md has no appl…
Cmux User-Facing Error Privacy ✅ Passed PASS. The authoritative diff changes only two internal GitHub Actions workflows and one test file. It adds CI routing conditions and test assertions, not cmux app UI, CLI, or product API user-facing e…
Cmux Full Internationalization ✅ Passed PASS: The PR changes only GitHub Actions workflow logic, developer comments, and CI tests. It adds no Swift UI text, app catalog or Info.plist entries, web UI or metadata, API copy, rendered markdown,…
Cmux Swiftui State Layout ✅ Passed PASS: The pull request changes only .github/workflows/ci-macos.yml, .github/workflows/ci.yml, and tests/test_ci_change_areas.py. The authoritative diff contains no Swift or SwiftUI changes, so t…
Cmux Architecture Rethink ✅ Passed The pull request changes only GitHub Actions YAML and a Python test. It does not change Swift code or SwiftUI/AppKit lifecycle ownership. The diff adds workflow conditions and a regression test; it do…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS: The pull request changes only .github/workflows/ci-macos.yml, .github/workflows/ci.yml, and tests/test_ci_change_areas.py. The authoritative diff contains no Swift changes and no NSWindow,…
Cmux Source Artifacts ✅ Passed The pull request changes only two hand-written GitHub workflow configurations and one Python regression test: .github/workflows/ci-macos.yml, .github/workflows/ci.yml, and `tests/test_ci_change_ar…
Cmux No Test Or Debug Seam In Production Source ✅ Passed The pull request changes only two workflow YAML files and tests/test_ci_change_areas.py. The reviewed diff contains no Swift file, and no file under a production Sources/ path. Therefore, it canno…
Title check ✅ Passed The title is concise and accurately describes the two main changes: forcing unit-ci to compile and failing when app-host unit tests are skipped.
Description check ✅ Passed The description follows the required template and clearly explains the problem, changes, tests, known guard-sweep limitation, and checklist status. The Demo Video section correctly states that a video…
Full details: Docstring Coverage

Explanation

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 3 functions across 1 files. (2 skipped: 2 unsupported.)

  • 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
teamleaderleo merged commit 49bd8be into main Sep 23, 2026
49 of 51 checks passed
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 23, 2026
3ca19ad fix: honor the tab index when inserting a Cloud mirror terminal (manaflow-ai#13998)
c42548e test(settings): enforce that advertised cmux.json paths are actually supported (manaflow-ai#13963)
49bd8be ci: make unit-ci compile, and fail when its unit tests skip (manaflow-ai#14008)
3c58b03 ci: add a unit-ci tier between compile-only and the full suite (manaflow-ai#13996)
c3dd613 fix(ci): name recorded failures when the app host restarts mid-run (manaflow-ai#14000)
db5d212 docs: record how to read CI cost measurements (manaflow-ai#13971)
157c67f ci: pin the paid-overflow gate's fallbacks and name the Tart catch (manaflow-ai#13994)

# Conflicts:
#	.github/workflows/ci-guards.yml
#	.github/workflows/ci-macos.yml
#	.github/workflows/ci.yml
teamleaderleo added a commit to teamleaderleo/cmux that referenced this pull request Sep 23, 2026
Takes manaflow-ai#14008: macOS status requires app-host under unit-ci alongside
this branch's CLI admission and cli-product-tests rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit to teamleaderleo/cmux that referenced this pull request Sep 23, 2026
Brings in main through the base branch, including manaflow-ai#14008.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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