Skip to content

feat(revyl): export the lease session id and answer location on - #4772

Merged
thymikee merged 6 commits into
callstack:mainfrom
KayaanT:revyl-follow-ups
Nov 20, 2026
Merged

thymikee merged 6 commits into
callstack:mainfrom
KayaanT:revyl-follow-ups

Conversation

@KayaanT

@KayaanT KayaanT commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-ups to #4725 for e2e's Revyl provider, plus the review notes on #4725:

Validation

  • Live, production Revyl Pixel 7: a fresh device's Settings > Location reports "Use location" on (read with snapshot through this plugin), which is what the location on answer relies on.
  • New tests:
    • the keep-alive stop test fails with the clearInterval removed;
    • location on returns { enabled: true } with no worker request;
    • location off still refuses.
  • Checks: pnpm check:quick, pnpm check:production-exports, pnpm check:fallow and pnpm check:doc-prose pass. The provider-revyl unit project passes, 177 tests.
  • The feat(revyl): set device settings and keep idle sessions alive #4725 question on idle pauses is answered on feat(revyl): set device settings and keep idle sessions alive #4725.

KayaanT and others added 3 commits November 19, 2026 16:47
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>
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>
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>
…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>
@thymikee

Copy link
Copy Markdown
Member

Thanks for the PR. One change is needed: on Revyl iOS, settings location on now reports success without doing anything (reviewed at 6d8eb9c).

interactor.ts:477 answers on with { enabled: true } on every platform. On iOS, location on means a privacy grant for the session app (commands.md:848). Today the call ignores the app and sends no request, so the app's location authorization stays unchanged. The next location step then hits a permission prompt or a denied state, where before this PR the call refused honestly. The evidence here is Android only (Pixel 7). The rule: location on|off must mean on Revyl what it means on the same platform locally. Please gate the short-circuit on this.session.platform === 'android' and keep the refusal on iOS, or route iOS on|off through the existing setPermission path with permissionTarget: 'location'. Please add an iOS case to the location test.

revyl.md:105 says Revyl starts every device with location services on, so location on succeeds without changes. That covers iOS too, and it contradicts commands.md. Agents reading it would skip the settings permission grant location step on iOS. Please scope the sentence to Android and say what iOS location on|off does on Revyl.

Not blocking, take or leave: the new binding test in platform-runtime.test.ts:101 uses as never and as unknown as Interactor and only checks the stub call, so driving setSetting through a fixture-backed runtime and asserting fixture.bodyFor('set_appearance') would be stronger; { enabled: true } is read by nothing, and the local Android toggle returns void; and the new export in index.ts:70 turns the session-id hash derivation into package API for one consumer, while the core already records providerSessionId for the lease.

Two simpler shapes may fit better: could location on short-circuit on Android only, with iOS using the existing permission path or staying refused? And could e2e read the providerSessionId the core already records instead of importing the hash? For the second, it is worth confirming the client can read it for a live lease before close, since it is documented today only on close and on artifacts.

The Coverage job failed with a truncated log and no failing test or threshold line; a rerun should show whether it is a flake. Revyl iOS location defaults were not checked. There are no conflicts. Before merge, the location on short-circuit and its docs sentence need to be scoped to Android, with an iOS test.

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>
@KayaanT

KayaanT commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in f91e857:

  • location on answers locally only on Android. On iOS, on/off still refuse, since they mean the session app's grant; added an iOS test. revyl.md scopes the sentence to Android and points iOS at settings permission grant location.
  • setLocation returns void, like the local Android toggle.
  • revylSessionIdForLease stays exported: the allocate grant carries no providerSessionId (it only appears on cancel/close/artifacts), so there is nothing on the grant to read it from.
  • Left the binding test as is (non-blocking).

…o 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>
@KayaanT

KayaanT commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Coverage failed on the eager-closure gate: exporting revylSessionIdForLease from the entry pulled session-identity.ts into its closure. Fixed in 0fec5d4 by moving the derivation into device.ts, which the entry already evaluates; the gate passes locally.

@thymikee

Copy link
Copy Markdown
Member

Thanks for the quick fixes. This PR is ready at 0fec5d4: the Android-only gate, the iOS on|off refusal test, and the Android-scoped revyl.md that points iOS at settings permission grant location now address the earlier review. All 13 checks pass at this head, and the earlier Coverage failure is gone now that the function lives in device.ts. There are no conflicts. Not blocking, and fine to take or leave: the PR body still says location on returns { enabled: true }, while the code now returns nothing on Android with no worker request, and iOS on|off still refuses. Not verified here: a live device run, the "Android starts with location on" premise beyond the PR body's Pixel 7 reading, and settings permission grant location on a live Revyl iOS simulator, which was only traced through the code.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 20, 2026
@thymikee
thymikee merged commit a037466 into callstack:main Nov 20, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants