test(next): relaunch-wake tests fail without their fixes

Merged
TE
16d ago
+4-3

Follow-up to the review of #22790 ("a chat's composer chips and shell command come back after a relaunch"). The review found that two checks in aPageThatDoesNotAnswerKeepsItsState (Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/AgentPaneRelaunchWakeTests.swift) passed without their fixes. This PR changes only that test.

Note: treat this PR as in progress until its own CI compile is green. Base feat-cmux-next doesn't compile right now, and #22853 fixes that.

Changes

  • Reconnect check. The test sent ["method": "reconnect"], which decodes as unsupported, so no handshake ran. The page was never asked anyway, so the pendingWake skip in AgentPaneRelaunchWake.collect went untested. The test now sends ["method": "ready", "params": ["reconnect": true]] and requires page.model.hasHandshake before it goes on.
  • No-answer check. After ready, the test put tabs.wakeStates["tab_slow"] back, so it got the state from the tab store and never reached the ?? model.handedWake fallback. That line is gone. The test now expects the store and pendingWake to be empty after ready, then requires the page that doesn't answer to keep the state its ready took.

Evidence

Base doesn't compile, so each evidence branch was dae1ac1b (this PR's commit) with #22853's three commits (bfa73a4e..991a42cf) cherry-picked on top. Its tip is 02b3d4a698ec. #22853's head is based on an older base that doesn't have #22790 and doesn't contain this test file, so dae1ac1b couldn't go onto that head directly. Each branch ran on the fleet with cmux-ci run --class light --script scripts/ci/package-test-lane.sh --arg=suite --arg=Packages/macOS/CmuxNext --arg=AgentPaneRelaunchWakeTests --env CMUX_CI_XCODE_APP=/Applications/Xcode_26.6.app:

BranchChange on topStepResult
G 02b3d4a698ecnone40775c97b7abd404e763a34e4/4 passed, exit 0
R1 8cd1cb25e07bpendingWake skip reverted (collect asks every handshaken page)1a01ba3fb98ef26c1d3d97e5aPageThatDoesNotAnswerKeepsItsState fails: :133 (asked.count โ†’ 1) == 0 and :139 (asked.count โ†’ 2) == 1. The other 3 pass
R2 b9f95593c33ahandedWake fallback reverted (collect drops ?? model.handedWake, ready doesn't set handedWake)876da22442777ed1e7ecc698aPageThatDoesNotAnswerKeepsItsState fails: :138 await tabs.relaunchWakeStates()["tab_slow"] == held. The other 3 pass

The throwaway branches (tmp/rwt-g, tmp/rwt-1, tmp/rwt-2) have been deleted.

Observed / Not run

  • Observed: the three fleet runs above. I read each log for the four test results. prepush-gate.py reported no new violations on all three branches.
  • Not run: this branch on its own base (it doesn't compile until #22853 lands), and any suite other than AgentPaneRelaunchWakeTests. I didn't check the revert of each fix against the old test version again here; the #22790 review established that.

Changelog

none

Agent session: cosmic-gray

๐Ÿค– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Follow-up to the #22790 review: two checks in the slow-page relaunch-wake test passed without their fixes, so this PR tightens the test in AgentPaneRelaunchWakeTests.

  • The reconnect check now sends a real ready reconnect handshake instead of reconnect (which decoded as unsupported and never ran a handshake) and requires model.hasHandshake before going on.
  • The no-answer check no longer puts the held state back into the tab store after ready, so it asserts the store and pendingWake are empty and exercises the ?? model.handedWake fallback.

Note: base feat-cmux-next doesn't compile right now; #22853 fixes that, so treat this branch's CI as in progress until it's green.