test(cloud): follow the Coderouter section and the Cloud sheet wrapper

Merged
TE
10d ago
+28-19

Summary

Main's full CI at 1c84448 (run 37374680247) failed app-host shards 1, 2 and 7 on test drift. The window crash loop that #17433 fixed had been hiding these failures.

  • CloudTreeAvailabilityTests.swift:23, :47 and MachineCreateOptimisticProjectionTests.swift:89: #17233 always appends the Coderouter section to CloudTreeNodeBuilder.nodes, so the exact tree IDs and node counts now include it. The expectations come from the CI log's actual values. This follows #17433's MachinesPanelModelTests fix.
  • CloudCreateTeamSheetPresenterTests.swift:101 (3 tests): #17422 hosts every Cloud sheet in CloudSheetWindow's CloudSheetContent wrapper, so the window's controller is no longer NSHostingController<CloudCreateTeamSheet>.
    • The test now finds the window by its cmux.cloudCreateTeam identifier and reads the sheet through the wrapper.
    • CloudSheetContent goes from private to internal; its size reporter stays fileprivate. That is the only Sources/ change, and it is visibility only.

The other failures in that run were flakes or infra and are left alone:

  • shard 4 hung in xcresult accounting
  • shard 5 and the timing tests timed out under memory pressure
  • workflow-guard-history checkout hung, which then failed linux-preflight and release-admission

FileExplorerOpenedTabDragSourceTests.swift:251 failed once in shard 1. I'll recheck it on this PR's run.

Testing

  • The failing tests already exist on main and are red in run 37374680247; this PR changes only those tests (plus the one visibility change).
  • No local Swift build (this Mac is barred from Swift builds). This PR's CI runs the changed suites.

Resource check

None: test expectations and one visibility change.

Changelog

none

🤖 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 cloud test drift that main's CI caught at 1c84448, which the window crash-loop fix in #17433 had been hiding.

  • Updates tree tests so exact IDs and counts include the Coderouter section that #17233 now always appends.
  • Updates CloudCreateTeamSheetPresenterTests to find the window by its cmux.cloudCreateTeam identifier and read the sheet through the CloudSheetContent wrapper, since #17422 hosts every Cloud sheet in it.
  • Makes CloudSheetContent internal (its size reporter stays fileprivate); the only Sources/ change is that visibility.
  • Leaves the run's other failures alone: flakes and infra timeouts.

Testing

  • The changed tests are red on main at run 37374680247; this PR changes only those tests plus the one visibility change.

Summary by CodeRabbit

  • Tests
    • Expanded coverage for cloud team creation, cancellation, reopening, and stale actions.
    • Updated checks for how sleeping, broken, and catalog-only machines appear in cloud trees and fleet lists.
    • No user-facing behavior changes are included.