fix(cli): one five-minute idle TTL for remote device leases

Merged
TH
2d ago
+123-25

Summary

  • Every remote device lease the CLI holds (proxy, cloud device such as Limrun and Revyl, cloud WebDriver) now requests one idle TTL of five minutes, REMOTE_LEASE_IDLE_TTL_MS in contracts/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.
  • One remoteLeaseTtlMs rule replaces the per-policy TTLs; the duplicate WebDriver policy and constant are deleted. The daemon is untouched.
  • Limrun's API default inactivity timeout is 3 minutes, which ended instances before their lease. Created instances now request inactivityTimeout: 5m. Attached instances are unchanged. LIMRUN_KEEP_ALIVE stays opt-in.
  • New validated optional capability holdsCloudDevice keeps local TV providers on the daemon default.
  • Docs: limrun.md, plugins.md, ADR 0007. Found while validating #4182.

Validation

  • SHA: ec358341f19eb7b5fd8b5c77fea039eb882efacf. check:affected passed, exactCommit=true, receipt .tmp/validation/run-GzfvWF/receipt.json.
  • Tests: a policy table per provider kind, and the create body carries 5m on iOS and Android.
  • Live Limrun iOS: before, LEASE_EXPIRED 62 s after the last command. After, without keep-alive, a 270 s idle gap survives and the next snapshot succeeds. The Limrun API reads inactivityTimeout 5m0s on that instance. With keep-alive, gaps of 120 s and 270 s survive.
  • Revyl is not run live: it needs a public app build URL. It rests on the shared policy and declaration tests.