Repository navigation
Release a leased mobile device session before stopping the daemon (tester-army/e2e#1900) - #2396
Merged
Merged
Conversation
Contributor
|
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 30 minutes. View limit details
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. |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ls2e22zaDF32vJSXSJrwYp
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Ls2e22zaDF32vJSXSJrwYp
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.
Closes #2319
What and why
BrowserStack, TestMu AI and other agent-device lease providers now end the leased device session over RPC (
leases.release, attach-only, with a capped budget) before stopping the daemon. A provider that rejects the release (cleanup warnings) now fails the release, and a daemon stop that cannot report (Windows) is accepted once the RPC confirmed the session ended.DeviceReleaseContext.Timeoutcarries the remaining cleanup budget.Upstream parity
Ported: e2e-inc/e2e@c801a12 (#1900). Verdict: complete, with justified exceptions (below).
releaseLease->ILeaseHost.ReleaseLeaseAsync;StopDriverOptions;ProviderReleaseWarningError;releaseRpcBudgetMs->ReleaseRpcBudget;endLeaseDaemon->EndLeaseDaemonAsync; lifecycle stages;DEFAULT_RELEASE_BUDGET_MS,RELEASE_RPC_TIMEOUT_MS,MIN_RELEASE_RPC_MS,STOP_RESERVE_MS;daemonLifecycle: 'attach'->DeviceClientConfig.DaemonLifecycle/AgentDeviceDaemon.AttachAsync;timeoutMs->DeviceReleaseContext.Timeout(TimeSpan).TimeProviderparameter of the internalAgentDeviceLeasesconstructor (stands for vitest fake timers).references/mobile.md. The port has no TestMu/Revyl pages.Upstream tests and local match
tests/E2E.Mobile.Tests/Lease/AgentDeviceLeasesTests.cs).LeaseDaemon/LeaseDaemonTests.cs).Provider/DeviceProviderTests.cs).Not ported (follow-up #2395)
NaNbudget case (no TimeSpan equivalent) of the skip-RPC loop; this test is otherwise complete.Checks
Mobile test project: 690 passed on net10.0 (the two existing real-daemon
LeaseDaemonTestsneed npx and were excluded locally). Not run: real-model tests (no agent change). CSharpier formatted.Generated by Claude Code