Repository navigation
fix(cli): one five-minute idle TTL for remote device leases - #4220
Conversation
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 11 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Apex SentinelVerdict: Since the last review: 3 new · 0 still open · 1 no longer raised 3 finding(s): 3 minor. Verdict: approve. 🟡 Minor (3)
3 findings below Reply under an inline comment with Earlier reviewsReview of
|
| Where | Finding |
|---|---|
packages/daemon/src/resources/lease-registry-scope.ts:115 |
🆕 Daemon grants the cloud-TTL ceiling exemption by matching a magic number, not a cloud lease |
2 findings below minor not shown (user_settings.min_severity).
Review of edc1a9aa · 04.11.2026 17:57 UTC
Apex Sentinel
Verdict: approve
3 finding(s): 3 minor. Verdict: approve.
🟡 Minor (3)
| Where | Finding |
|---|---|
packages/contracts/src/provider-connection.ts:29 |
holdsCloudDevice bypasses plugin capability validation and is read by truthiness |
src/cli/commands/connection-lease-policy.ts:21 |
New cloud lease TTL silently equals the daemon's hard MAX_LEASE_TTL_MS ceiling |
src/cli/commands/connection-lease-policy.ts:97 |
holdsCloudDevice is documented as the switch for the 10-minute renewal, but the cloud WebDriver policy renews regardless of it |
There was a problem hiding this comment.
Apex Sentinel: 3 new findings on edc1a9a. The verdict and the full list are in the summary comment.
There was a problem hiding this comment.
All reported issues were addressed across 11 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 03b6e24. The verdict and the full list are in the summary comment.
|
At 03b6e24, the lease change has no correctness problem. The live Limrun results in the PR body match the code, and the new tests cover the 10 minute request. There are no conflicts. The Coverage job log I could see stops at the macOS helper build and shows no failing test, so I cannot say yet whether that job passes. The full log or a rerun will settle it. Not blocking, and you can take or leave these: One design question: could we drop the number-keyed carve-out in The open inline threads on the 600000 match in lease-registry-scope.ts and the same match still apply, and one fix closes both. The impact is narrow, because it grants less and not more. Before merge, please settle the daemon ceiling rule, delete the duplicate policy constant, and get the full Coverage log or a rerun. |
Limrun and Revyl leases fell to the daemon's 60 second default, so a session ended after one minute without a command. A new holdsCloudDevice capability selects the cloud device lease TTL, shared with cloud WebDriver leases. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…ing clamp Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…vice leases Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…activity timeout Limrun's API default is 3 minutes, so a created instance ended before its lease. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
03b6e24 to
ec35834
Compare
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on ec35834. The verdict and the full list are in the summary comment.
|
At ec35834, the code looks good. The daemon carve-out and the magic-number exemption from the earlier review are gone, so every remote lease takes its TTL from one five-minute rule in the CLI connection policy. CI is green (22 checks) and there are no conflicts. Not blocking, take or leave: the JSDoc at session-allocation.ts:19 says the instance "outlives" the lease's idle window, but the value equals it; "the same window as the lease, so Limrun's 3 minute default never ends an instance before its lease" would be exact. The The two open inline threads (lease shortening, keep-alive comment) are non-blocking wording notes. The earlier threads about the daemon carve-out, the magic-number exemption and the 10 minute ceiling no longer apply and can be resolved. Evidence: the live Limrun iOS numbers in the PR body (62 s expiry before, 270 s survival after) match the code. Revyl and cloud WebDriver were not run live, and Node client or MCP leases without a connection policy keep the 60 s daemon default, which fits the PR scope. |
Summary
REMOTE_LEASE_IDLE_TTL_MSincontracts/lease-scope. Before, Limrun and Revyl fell to the 60 s daemon default, so a session ended one minute after the last command. WebDriver moves from 10 to 5 minutes.remoteLeaseTtlMsrule replaces the per-policy TTLs; the duplicate WebDriver policy and constant are deleted. The daemon is untouched.inactivityTimeout: 5m. Attached instances are unchanged.LIMRUN_KEEP_ALIVEstays opt-in.holdsCloudDevicekeeps local TV providers on the daemon default.limrun.md,plugins.md, ADR 0007. Found while validating feat(apple): serve the Simulator AX bridge from the XCTest runner #4182.Validation
ec358341f19eb7b5fd8b5c77fea039eb882efacf.check:affectedpassed,exactCommit=true, receipt.tmp/validation/run-GzfvWF/receipt.json.5mon iOS and Android.LEASE_EXPIRED62 s after the last command. After, without keep-alive, a 270 s idle gap survives and the next snapshot succeeds. The Limrun API readsinactivityTimeout5m0son that instance. With keep-alive, gaps of 120 s and 270 s survive.