Skip to content

test(cloud): bind the first workspace receipt before discovery - #14618

Merged
lawrencecchen merged 2 commits into
mainfrom
fix-cloud-first-workspace-receipt-test
Sep 25, 2026
Merged

lawrencecchen merged 2 commits into
mainfrom
fix-cloud-first-workspace-receipt-test

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

CloudInitialWorkspaceNamingTests/firstWorkspaceReceiptAdoptsPlaceholder fails on main since #14459 (which merged with its own ci-status red). It failed on app-host shard 3 of #13981: fixture.workspace.title → "Same workspace" where "workspace-1" was expected.

The fixture starts with a current daemon snapshot that already names workspace a "Same workspace". bindCloudWorkspace adopts the receipt name workspace-1, then reconciles against that current snapshot, which is newer than the receipt, so the snapshot name wins. That is the intended product behavior (a rename after create must not be undone by the create receipt), and bindingReconcilesAlreadyDiscoveredName covers it.

The test now clears the snapshot before binding, so it models the case its name describes: the create receipt arrives before discovery. discoveryReconcilesAlreadyBoundWorkspace uses the same setup. No product change.

🤖 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

Fixes the failing firstWorkspaceReceiptAdoptsPlaceholder test by clearing the daemon snapshot before binding the workspace receipt.

  • The test previously bound a create receipt while a newer snapshot already named the workspace, so the snapshot title won and the test failed since fix(cloud): adopt authoritative first workspace name #14459.
  • Clearing the snapshot first makes the test model the receipt-before-discovery case it describes, matching discoveryReconcilesAlreadyBoundWorkspace. No product change.

Written for commit 8d2a81d. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Tests
    • Added coverage for workspace naming when a workspace is already discovered.
    • Clarified that the current snapshot takes precedence over the workspace creation receipt.

firstWorkspaceReceiptAdoptsPlaceholder bound a create receipt named
workspace-1 while the fixture's current snapshot already named workspace a
"Same workspace". bindCloudWorkspace then reconciles against that current
snapshot, which is newer than the receipt, so the title is "Same workspace"
and the test failed on every run since #14459. Clear the snapshot first so
the test models the case it names: the receipt arrives before discovery.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Sep 25, 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.

@lawrencecchen
lawrencecchen enabled auto-merge (squash) September 25, 2026 12:49
@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 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 84311345-b92f-4cbc-9be5-ddee2c578b6a

📥 Commits

Reviewing files that changed from the base of the PR and between 8adb380 and 8d2a81d.

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

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: c1a0d037-afd1-41b0-a0d8-32784bbee757

📥 Commits

Reviewing files that changed from the base of the PR and between 2244e98 and 8adb380.

📒 Files selected for processing (1)
  • cmuxTests/CloudInitialWorkspaceNamingTests.swift

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


📝 Walkthrough

Walkthrough

The first-receipt test clears Cloud state before binding. Its comments clarify snapshot precedence and identify a separate test for an already-discovered workspace.

Changes

Cloud workspace naming tests

Layer / File(s) Summary
First-receipt test setup
cmuxTests/CloudInitialWorkspaceNamingTests.swift
The test clears Cloud state before binding. Comments state that a current snapshot naming the workspace takes precedence over the create receipt, and that the already-discovered case is covered separately.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 8adb3

No product behavior changes in this PR. The updated test isolates the receipt-before-discovery scenario and checks the expected workspace name; no actionable merge risk is identified.

