Skip to content

feat(revyl): add @e2e-dev/revyl for mobile tests on Revyl devices - #1708

Merged
okwasniewski merged 9 commits into
e2e-inc:mainfrom
KayaanT:kayaan/revyl-integration
Nov 17, 2026
Merged

okwasniewski merged 9 commits into
e2e-inc:mainfrom
KayaanT:kayaan/revyl-integration

Conversation

@KayaanT

@KayaanT KayaanT commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Adds @e2e-dev/revyl, a DeviceProvider for the mobile engine that runs tests on Revyl's hosted iOS simulators and Android emulators. Opened by Revyl, following the partner-integration thread.

  • One Revyl device and isolated agent-device daemon per worker, via agent-device's @agent-device/revyl plugin (0.21.38, the engine's agent-device). Built on @e2e-dev/mobile/lease, same shape as @e2e-dev/testmu.
  • Options: app (an https build URL Revyl installs at device start), device (catalog model), optional osVersion. Unknown/invalid options and non-https apps fail config load with INVALID_CONFIG, without echoing the rejected URL; the target's app.appPath is refused.
  • Auth is REVYL_API_KEY (optional REVYL_API_URL), passed only to the daemon's env.
  • Video recording is not supported: Revyl streams the screen to its own viewer and does not expose a recording, so --video fails with UNSUPPORTED_CAPABILITY. Documented under Limits.

Shared changes in @e2e-dev/mobile/lease, from review:

  • agentDevicePlugin(import.meta.resolve('@agent-device/<name>')) returns { assertVersion, prepareHome }, replacing the per-provider daemon.ts copies. @e2e-dev/testmu is migrated onto it.
  • A lease's device selector is used for allocation only and is no longer put on the worker's client, so agent-device does not send it as --device on every command. This replaces the Revyl-only withoutModelName.
  • Both @e2e-dev/revyl and @e2e-dev/testmu now peer on @e2e-dev/mobile >=0.12.8, the release that ships the helper.

