Repository navigation
test: create cwd fixtures that new terminals resolve on disk - #16538
Conversation
#16248 resolves a missing local startup cwd to its nearest existing parent, so tests that requested fake /tmp or /repo paths saw "/tmp" or "/". Create those directories so the tests keep checking inheritance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FrR7YbsQtGw2eFtDeyiTcK
|
All contributors have signed the CLA ✍️ ✅ |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. 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 |
|
Subagent review at a2f4c9e: approve. #16248 intentionally resolves a missing local cwd to its nearest existing parent; see its test |
CI failure attributionCI passes on Written by |
There was a problem hiding this comment.
1 issue found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="cmuxTests/WorkspaceUnitTests.swift">
<violation number="1" location="cmuxTests/WorkspaceUnitTests.swift:7497">
P3: This PR touches a non-UI unit test in `cmuxTests` and leaves it in `XCTestCase`, but repo policy prefers Swift Testing for touched tests even in files that already contain XCTestCase suites (file-level mixing is accepted when suites are separated). Convert the touched tests to a `@Suite`/`@Test` block, as `WorkspaceTerminalTabWorkingDirectoryTests.swift` already does in the same PR.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| } | ||
|
|
||
| func testSidebarBranchDirectoryEntriesStayStableAcrossFocusedSplitChanges() { | ||
| func testSidebarBranchDirectoryEntriesStayStableAcrossFocusedSplitChanges() throws { |
There was a problem hiding this comment.
P3: This PR touches a non-UI unit test in cmuxTests and leaves it in XCTestCase, but repo policy prefers Swift Testing for touched tests even in files that already contain XCTestCase suites (file-level mixing is accepted when suites are separated). Convert the touched tests to a @Suite/@Test block, as WorkspaceTerminalTabWorkingDirectoryTests.swift already does in the same PR.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At cmuxTests/WorkspaceUnitTests.swift, line 7497:
<comment>This PR touches a non-UI unit test in `cmuxTests` and leaves it in `XCTestCase`, but repo policy prefers Swift Testing for touched tests even in files that already contain XCTestCase suites (file-level mixing is accepted when suites are separated). Convert the touched tests to a `@Suite`/`@Test` block, as `WorkspaceTerminalTabWorkingDirectoryTests.swift` already does in the same PR.</comment>
<file context>
@@ -7494,12 +7494,20 @@ final class WorkspacePanelGitBranchTests: XCTestCase {
}
- func testSidebarBranchDirectoryEntriesStayStableAcrossFocusedSplitChanges() {
+ func testSidebarBranchDirectoryEntriesStayStableAcrossFocusedSplitChanges() throws {
let workspace = Workspace()
- let leftLiveDirectory = "/repo/left/live"
</file context>
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. |
|
Green at 2fdf4cc; landing. Resource check: test-only. Each test creates a few empty temp directories and removes them in |
|
Merge receipt for |
0bfd027 test(cloud): fix the Cloud header and moved-panel focus tests that never ran (manaflow-ai#16539) c5c4345 localization: accept numbered placeholders in any order (manaflow-ai#16376) 456edeb fix(settings): replace custom sidebar mockups with real previews (manaflow-ai#16569) 98dc3ab Prototype: cmux Cloud as a remote MCP server (manaflow-ai#16568) 6c22525 test(remote): isolate tmux stale-surface fixture (manaflow-ai#16566) 3ec9918 Re-land "fix(coderouter): initialize Cloud VM account pools (manaflow-ai#16397)" (manaflow-ai#16572) 2b895a5 Fix browser paste routing with terminal text box beta (manaflow-ai#6380) (manaflow-ai#16560) 2bd3455 localization: check Swift defaultValue literals against their catalog en value (manaflow-ai#16396) c43086e test(cli): expect --mark-read to mark every listed inbox message (manaflow-ai#16537) fcda4f0 test(feed): wait for zero-wait Codex permission acceptance before checking attention (manaflow-ai#16536) 7d57a03 fix(remote): evict stale persistent SSH bridge leases (manaflow-ai#16558) d630cb8 docs: add protected-folder diagnostics for tmux sessions (manaflow-ai#12219) 7dceaac test: create cwd fixtures that new terminals now resolve on disk (manaflow-ai#16538) 28cc575 docs: cover surface resume binding CLI contract (manaflow-ai#16473) 5c7dca1 Fix idle zsh PR probes triggering chpwd hooks (manaflow-ai#16553) # Conflicts: # .github/workflows/ci-guards.yml
Summary
#16248 changed
RemoteTerminalWorkingDirectoryResolveron purpose. A missing local startup cwd now resolves to its nearest existing parent, so a restored agent cannot resume in another workspace's directory. Several tests passed made-up paths such as/tmp/cmux-split-startup-<uuid>or/repo/left/liveto splits, new tabs, respawn andsurface.create. Those paths now resolve to/tmpor/, so the tests failed.The product change is intended and has its own coverage. This PR leaves it alone and makes the affected tests create their directories:
WorkspaceTerminalWorkingDirectoryFallbackTests.newTerminalSurfaceFallsBackToRequestedWorkingDirectoryWhenReportedDirectoryIsStaleWorkspaceSplitStartupCommandTestssplit and respawn testsWorkspaceTerminalTabWorkingDirectoryTests: Cmd+T after restore, new terminal to right,surface.createWorkspacePanelGitBranchTests.testSidebarBranchDirectoryEntriesStayStableAcrossFocusedSplitChanges, which showed the extra/entryTesting
CI; no local build per team rule.
swiftc -parsepasses on each edited test file.Changelog
none
🤖 Generated with Claude Code
https://claude.ai/code/session_01FrR7YbsQtGw2eFtDeyiTcK
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes tests that broke after #16248, which changed
RemoteTerminalWorkingDirectoryResolverto resolve a missing local startup cwd to its nearest existing parent. Tests passed made-up paths such as/tmp/cmux-split-startup-<uuid>or/repo/left/live, which now resolve to/tmpor/and fail. The affected tests now create their directories on disk before exercising splits, new tabs, respawn,surface.create, and the sidebar branch directory test. No product behavior changes.Written for commit 2fdf4cc. Summary will update on new commits.