🚥 Pre-merge checks | ✅ 23 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description clearly explains the failing test, the cause, the intended behavior, and the correction. However, it does not include the required Testing section with executed test commands and resul… Add a Testing section that names the tests or CI lane executed, states what passed, and identifies any remaining verification. Add the relevant checklist items with their current status, or remove non-applicable items as allowed by the temp…
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. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (23 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: updating the test so the first workspace receipt is bound before discovery.
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 The pull request changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift and adds four lines: comments plus fixture.catalog.clearCloudState(...). The unchanged helper only removes fixture Cl…
Cmux Swift Actor Isolation ✅ Passed PASS. The pull request changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift. The change adds test setup and comments, and the test suite is already isolated with @MainActor. No production…
Cmux Swift Blocking Runtime ✅ Passed The PR changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift. It adds comments and calls the existing clearCloudState helper in test setup. It introduces no semaphore, wait, sleep, delayed…
Cmux Browser Automation Off-Main ✅ Passed PASS. The pull request changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift. The diff adds Cloud-state setup and comments; it does not modify browser socket commands, `TerminalController.sw…
Cmux Expensive Synchronous Load ✅ Passed PASS: The pull request changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift. The diff adds test setup and comments; it adds no production Swift code or synchronous agent-history load on an …
Cmux Cache Substitution Correctness ✅ Passed PASS. The reviewed range changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift. It adds a test-state reset and comments; it does not modify production Swift, TypeScript, or JavaScript code, …
Cmux No Hacky Sleeps ✅ Passed PASS. The PR changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift, a Swift test file. It adds test setup and comments; it does not change TypeScript, JavaScript, shell, or non-Swift runtime…
Cmux Algorithmic Complexity ✅ Passed PASS. The pull request changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift. The four added lines clear test fixture state and document test coverage. They do not change production code or …
Cmux Swift Concurrency ✅ Passed PASS — The pull request changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift. It adds a synchronous clearCloudState(on:) call and comments. It does not add Dispatch queues, Combine state,…
Cmux Swift @Concurrent ✅ Passed PASS: The PR changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift by adding a synchronous clearCloudState call and comments. The enclosing test suite is already @MainActor; no async, …
Cmux Swift Package Boundaries ✅ Passed PASS: The pull request changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift. It adds test setup and comments; it does not introduce or expand production Swift logic. The boundary rule expli…
Cmux Swiftpm Lockfiles ✅ Passed The pull request changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift. It changes test setup and comments, with no Package.swift, Package.resolved, .gitignore, Xcode project, workflow…
Cmux Swift Logging ✅ Passed PASS. The PR changes only a Swift test. It adds comments and a clearCloudState call; it adds no print, debugPrint, dump, NSLog, file logging, Logger declaration, or diagnostic log. Tests are…
Cmux User-Facing Error Privacy ✅ Passed PASS. The diff changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift. It adds test-fixture state clearing and a developer-only comment. No user-facing error, alert, command output, API body,…
Cmux Full Internationalization ✅ Passed The pull request changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift. The added code clears test fixture state and adds developer-only comments; it does not change production UI text, cata…
Cmux Swiftui State Layout ✅ Passed PASS: The pull request changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift. It adds comments and a clearCloudState test setup call. The diff adds no SwiftUI state, layout measurement, la…
Cmux Architecture Rethink ✅ Passed PASS. The PR changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift and adds one existing SurfaceCatalog.clearCloudState call plus comments. It introduces no sleeps, delayed dispatch, polli…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS. The authoritative diff changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift. It adds test fixture state clearing and comments; it does not add or materially change any NSWindow, `NS…
Cmux Source Artifacts ✅ Passed The PR changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift, a hand-written Swift test. The four added lines clear test Cloud state and document the test scenario. The existing `clearCloudS…
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS: The pull request changes only cmuxTests/CloudInitialWorkspaceNamingTests.swift, which is under a test path and not under any production Sources/ path. The diff adds test setup and comments o…
Full details: Description check

Explanation

The description clearly explains the failing test, the cause, the intended behavior, and the correction. However, it does not include the required Testing section with executed test commands and results, and it does not include the applicable checklist status.

Resolution

Add a Testing section that names the tests or CI lane executed, states what passed, and identifies any remaining verification. Add the relevant checklist items with their current status, or remove non-applicable items as allowed by the template.

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

@lawrencecchen
lawrencecchen merged commit ceae537 into main Sep 25, 2026
45 checks passed
@lawrencecchen
lawrencecchen deleted the fix-cloud-first-workspace-receipt-test branch September 25, 2026 14:18
@github-actions

Copy link
Copy Markdown
Contributor

Merge receipt for 8d2a81d1fa: every check was green at merge (13 verified; 14 skipped by policy). Full suite runs on main after merge.

rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 25, 2026
74b3778 test: restore manaflow-ai#14406's sidebar AX walk assertion lost in the manaflow-ai#14408 squash (manaflow-ai#14593)
3b14475 ci: run swift-package-tests on owned minis when the run builds no Release helper (manaflow-ai#14411)
2a40caa Handle WebAuthn assertions without user handles (manaflow-ai#9060)
6cdb469 Match upload rules on HostName when a broker rewrites the host (manaflow-ai#11477)
265bef2 fix: hide browser affordances while the browser is disabled (manaflow-ai#10866) (manaflow-ai#13023)
99c4404 ci: ignore a GitHub API error in the stale-run check (manaflow-ai#14603)
ceae537 test(cloud): bind the first workspace receipt before discovery (manaflow-ai#14618)

# Conflicts:
#	.github/workflows/ci-macos.yml
#	.github/workflows/ci.yml
#	.github/workflows/remote-daemon.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