Repository navigation
feat(revyl): set device settings and keep idle sessions alive - #4725
Conversation
The Revyl worker has device actions for orientation, appearance, location, permissions, app state, and the iOS keychain. The plugin now admits them instead of refusing the whole orientation and settings families: - orientation: every side on a worker that reports supports_precise_orientation (Android); portrait and landscape-left on one that does not (iOS). Unlock still refuses. - settings appearance light|dark|toggle, location set <lat> <lon>, permission (Maestro names), clear-app-state, and reset-keychain on iOS. location on|off, airplane, wifi, and the other settings still refuse. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A connected Revyl session now reads the worker appearance once a minute, which marks the worker active, so a pause between commands no longer ends it. Sessions ask for a 5 minute idle timeout instead of 30, so a device left behind by a process that exits without disconnecting is released sooner. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A 500 from Revyl on the worker-connection read ended a device start, and one on install_status ended an install the worker was still carrying out. Both reads change nothing, so the start keeps polling within its deadline and the install status read is replayed, the way the hierarchy read already is. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
Thanks, this is ready: I found no problems in d98560f. The one failing check is the SIGTERM test in Not blocking, and you can take or leave these: the 403 case in |
…ntation docs to the worker From the callstack#4725 review: a test now calls setSetting through the live binding, so the admitted settings operation is covered end to end, and the docs describe four-sided orientation as following the worker's precise-orientation report, as the code does, rather than the platform. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
Thanks @thymikee. I took all four notes in #4772:
On the idle pause: I held a live Android session with no commands for 7 minutes, past the 5-minute idle timeout, with a 600 s lease TTL. A screenshot still worked afterwards. That run checked the Revyl side. On the daemon side, a lease lasts as long as its TTL or its holder's renewals; e2e renews every 20 s. A CLI user who leaves a session idle past the lease's own TTL still loses the lease, so the |
* feat(revyl): export the session id a lease runs under A test runner that calls Revyl's API beside the plugin, such as e2e recording a session's video, has to name the session the plugin started. The id is derived from the lease id; exporting revylSessionIdForLease from the package lets that runner use the same derivation instead of copying it. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * feat(revyl): answer settings location on, since Revyl devices keep it on Revyl starts every device with location services on (Settings > Location shows "Use location" on for a fresh Android emulator) and has no action that switches them off, so location on is already true. It now succeeds without a request instead of refusing, which lets a caller that switches location on before a fix, as e2e does on Android, set the fix. location off still refuses. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(revyl): stop the keep-alive once Revyl reports the session gone A keep-alive read answered with Revyl's no-such-session kept beating for the rest of the process. It now clears its timer. The 403 worker-connection test also asserts the typed error, so a fixture or deadline failure no longer passes it. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(revyl): cover settings through the runtime binding, and key orientation docs to the worker From the #4725 review: a test now calls setSetting through the live binding, so the admitted settings operation is covered end to end, and the docs describe four-sided orientation as following the worker's precise-orientation report, as the code does, rather than the platform. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(revyl): answer location on only on Android On iOS, location on|off is the session app's location grant, which the plugin does not set, so it refuses there again instead of reporting success. Android keeps answering on without a request, now returning nothing as the local Android toggle does. The docs scope the sentence to Android and point iOS to settings permission grant location. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(revyl): keep the session id in device.ts so the entry evaluates no new module Exporting revylSessionIdForLease from the package entry pulled session-identity.ts into its eager closure, which the closure budget gate refuses. The derivation now lives in device.ts, which the entry already evaluates, with its tests in device.test.ts. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Summary
Three changes to the Revyl plugin, one commit each:
db1110c).settingsnow drives Revyl's worker actions instead of refusing:light/dark/toggle(toggle reads the current appearance first)location set <lat> <lon>/set_permissions, using Maestro's names (media-libraryis sent asmedialibrary).location-always,contacts-limitedand--modeare refused, because the worker has no equivalent.supports_precise_orientation(Android). On iOS it takes portrait and landscape-left only; landscape-left maps to the worker'slandscape.on/offand the other sides on iOS fail withUNSUPPORTED_OPERATIONinstead of reporting success. The capability matrix andwebsite/docs/docs/revyl.mdare updated to match.1aed016). A connected session reads the worker's appearance once a minute, which marks the worker active, so a pause between commands no longer ends the session. Sessions now ask for a 5-minute idle timeout instead of 30, so a device left behind by a process that exits without disconnecting is released sooner. The timer isunrefed, skips a beat while a read is in flight, and is cleared before/stop.d98560f). A single 500 from Revyl on theworker-connectionread ended a device start, and one oninstall_statusended an install the worker was still running. Neither read changes anything:worker-connectionas "not ready yet" and keeps polling within its deadline;install_statusreplays a 500, ashierarchyalready does.Validation
location set, permissions, clear-app-state and reset-keychain;setLocation;setLocation,clearKeychain.runtime-transient-reads.test.ts,revyl-client.test.ts) fail without the fix.pnpm check:quick,pnpm check:capabilities-matrix,pnpm check:doc-prose, and the provider-revyl unit project pass.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.