Repository navigation
test: a window with no restorable workspaces is dropped from the snapshot - #14801
Conversation
…shot #14788 made the session policy drop phantom windows (no workspaces, no window Dock) on every save. TabManagerChildExitCloseTests still expected buildSessionSnapshot to keep a window whose only workspace is a non-restorable remote one, so it failed with a nil snapshot on every run that selects it (first seen on #14789 after merging main). Assert the new policy instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
All contributors have signed the CLA ✍️ ✅ |
|
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 configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe test for a window with no restorable workspaces now expects ChangesSession snapshot policy
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Other Merge Risk: ⚪ Minimal · up to This test-only change aligns the expectation with the existing session-save policy and presents no material merge risk. 🚥 Pre-merge checks | ✅ 24 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (24 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
|
Merge receipt for |
cc90659 test: a window with no restorable workspaces is dropped from the snapshot (manaflow-ai#14801) 9b10f7c Merge pull request manaflow-ai#14756 from manaflow-ai/12956-ssh-auth-followup-main fb665a0 test(ime): install option-as-alt right before the dead-key dispatch (manaflow-ai#14800) 9d459e3 fix(fork): an access-time update no longer discards a fresh fork validation (manaflow-ai#14799) 39e2c3a fix(ssh): share one route check across concurrent cmux ssh opens c344ce9 test: cover concurrent cmux ssh opens sharing one route check 9ff9017 fix(ssh): report OpenSSH failures from cmux ssh instead of a Cloud VM error 311797d test: cover cmux ssh failing fast on refused and unreachable hosts
… the snapshot Ported from upstream manaflow-ai#14801 (cc90659): "test: a window with no restorable workspaces is dropped from the snapshot (manaflow-ai#14801)". Companion to the manaflow-ai#14788 port: the phantom-window policy now drops a window whose only workspace is a non-restorable remote one, so the fork's test asserting the old keep-empty-window behavior failed with a nil snapshot. The fork has no window Dock or member-less pinned groups, so upstream's extra keep conditions do not apply.
Summary
TabManagerChildExitCloseTests.testSessionSnapshotKeepsWindowWithNoRestorableWorkspacesfails on current main, atTabManagerUnitTests.swift:947("XCTUnwrap failed: expected non-nil value of type AppSessionSnapshot"). It first showed up on #14789 after main was merged into it (run 36218677612, shard 5/7).Root cause
#14788 made
SessionPersistencePolicy.pruningCmuxCrashDiagnosticWindowsdrop phantom windows, meaning windows with no workspaces and no window Dock, on every save. The test builds a window whose only workspace is a non-restorable remote one. That window is now a phantom, so the snapshot is nil. #14788 updatedAppDelegateDisplayConfigRestoreTestsfor this but missed this suite, because it wasn't among #14788's changed suites.Change
Rename the test to
testSessionSnapshotDropsWindowWithNoRestorableWorkspacesand assert the new policy: the snapshot is nil. Test-only.Test plan
TabManagerChildExitCloseTestsgreen🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes the failing
TabManagerChildExitCloseTeststest that still expectedbuildSessionSnapshotto keep a window with no restorable workspaces. The session policy now drops such windows as phantom windows, so the test asserts the snapshot is nil instead.testSessionSnapshotDropsWindowWithNoRestorableWorkspacesand updates its assertion to match the phantom-window policy.Written for commit 288570a. Summary will update on new commits.
Summary by CodeRabbit