Skip to content

fix(revyl): drag duration, hierarchy 500 retry, warm-start guidance - #4144

Merged
thymikee merged 2 commits into
mainfrom
fix/revyl-feedback
Nov 1, 2026
Merged

thymikee merged 2 commits into
mainfrom
fix/revyl-feedback

Conversation

@thymikee

@thymikee thymikee commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-ups from Revyl's review of our runs (11 files):

  • Drag duration: scroll --duration-ms now sends duration_ms on /drag when health reports supports_explicit_drag_duration: true, and echoes durationMs in the result. Workers without the flag still refuse it. A 0 ms duration is refused because Revyl accepts 1–10000 ms.
  • iOS hierarchy 500: Revyl passes the simulator's brief empty accessibility answer through as a 500. The client now retries a GET that gets a 500, because a read has no side effect. Revyl has merged a server-side fix; this covers the time until it ships.
  • Warm starts: the guide, README, and CLI help no longer set --device/--provider-os-version in their examples. The guide explains that leaving them unset gets a warm simulator, and that you should reuse one session instead of reconnecting.

get_user_uuid needs no change. verifyCredentials throws away the response body, so the echoed key was never stored or logged.

Validation

Head 0720e29:

  • vitest run packages/provider-revyl: 142 passed
  • pnpm check:affected --run: fallow, build, vitest-related, unit, docs-links, docs-prose all passed

Not run live: no Revyl app URL was available, so the duration_ms route is covered only by the fixture backend.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

…hierarchy 500s

- scroll --duration-ms rides /drag duration_ms when health reports
  supports_explicit_drag_duration; older workers still refuse it.
- Replay a GET answered with 500: Revyl passes the iOS simulator's brief
  empty accessibility answer through as a 500 on hierarchy.
- Docs and help: leave --device/--provider-os-version unset for a warm
  simulator, and reuse one session instead of reconnecting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agent-device-website Ready Ready Preview Nov 1, 2026 5:59pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.67 MB 5.67 MB +6 B
Package (unpacked) 5.67 MB 5.67 MB +6 B
Package (download) 1.72 MB 1.72 MB +27 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 41.0 ms 39.8 ms -1.2 ms
CLI --help 88.7 ms 87.0 ms -1.7 ms

@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 11 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread website/docs/docs/revyl.md Resolved
@thymikee

thymikee commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

The changed device-facing paths in #4144 at 0720e29 have no live evidence yet, and the 500 replay is wider than it needs to be. Checks are still running, with Smoke Tests and Coverage in progress and no failure so far. Live evidence on a real Revyl run is the next step before merge.

