Skip to content

ci: skip app-host teardown when setup never started - #13179

Merged
teamleaderleo merged 3 commits into
mainfrom
ci-skip-unprepared-app-host-cleanup
Sep 20, 2026
Merged

teamleaderleo merged 3 commits into
mainfrom
ci-skip-unprepared-app-host-cleanup

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

When checkout fails before app-host preparation, the always-run cleanup and Cloud ordering acceptance steps currently call scripts that do not exist. In PR #13171 run 35497372530, shard 6 failed checkout three times with Could not resolve host: github.com, then reported misleading missing-script errors; no tests ran.

Track the preparation outcome and skip cleanup only when preparation never started. Cleanup still runs as the console user after successful, failed, or cancelled preparation and propagates failures. Require successful preparation before the focused Cloud acceptance step, while preserving acceptance after subsequent test failures.

Validation: the first commit reproduces the missing-script failure by executing the actual workflow cleanup body in an empty checkout. The fix passes that regression, six cleanup invocation/exit-code cases, the existing app-host isolation and cleanup tests, CI change-area tests, actionlint, and diff checks. This is a workflow-only fix; hosted execution remains pending. It removes secondary errors, not the underlying runner DNS failure.

Related: #13095.


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

Fixes the app-host CI workflow so a failed checkout before app-host preparation no longer causes the always-run cleanup or Cloud ordering acceptance to call missing scripts. Cleanup now skips only when preparation never started; Cloud ordering acceptance now requires successful preparation.

  • After preparation starts, cleanup still runs as the console user on success, failure, or cancellation and propagates cleanup failures.
  • Cloud ordering acceptance still runs after later test failures, but not if the job is cancelled.
  • Adds regression coverage for the empty-checkout case, cleanup exit codes, and the Cloud ordering acceptance gate.

This is a workflow-only fix; it removes secondary errors, not the underlying runner DNS failure.

Written for commit 3bb5268. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes

    • Improved CI cleanup handling for app-host home preparation outcomes.
    • Cloud machine ordering acceptance now runs only after successful preparation.
    • Cleanup is skipped when preparation is skipped or has no outcome, while unexpected outcomes now fail clearly.
  • Tests

    • Expanded validation of CI preparation and cleanup behavior across success, failure, cancellation, and skipped scenarios.

@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 20, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Advanced

Run ID: f0c6fcc1-fe61-401a-abaa-a2c3dacf48e6

📥 Commits

Reviewing files that changed from the base of the PR and between 87023d8 and 3bb5268.

📒 Files selected for processing (1)
  • tests/test_ci_app_host_home_isolation.py

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: d0ea8b86-29ef-442b-ac72-b0f851b8795f

📥 Commits

Reviewing files that changed from the base of the PR and between 5517d3d and 87023d8.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • tests/test_ci_app_host_home_isolation.py

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


📝 Walkthrough

Walkthrough

The workflow now exposes the app-host preparation outcome, gates Cloud machine ordering acceptance on successful preparation, and conditionally runs cleanup. Tests execute the cleanup script for skipped, empty, successful, failed, and cancelled outcomes.

Changes

App-host home outcome handling

Layer / File(s) Summary
Expose preparation outcome and gate acceptance
.github/workflows/ci.yml
The preparation step now has an id. Cloud machine ordering acceptance runs only when preparation succeeds.
Handle cleanup outcomes and validate execution
.github/workflows/ci.yml, tests/test_ci_app_host_home_isolation.py
Cleanup runs for success, failure, or cancelled, skips for skipped or empty outcomes, and fails for unexpected values. Tests validate invocation and exit-code preservation.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

