Repository navigation
fix(daemon,proxy): share outer session device and proxy leases in test attempts - #5149
MilindChatrabhuji wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 12 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
Thanks for this fix. At 8822191, two things need work before merge: a lease can stay rented after a test suite ends, and a live device run is missing.
The PR changes device claim admission, claim acquisition on open, and attempt close teardown on a device that the outer session still uses. The tests use fake runtimes only, so a live run is required before merge. Build the new head with Could this be simpler? The request scope could resolve the live covered host once and pass it to the existing The four earlier inline threads no longer apply and can be resolved: Only one check has reported, and it passes. CI is still pending: the device and e2e lanes wait for fork approval, and they exercise the changed open, claim and close routes. Not verified here: the tests and a live device run were not executed. Runner and app retention for the outer session after an attempt closes was not checked. The value of the outer- Please fix the lease release first, then add the live simulator evidence. |
|
@thymikee Thank you for catching the request-lease retention bug in
Validation (
|
|
Thanks for the update. At da7ac6b, the two lease copies are gone from the cleanup close request, so a request lease is no longer left rented by that shortcut. The code still needs one lease fix, and the live device run is still missing.
A live run is still required before merge, because the PR changes claim admission, claim acquisition on open and attempt close teardown, and the tests use fake runtimes. The PR states that no macOS or iOS host was available, so a maintainer with a macOS host can supply it. After the lease fix, build with The four earlier inline threads are fixed and can be resolved: exclusion is now part of CI is pending. The one reported check passed. The device and e2e lanes wait for fork approval, and they exercise the changed open, claim admission and attempt close routes. Not verified here: no tests were executed, and the lease failure was traced in the code, not reproduced. The path from Maestro Before merge, please fix the lease release with its two-script test, then add the live simulator evidence. |
|
@thymikee Thank you for the review! Addressed every point in
|
|
Thanks for the update. At 64134f4, the lease problem from the earlier review is addressed in the code: attempt cleanup now keeps the suite's request lease, and the suite releases it at the end. One new teardown problem on this route and the live device run remain. The new A live run is required before merge, because claim acquisition on open, claim admission, attempt close teardown and runner retention changed, the tests use fake runtimes, and no live run has been posted. A maintainer with a macOS host can build this head with The four earlier inline threads no longer apply and can be resolved: the exclusion is now part of The Repo Guards & Compatibility check fails the Fallow complexity gate on Not verified here: no tests were run, and the runner leak was traced in the code, not reproduced on a simulator. It was not checked whether a proxy provider recycles the simulator in a way that stops the runner anyway. It was also not confirmed that the new two-open router test fails without the new exemption, that a rejected test command always cleans up its attempt session before the suite-end release, or that the CLI clears its stored lease as the PR describes. Before merge, please fix the lease-end teardown with its test, add the live simulator and proxy evidence, and get the complexity gate to pass. |
|
@thymikee Thank you for catching the runner retention issue at
|
|
Thanks for the update. At 4f4253e, the runner leak from the earlier review is fixed in the code: attempt close skips only the provider release for the suite lease, so the runner is retained only when another session holds that lease. The live device run is still missing. A live run is required before merge. This PR changes claim admission, claim acquisition on open, attempt close teardown, runner retention and the suite-end lease release. All tests use fake runtimes, and no live run has been posted at any commit, so runner stop and restart between attempts and the claim handoff to the outer session are unproven on a real simulator and proxy. A maintainer with a macOS host can build this commit with The four earlier inline threads no longer apply and can be resolved: the exclusion is now a The one check reported on this commit passes. The earlier Coverage and Repo Guards (Fallow) failures were on 64134f4, and this update targets both. The device, e2e, Coverage and Repo Guards jobs are waiting for fork approval, and they exercise the changed open, claim and close routes. Not verified here: no tests were run, no device was available, and the runner stop on attempt close was traced in the code, not observed. It is also unconfirmed that the Before merge, the live simulator and proxy evidence is needed, followed by passing results from the fork-approved jobs on this commit. |
|
This branch now conflicts with |
4f4253e to
6424574
Compare
|
Rebased cleanly onto current main (e52cd29) at head 6424574 (packages/daemon/src/server/request-execution-scope.ts updated to use �pplyRequestCommandDefaults and keep queueLeaseEnd). Local checks on Windows 11 (Node v22.14.0, head 6424574):
|
|
Thanks for the update. At 6424574, the four earlier inline points are fixed, but the live run requested in the earlier review is still missing. This PR changes claim admission, claim acquisition on These threads no longer apply and can be resolved: this one, because the exclusion is now a The 3 reported checks pass at this commit. Not verified here: tests were not run, and no device or proxy was available. Runner stop on attempt close and the suite-end release were only traced in the code. Results of the fork-gated device, e2e, Coverage and Repo Guards jobs, which exercise the changed open, claim and close routes, were not available. Coverage and Fallow results are unconfirmed beyond your local Windows report. It was not checked whether dropping the no-open proxy route breaks any test or caller outside this PR; The next step before merge is the live iOS simulator and proxy evidence above. Separately, should the no-open proxy route and its |
|
Thanks for sticking with this through several rounds. #5129 is a real bug: In scope (the whole fix):
Out of scope (please remove):
Expectations:
The next review will check only these points. |
|
@MilindChatrabhuji, this branch now conflicts with |
|
@MilindChatrabhuji, thanks for the work here. Closing this version: it still adds suite-level lease state and a proxy route for |
Summary
Share outer session device claims and request-scoped proxy leases across nested
testattempts without leaving leases or iOS simulator runners dangling aftertestends, addressing #5129.suiteLeaseIdwhile keepingleaseRetainedBySuiterestricted to cases where another live session holds the lease, so unheld request-lease attempts stop their simulator runner and retain zero hosts.suiteRetainedLeaseduring attempt cleanup sofinallyonly ends a lease that suite cleanup preserved, keeping unrelated caller leases intact across rejections oropen-free runs.Before / after
Validation
Verified locally at HEAD
4f4253ece77b2a0ee0fe9b7413c045189242c4be(Windows 11, Node v22.14.0):