The scroll with duration_ms on a worker that reports supports_explicit_drag_duration, and the iOS hierarchy 500 replay, were never run against a real Revyl run (https://github.com/callstack/agent-device/blob/0720e29/packages/provider-revyl/src/interactor.ts#L251). The health field name and the /drag body field come only from the fixture. If Revyl names either differently, every worker stays on the refusal path or rejects the body, and no test shows it. Please run connect revyl on an iOS run whose health reports supports_explicit_drag_duration: true, then scroll down --pixels 300 --duration-ms 900, and show the worker /drag request and the result with durationMs: 900. Also show scroll --duration-ms 0 refused with INVALID_ARGS and no /drag call, and the UNSUPPORTED_OPERATION refusal on a worker without the flag. For the retry, show a captured run where snapshot -i on iOS hits one 500 and then returns the tree, with logs showing 2 attempts. I could not run Revyl here, so the wire names come from the PR body and the fixture, and I did not run the test suite.

Could the 500 replay be an opt-in on the single hierarchy request, such as a retryServerError flag set only in getWorkerHierarchy, instead of method === GET && status === 500? That keeps the iOS case the same, leaves screenshot, device_info and verifyCredentials unchanged, and keeps the status table as the one statement of what is retryable by default.

The open threads on the unsourced timing claims in revyl.md (#4144 (comment)), the GET+500 retry versus the status table (#4144 (comment)), and the lower-priority test-assertion thread (#4144 (comment)) still apply.

Not blocking, take or leave: scope the retry as a per-request trait consumed in isRetryable (https://github.com/callstack/agent-device/blob/0720e29/packages/provider-revyl/src/revyl-client.ts#L260), and after that keep the troubleshooting note in revyl.md (https://github.com/callstack/agent-device/blob/0720e29/website/docs/docs/revyl.md#L170) scoped to the hierarchy read, since dropping --device and --provider-os-version from the lease example changes guidance for all users, and cite or drop the numeric timings.

…rced timings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

thymikee commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

Addressed in 6078d10:

  • 500 replay scope: done the way you suggested. retryServerError is set only in getWorkerHierarchy, so screenshot, device_info, verifyCredentials and every POST still follow the status table. A new test shows a screenshot 500 is sent once.
  • Timings: the numbers are dropped. The guide now gives qualitative advice only.
  • Troubleshooting note: it was already limited to the iOS snapshot hierarchy read, and I kept it that way.
  • Dropping --device / --provider-os-version from the examples: kept. Revyl told us directly that leaving them unset is how you get a simulator that is already running. The flags are still documented as optional right below the example.
  • Test assertion: now checks details.flag.

Validation at 6078d10: vitest run packages/provider-revyl passed 143 tests. check:affected --run passed fallow, build, vitest-related, and the full unit run (16762 passed). After that, check:tmpdir-leaks failed on /tmp/agent-device-test-run-41131-*. That directory is empty and was created by PID 41131 during this run. That process is not this run's vitest (93981), so it is probably a concurrent run in another worktree. I did not remove it.

Live evidence is still missing. connect revyl requires a public HTTPS --provider-app, and no hosted build is available to me. Until a live run happens, the wire names supports_explicit_drag_duration and duration_ms come from Revyl's message to us ("duration_ms in the drag body, integer ms 1-10000, only when health says supports_explicit_drag_duration: true"), not from a captured request. The hierarchy 500 is also intermittent on Revyl's side, and their own fix ships in the next release, so a captured replay may not be reproducible on demand.

@thymikee

thymikee commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

Live evidence at 6078d10 (head unchanged). I drove the real createRevylRuntime against backend.revyl.ai on one iOS session, with a logging fetch wrapper. The request and result lines below are verbatim, with long bodies trimmed. connect needs a hosted --provider-app, so I allocated the lease straight through the runtime without an app. The interactor path is the same one the CLI uses.

Health, while booting and then connected. The field name matches, and it only becomes true once the device is connected, which is the answer we read:

GET .../health 200 {"device_connected":false,"screen_width":0,"screen_height":0,"supports_explicit_drag_duration":false}
GET .../health 200 {"platform":"ios","device_connected":true,"screen_width":440,"screen_height":956,"supports_explicit_drag_duration":true}

scroll down --pixels 300 --duration-ms 900:

POST .../drag {"start_x":220,"start_y":628,"end_x":220,"end_y":328,"duration_ms":900} -> 200 {"success":true,"action":"drag","latency_ms":1191.1}
RESULT {"direction":"down","pixels":300,"durationMs":900,"backend":"revyl-device-proxy",...}

The same scroll without the flag sends no duration_ms, and the worker reports latency_ms 780.9 instead of 1191.1, so the duration took effect on the device.

--duration-ms 0: INVALID_ARGS "Revyl drag --duration-ms must be at least 1.", details.flag: "--duration-ms". No /drag request was logged.

Hierarchy 500 replay. This happened on the real run:

GET .../hierarchy 500 (3848 ms)
GET .../hierarchy 200 (1483 ms, X-Latency-Ms: 768.0)

That is two attempts, and the snapshot succeeded.

Release: /stop returned {"success":true,"request_accepted":true}.

Not shown live: the UNSUPPORTED_OPERATION refusal on a worker without the flag. Revyl's production worker already reports true, so I can't get one live. The fixture test a scroll that names a duration is refused rather than run at another speed covers that branch.

@thymikee

thymikee commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

I found no problems in 6078d10. The three items from the earlier review are fixed: the 500 replay now applies only to the hierarchy read (revyl-client.ts:267, set only at :186), the docs no longer give warm-start timings, and the drag test now asserts the --duration-ms flag detail.

All 20 checks pass at this commit. The live Revyl log in the author's comment covers drag duration and the hierarchy replay; I could not reach Revyl to reproduce it, and it used createRevylRuntime rather than the CLI connect revyl, which reaches the same routes. The UNSUPPORTED_OPERATION refusal is covered only by the fixture test. I did not run the tests myself.

These earlier inline threads no longer apply at this commit, so the author can resolve them: the "already warm" docs wording was softened (thread), the 500 retry is limited to the hierarchy route (thread), and the test now checks the flag detail (thread).

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 1, 2026
@thymikee
thymikee merged commit 5c182aa into main Nov 1, 2026
20 checks passed
@thymikee
thymikee deleted the fix/revyl-feedback branch November 1, 2026 19:50
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.

1 participant