🚥 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 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: skipping app-host teardown when preparation did not start.
Description check ✅ Passed The description clearly explains the problem, fix, scope, testing, and known limitation. It does not use the template headings or include the checklist and demo video section, but the required change …
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 authoritative diff changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. It adds an app-host preparation outcome, gates a CI acceptance-test step on success…
Cmux Swift Actor Isolation ✅ Passed PASS: The review-scoped diff changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. It contains no changed Swift production source or Swift declarations. The Swift act…
Cmux Swift Blocking Runtime ✅ Passed PASS: The pull request changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. It adds no Swift files or production Swift code. The blocking-runtime check therefore has…
Cmux Browser Automation Off-Main ✅ Passed PASS: The pull request changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. The diff adds app-host preparation outcome handling and cleanup tests. It does not change…
Cmux Expensive Synchronous Load ✅ Passed The pull-request range changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. It contains no Swift files or production Swift changes, so it does not add or move an exp…
Cmux Cache Substitution Correctness ✅ Passed PASS: The authoritative pull-request diff changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. It introduces workflow YAML and Python test logic, not production Swif…
Cmux No Hacky Sleeps ✅ Passed PASS. The PR changes only .github/workflows/ci.yml and a Python test. The workflow rule explicitly excludes GitHub Actions YAML, and the diff adds no sleep, timer, polling, or wall-clock wait. The P…
Cmux Algorithmic Complexity ✅ Passed PASS. The PR changes only .github/workflows/ci.yml and the test-only tests/test_ci_app_host_home_isolation.py. The production workflow addition uses a finite case over preparation status values …
Cmux Swift Concurrency ✅ Passed PASS: The pull request changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. The authoritative diff contains no Swift, Objective-C, or SwiftPM source changes, and no …
Cmux Swift @Concurrent ✅ Passed PASS: The reviewed diff changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. It contains no Swift files or Swift concurrency changes, so the @concurrent check is n…
Cmux Swift Package Boundaries ✅ Passed PASS: The pull request changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. The authoritative diff contains no Swift files or Package.swift, so it does not introdu…
Cmux Swiftpm Lockfiles ✅ Passed The pull request changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. The diff contains no Package.swift, Package.resolved, .gitignore, or Xcode package-refere…
Cmux Swift Logging ✅ Passed PASS: The authoritative PR range changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. It adds no production Swift code or Swift logging. The changed shell echo sta…
Cmux User-Facing Error Privacy ✅ Passed PASS: The PR changes only CI workflow logic and a regression test. The new workflow output is limited to generic CI diagnostics about whether app-host preparation started or returned an unexpected sta…
Cmux Full Internationalization ✅ Passed The PR changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. The added workflow text is CI control flow and operational log output, and the test assertions/comments a…
Cmux Swiftui State Layout ✅ Passed PASS: The pull request changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. The diff contains no Swift or SwiftUI changes, so the specified SwiftUI state-layout fail…
Cmux Architecture Rethink ✅ Passed PASS: The custom check targets Swift architecture changes. This pull request changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py; Git reports no changed Swift, Objec…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS: The pull request changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. The authoritative diff contains no Swift, NSWindow, NSPanel, NSWindowController, SwiftUI …
Cmux Source Artifacts ✅ Passed PASS: The pull request changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. The workflow change is hand-written CI configuration. The test change is hand-written reg…
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS: The pull request changes only .github/workflows/ci.yml and tests/test_ci_app_host_home_isolation.py. The authoritative diff contains no Swift file under a production Sources/ path, so the …
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 1 functions across 1 files. (1 skipped: 1 unsupported.)

✨ 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.

@greptile-apps

greptile-apps Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the workflow behavior is appropriately gated and the previously requested acceptance-condition coverage is now present.

Summary

Updates the app-host CI workflow to distinguish preparation that never started from preparation that succeeded, failed, or was cancelled.

  • Gates Cloud machine ordering acceptance on successful app-host preparation while preserving execution after later test failures.
  • Skips teardown when checkout failed before preparation began.
  • Preserves console-user cleanup and cleanup failure propagation after any started preparation.
  • Adds regression coverage for the acceptance-step condition and cleanup outcome handling.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Checkout and earlier setup] -->|reaches preparation| B[Prepare isolated app-host home]
  A -->|fails before preparation| C[Preparation outcome empty or skipped]
  B -->|success| D[Run app-host tests]
  B -->|failure or cancellation| E[Skip dependent acceptance]
  D -->|job not cancelled| F[Run Cloud ordering acceptance]
  C --> G[Skip app-host cleanup]
  B -->|success, failure, or cancellation| H[Run cleanup as console user]
Loading

Reviews (2) · Last reviewed commit: "test: guard the Cloud ordering acceptanc..."