Docs: docs/integrations/revyl.mdx, integrations index card and logo, environment and security reference rows, mobile page pointer, AGENTS.md, and the e2e skill setup note (both copies). revyl.svg is a near-black mark (#1C1732), so it needs the same dark-mode filter: invert(1) rule as Expo's and TestMu AI's in the site styles.

import { mobile } from '@e2e-dev/mobile';
import { revyl } from '@e2e-dev/revyl';

export default {
  targets: [
    {
      name: 'android',
      engine: mobile({
        platform: 'android',
        device: revyl({ app: 'https://builds.example.com/app.apk', device: 'Pixel 7', osVersion: 'Android 14' }),
      }),
      app: { bundleId: 'com.example.app' },
    },
  ],
};

Verified

Ran it locally: yes

pnpm check passes, and the tests for @e2e-dev/mobile (539), @e2e-dev/revyl (19), @e2e-dev/testmu (86) and @e2e-dev/browserstack (53) pass. Revyl and TestMu each register their real plugin through agentDevicePlugin and check agent-device lists it as compatible.

Surface: @e2e-dev/revyl linked into a standalone project, running against Revyl production devices. Android installs Appium's public ApiDemos 6.0.18 APK from its GitHub release.

e2e run --target android tests/android.e2e.ts at the review fixes (asserts "Animation" is visible):

ℹ leasing 1 android device(s) from revyl
ℹ revyl (1 of 1): lease 8d51883ab416fb1dabac908da06b222f: Pixel 7, Android 14; Revyl device started
ℹ a booted android device: boot 0.0s, open io.appium.android.apis 1.1s
 ✓ mobile engine for target "android" prepared 8.10s
   ✓ |android| tests/android.e2e.ts > opens API Demos 7.98s
ℹ revyl: released 1 device(s)
      Tests  1 passed (1)

iOS (opens rentals and switches to the fleet tab) passed on agent-device 0.21.36. On 0.21.37 every tap failed with window-origin-unknown, because the Revyl plugin reported its iOS root frame as derived. callstack/agent-device#4514 fixed that in 0.21.38, which main's mobile now ships and this package pins. iOS has not been re-run on Revyl with 0.21.38 yet.

--video on Android, the documented limit:

UNSUPPORTED_CAPABILITY: start video recording failed: record is not supported on this device Hint: Revyl streams the screen for its own viewer and does not expose a recording.

@github-actions github-actions Bot added the size:XL Up to 999 changed lines, not counting tests, fixtures, translated docs, or the lockfile label Nov 11, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 28 files

Reply to a comment to ask cubic a question or push back. It learns from your replies.

View guided diff | Re-trigger cubic

Comment thread docs/integrations/revyl.mdx Resolved
Comment thread packages/revyl/src/credentials.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

View guided diff | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 1 file (changes from recent commits).

Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.

View guided diff | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 3 files (changes from recent commits).

Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.

View guided diff | Re-trigger cubic

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[claude-opus-5-5] automated review on behalf of @okwasniewski

Thanks for this, and for the live Android + iOS runs. The package follows the testmu shape closely. Locally at 364fb50: build, typecheck, 21/21 unit tests, lint, dead-code, peer-range, changeset, plugin-sync and docs checks all pass, and the lockfile diff is minimal. Mutation testing killed 16 of 17 mutants.

Must fix

  1. withoutModelName (provider.ts:79, :85-96) works around a missing primitive. Root cause: @e2e-dev/mobile/lease spreads device onto the worker's client (untyped). agent-device merges client config into every request, so it becomes a --device selector on every command, and the Revyl plugin names the device Revyl <platform> <id>. Please fix it at the source instead of filtering afterwards with a cast:

    • preferred: @e2e-dev/mobile/lease uses device for allocation only and leaves it off the client (the lease scope already pins the device); update lease.test.ts:109
    • or: the @agent-device/revyl plugin reports the started device under the requested model, like the other providers.

    Either way withoutModelName and its test (revyl.test.ts:90-93) go away. We'll confirm which route on our side.

  2. src/daemon.ts and tests/unit/daemon.test.ts are verbatim copies of testmu's, apart from the plugin name. Please move the plugin-home plumbing into @e2e-dev/mobile/lease as a shared helper (e.g. agentDevicePlugin(import.meta.resolve('@agent-device/revyl')) returning { assertVersion, prepareHome }) and migrate testmu onto it in the same change.

  3. The peer floor @e2e-dev/mobile >=0.12.5 (package.json:55) can't work: mobile 0.12.5 ships agent-device 0.21.35, and the plugin is pinned to 0.21.36 with an exact check, so every acquire fails. It needs to be >=0.12.6 (or the release that ships the helper from 2).

  4. provider.ts:57 echoes a rejected app in the INVALID_CONFIG message. For https://user:pass@... or an http presigned URL, that prints credentials or signatures into logs. Drop the value from the message and update revyl.test.ts:135.

Should fix

  • docs/integrations/revyl.mdx:103-106 describes internals (daemon per worker, version pin, lease IDs). Cut it. Instead add the limits the testmu and browserstack pages cover: what ends a device if the runner is killed, and whether the app can reach a server on the user's network.
  • The ~4 s iOS first-read note and assertionTimeout: 10_000 in the docs and both skill copies: keep them only if this is inherent to Revyl, not a plugin bug.
  • The summary repeats the platform: "android Android 14" (provider.ts:76).
  • AGENTS.md: the @e2e-dev/mobile/lease paragraph lists only testmu and browserstack. Add revyl.
  • revyl.svg is a single dark color. Check it renders on the dark docs theme (vendor-logo rule in the docs authoring guide).

cubic threads

  • The blank REVYL_API_URL thread is invalid: the plugin treats blank as unset. Reply and resolve.
  • The video thread is invalid as worded. The engine falls back to agent-device recording, and the plugin refuses with UNSUPPORTED_CAPABILITY, which matches your docs. Reply and resolve.

Secrets are otherwise handled well: REVYL_API_KEY reaches only the daemon env, and the security.mdx row is accurate.

@okwasniewski

Copy link
Copy Markdown
Member

[claude-opus-5-5] automated review on behalf of @okwasniewski

Re-reviewed at 1e87a44 (merges cleanly onto main). All four must-fix asks are done:

  • withoutModelName: the root fix is in @e2e-dev/mobile/lease. device is no longer spread onto the client, and putting it back fails 14 tests.
  • Shared daemon code: it's now agentDevicePlugin() in lease/plugin.ts, with one package lookup in lease/package.ts. testmu is migrated, and each provider's plugin.test.ts checks that the real agent-device CLI lists the plugin as compatible.
  • Peer floor: @e2e-dev/mobile >=0.12.8 for revyl and testmu, and check:peer-ranges passes.
  • INVALID_CONFIG: it no longer echoes the app URL, and user:pass@ URLs are rejected, with a test.

The should-fix docs items are done too. Unit tests pass for mobile, testmu, browserstack and revyl (539/86/53/19), along with lint, dead-code, peer-ranges, changesets, plugins and docs checks. 7 of 8 mutants are killed.

Optional:

  • revyl provider.ts:67,79 and testmu provider.ts:133,150 both call plugin.assertVersion(...) and then pass prepareHome: plugin.prepareHome. If agentDeviceLeases({ provider, label, plugin }) did both, the prepareHome hook (lease/index.ts:45) and most of docs/mobile.mdx:748-751 would go away. Fine as a follow-up.
  • lease/index.ts:121-123: the selectors JSDoc already explains this, so the inline comments can go.
  • AGENTS.md: the revyl line uses an em dash, and the repo uses plain hyphens.

Labeling Ready for Human Review. Accepting a new vendor package, setting up npm publishing for @e2e-dev/revyl, and the unverified 30-minute idle limit in the docs are for a maintainer to decide.

@okwasniewski okwasniewski added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 13, 2026
@okwasniewski
okwasniewski force-pushed the kayaan/revyl-integration branch from 1e87a44 to e5f61ce Compare November 16, 2026 17:34
KayaanT and others added 9 commits November 17, 2026 09:17
Add a DeviceProvider for the mobile engine that leases Revyl's hosted iOS
simulators and Android emulators through agent-device's @agent-device/revyl
plugin, one device and isolated daemon per worker. The app installs from an
https URL; REVYL_API_KEY authenticates. Docs page, logo, env and security
reference rows, and the e2e skill setup note included.
The first screen read after app.open() on a Revyl iOS device usually
takes about 4 seconds, close to the default 5-second expect deadline.
The config example raises assertionTimeout to 10 s, and the setup skill
mentions it.
… the lease client

agentDevicePlugin(entry) in @e2e-dev/mobile/lease checks a provider
plugin's version and registers it in a lease daemon's home, replacing
the per-provider daemon.ts copies; testmu now uses it. A lease's device
selector is used for allocation only: on the client, agent-device sent
it as --device on every command, and the lease scope already picks the
device.
Use the shared plugin helper and drop withoutModelName, pin
@agent-device/revyl 0.21.37 with @e2e-dev/mobile >=0.12.8, keep a
rejected app URL out of the error, and fix the summary's repeated
platform. Docs drop the internals paragraph and the iOS timeout note,
and list what ends an orphaned device and that the app cannot reach
your network.
…gins load

The plugin helper and the agent-device bin lookup now walk to the
package manifest through one installedPackage(). Revyl and TestMu each
keep a test that registers their real plugin through agentDevicePlugin
and expects agent-device to list it as compatible. docs/mobile.mdx names
revyl() and documents agentDevicePlugin; the fallow ignore that the old
variable resolve needed is gone.
@okwasniewski
okwasniewski force-pushed the kayaan/revyl-integration branch from e5f61ce to fcd5517 Compare November 17, 2026 08:18
@github-actions github-actions Bot removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 17, 2026
@okwasniewski okwasniewski added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 17, 2026
@okwasniewski

Copy link
Copy Markdown
Member

[claude-opus-5-5] comment on behalf of @okwasniewski

@KayaanT, this is close to merge. I pushed to your branch, so please pull before you change anything:

CI is green at fcd5517. Could you re-check against real Revyl devices on this head?

  1. iOS: re-run opens rentals and switches to the fleet tab. Taps should work now on 0.21.38. This is the one thing we haven't verified.
  2. Android: re-run the ApiDemos test, to confirm nothing regressed.
  3. Docs: confirm that Revyl ends an idle device after 30 minutes (docs/integrations/revyl.mdx, Limits). If that's not right, tell us the real behavior.

Please post the output here, the same way you did for the first runs.

@KayaanT

KayaanT commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

Re-ran on fcd5517 (agent-device 0.21.38, @agent-device/revyl 0.21.38) against Revyl devices.

iOS: taps work on 0.21.38. opens rentals and switches to the fleet tab passes on the first attempt, and the screenshot shows the Fleet tab.

ℹ revyl (1 of 1): lease 1f5b3139da1ebc3e1ebacc0977397b2e: iPhone 17 Pro Max, iOS 27.0; Revyl device started
ℹ a booted ios device: boot 0.0s, iOS runner 0.0s
 ✓ mobile engine for target "ios" prepared 16.22s
   ✓ |ios| tests/ios.e2e.ts > opens rentals and switches to the fleet tab 11.90s
ℹ revyl: released 1 device(s)
      Tests  1 passed (1)

Android: ApiDemos 6.0.18 still passes.

ℹ revyl (1 of 1): lease 8e0f0f7c60c38d544906013f13ca3ef1: Pixel 7, Android 14; Revyl device started
ℹ a booted android device: boot 0.0s, open io.appium.android.apis 1.6s
 ✓ mobile engine for target "android" prepared 33.02s
   ✓ |android| tests/android.e2e.ts > opens API Demos 9.27s
ℹ revyl: released 1 device(s)
      Tests  1 passed (1)

Idle timeout: the docs are correct. @agent-device/revyl starts each device with idle_timeout_seconds: 1800, so Revyl ends a session after 30 minutes with no commands.

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@okwasniewski
okwasniewski merged commit f659d64 into e2e-inc:main Nov 17, 2026
40 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. size:XL Up to 999 changed lines, not counting tests, fixtures, translated docs, or the lockfile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants