Repository navigation
test(ios): e2e reply context for the relay cooldown test; count wakeup draws - #14555
Merged
Merged
Conversation
replyRelayDoesNotRepeatRequestInsideServerCooldown was written for the plaintext relay (#12179). #12384 moved SystemReplyRelayClient to the encrypted /v1/replies/e2e endpoint, which returns false before any HTTP request unless the reply carries accountID, macInstallationID and macBuildID and the phone and pinned Mac keys resolve. The test's reply had none of these, so the stub URLProtocol saw 0 requests instead of 1. Add an internal init that takes the phone key material and the pinned peer lookup (the public init keeps the keychain-backed defaults), and give the test in-memory keys plus the push context so the first call reaches the 429 stub and the second is held by the Retry-After gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"stale renderer continuations do not follow reused surface addresses" asserted that the replacement view's needsDraw stayed false after a stale GHOSTTY_ACTION_RENDER continuation. The render handler already routes through the source surface's bridge, which the test detaches, so the continuation is a no-op. But needsDraw is also set by the replacement view's own startup: didMoveToWindow runs a geometry sync whose result is applied on a later main-actor turn, and the first layoutSubviews pass (402x700 against a .zero last size) calls setNeedsGeometrySync. Both land during the test's Task.yield loop, so the expectation failed without any stale draw reaching the view. Add an onDrawForWakeupForTesting hook (same pattern as onFocusInputRequestedForTesting) and count wakeup draws instead. The stale test also detaches the replacement's own bridge so only a lookup by surface address could reach it. The positive test counts the same hook, since needsDraw let it pass without the action being delivered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 10 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (5)
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 |
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
|
Merge receipt for
|
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two stale tests in CmuxMobileShellUI and CmuxMobileTerminal.
replyRelayDoesNotRepeatRequestInsideServerCooldownwas written for the plaintext relay (Fix cross-user Iroh rate-limit starvation #12179). Encrypt push notifications and reply relays end to end #12384 movedSystemReplyRelayClientto/v1/replies/e2e, which returns before any HTTP request unless the reply carries the account, Mac installation and build ids and both keys resolve. The stub saw 0 requests instead of 1.SystemReplyRelayClientgains an internal init taking key material and the pinned-peer lookup (the public init keeps the keychain defaults), and the test uses in-memory keys plus the push context. The test target now depends onCmuxPhonePush.needsDrawstayed false, but the replacement view setsneedsDrawitself during startup (geometry sync, first layout).GhosttySurfaceViewgets anonDrawForWakeupForTestinghook, same pattern asonFocusInputRequestedForTesting, and both runtime action tests count wakeup draws instead. The stale test also detaches the replacement's own bridge.Credit: @azooz2003-bit (#12179, #12384) and @lawrencecchen (#9726).
Part of getting the cmux-ios full suite green on main (see #14464 to #14470).
🤖 Generated with Claude Code
Summary by cubic
Fixes two stale iOS tests so the full cmux-ios suite passes on main.
replyRelayDoesNotRepeatRequestInsideServerCooldownsaw 0 requests instead of 1 becauseSystemReplyRelayClientnow speaks the encrypted/v1/replies/e2eendpoint, which returns before any HTTP request unless the reply carries the account, Mac installation, and build IDs and both keys resolve. The client gains an internal init taking key material and the pinned-peer lookup (the public init keeps keychain defaults), and the test uses in-memory keys plus the full push context; the shell UI test target now depends onCmuxPhonePush.needsDrawstayed false, but the replacement view also setsneedsDrawduring its own startup. They now count wakeup draws via a newonDrawForWakeupForTestinghook, and the stale-surface test detaches the replacement's own bridge so only a surface-address lookup could reach it.Written for commit b3cb941. Summary will update on new commits.