Comment thread .github/workflows/ci.yml
The step overrides the implicit success() gate, so the guard now parses its
condition and requires both !cancelled() and a successful preparation outcome.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo force-pushed the ci-skip-unprepared-app-host-cleanup branch from 982f0b2 to 3bb5268 Compare September 20, 2026 09:57
@teamleaderleo
teamleaderleo enabled auto-merge (squash) September 20, 2026 10:03
@teamleaderleo
teamleaderleo merged commit ebbb17f into main Sep 20, 2026
50 of 71 checks passed
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 20, 2026
4b18fc9 ci: track package test helper inputs (manaflow-ai#13188)
b210493 Merge pull request manaflow-ai#13181 from manaflow-ai/ci-focused-app-host-tests
ced163c Merge pull request manaflow-ai#13180 from manaflow-ai/ci/remote-tmux-crash-diagnostics
9faf726 Merge pull request manaflow-ai#13178 from manaflow-ai/ci-reject-incomplete-test-runs
14c3ca1 Merge pull request manaflow-ai#13166 from manaflow-ai/ci-reuse-build-for-runtime-regressions
7c3574a ci: let the pre-merge Release check compile arm64 only (manaflow-ai#13195)
887839a ci: drop a stalled GhosttyKit download and resume it (manaflow-ai#13197)
70a244d Merge pull request manaflow-ai#13177 from manaflow-ai/ci-fast-static-preflight
fcad43f build: read Xcode projects with Foundation and drop XcodeProj and PathKit (manaflow-ai#13111)
76d80b1 ci: skip Release and its helper for test-only pull requests (manaflow-ai#13122)
fdc63e9 Merge pull request manaflow-ai#13176 from manaflow-ai/ci-reuse-queue-build-products
3162fee test: split an expression Xcode 27 cannot type-check (manaflow-ai#13126)
d10aa64 test: use consistent XCTest imports to stop compiler diagnostic flood (manaflow-ai#13163)
1b69bf9 test: stop real-Git reftable tests depending on a 2s wall clock (manaflow-ai#13186)
cad333b Merge origin/main into ci-fast-static-preflight
7522486 Merge origin/main into ci-reuse-build-for-runtime-regressions
43210e1 Bound automatic terminal titles before session persistence (manaflow-ai#13009)
674a0db ci: retire Depot macOS runners (manaflow-ai#13162)
f48ef36 Merge pull request manaflow-ai#13183 from manaflow-ai/ci-early-cli-smoke
ebbb17f ci: skip app-host teardown when setup never started (manaflow-ai#13179)
5fb6d8c Merge pull request manaflow-ai#13168 from manaflow-ai/ci-cache-r2-store
a348064 ci: skip compile admission when an earlier run compiled the same build inputs (manaflow-ai#13139)
88e102c reload: let a reused checkout keep one warm DerivedData across tags (manaflow-ai#13131)
7a049e9 Merge origin/main into ci-reuse-build-for-runtime-regressions
cd05c6e Merge origin/main into ci-fast-static-preflight
5cf41fa Merge origin/main into ci-reuse-queue-build-products
5a6322e test: guard early CLI smoke ordering
0438552 fix: pass R2 public URL through workflow environment
0716c59 test: bound app-host replay subprocesses
2e0b9b5 ci: terminate cancelled focused discovery
14bbad4 ci: keep R2 public URL configuration inside the cache actions
e342c67 ci: make focused run discovery cancellable
cf3984b test: avoid hard timeout in app-host classifier replay
251b050 ci: allow privileged crash report collection
7d9a7f2 Merge main after landing cache backend and suite policy
b6853ee ci: allow manual cache-only seeding for R2 rollout
81d3026 test: require manual cache seeding to skip app publication
6980f8e ci: harden remote tmux diagnostics collection
c24d77f ci: publish R2 cache pointers conditionally and repair failed writes
2432805 test: cover R2 pointer repair and out-of-order saves
4779d01 ci: continue past unusable build artifact candidates
9dd1579 test: reproduce corrupt candidate blocking product reuse
bfb43f5 ci: check CLI version and help before app-host fan-out
f2b0fae docs: use an existing suite in focused launcher example
2c04b6a ci: drain tar streams portably with BSD tar
c5e1d59 ci: pin focused tests to a commit and track the requested run
1a44bde ci: consume tar padding when restoring zstd caches
31d4fd9 test: cover padded R2 archives on macOS
a46567a ci: isolate R2 cache writes from release credentials
ce26a8e test: require early CLI smoke gate to propagate probe failures
18a67fb test: reproduce focused launcher revision and run attribution bugs
4dd543e test: require cache-only R2 credentials for cache saves
2c8412c ci: make product reuse attempt-safe and bound archive expansion
59fb526 ci: preserve remote tmux mirror crash diagnostics
d8107e4 test: cover artifact reruns, expansion limits and producer source checks
28a03e3 ci: reject interrupted app-host runs despite later passing summaries
302551d test: reproduce false-green app-host timeout and restart runs
bc3a63a ci: reject invalid static inputs before expensive validation
baf65d9 test: require successful static preflight before macOS admission
6cea5f0 ci: fall back when build identity cannot be established
7632c7e ci: reuse compatible compiled products in merge groups
8be0c54 ci: add an R2 bucket as a cache store every runner can read
25f50c3 test: behaviour of an R2-backed cache store script
17c2498 ci: reuse compiled app and UI products for runtime regressions
6ed96f4 test: require UI products in the shared CI build artifact
230ad52 ci: drop a timeout note about a DerivedData cache that no longer exists
b5ec5cc ci: stop restoring DerivedData in pull request jobs
a42ad38 Merge remote-tracking branch 'origin/main' into ci-cache-backend-switch
477fb0f ci: choose the cache store per dispatched run, and cover the nightly app build
03363d7 ci: let a repository variable move the seeded caches to the Warp store
f791f87 ci: pull request jobs restore caches and never save them
5b65bb1 test: pull request jobs must restore caches read-only
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