Skip to content

Enable agent-device to record PR/issue mobile evidence #89476

Closed

Description

@kacper-mikolajczak

Background

Expensify App PRs and bug-report issues both contain manual mobile-test plans (PRs in ### Tests; issues in ## Action Performed:). Reviewing or triaging these requires running the steps on iOS Simulator and Android Emulator manually, which is slow and inconsistent. agent-device already drives both devices via the accessibility tree and supports screenshot and record start/stop.

Problem

When a developer or triager wants mobile evidence for a PR or issue, no automated capture exists. Reviewers either run the steps locally or accept reviews without visual proof, and any structured-evidence pipeline (e.g. Melvin) has nothing to consume.

Solution

A new agent-device-evidence skill that:

  1. Accepts a GitHub URL (PR /pull/N or issue /issues/N); URL path disambiguates kind.
  2. Fetches the body and extracts test/repro steps via per-source heading anchors with whole-body LLM fallback. Segments steps into distinct flows (LLM-driven; no enforced separator).
  3. Resolves which platforms apply (PR title/Tests prose for PRs; ## Platforms: checkboxes for issues; both by default).
  4. Drives the parent agent-device skill's bring-up to open the app, then runs a two-phase loop per flow: Phase 1 explores autonomously and emits an .ad script; Phase 2 replays it under record to produce a clean MP4 (or PNG for verify-only steps).
  5. Caches .ad scripts by sha256(steps + precondition + platform) so unchanged flows skip Phase 1 on re-runs. Append-only - the skill never deletes cache entries.
  6. Writes artifacts and a JSON manifest under ~/.cache/agent-device-evidence/<source-kind>-<source-num>/<run-ts>/. The skill never edits the source; the user (or future Melvin integration) handles upload/attachment.

Autonomous and non-interactive: failures surface as structured exit codes (SKIP, NO_FLOWS, PLATFORM_UNSUPPORTED, NO_BUILD, BAD_INPUT, etc.) without prompts.

Related

Issue OwnerCurrent Issue Owner: @kacper-mikolajczak

Activity

  1. kacper-mikolajczak commented on May 4, 2026

    @kacper-mikolajczak
    ContributorAuthor
  2. Julesssss commented on May 4, 2026

    @Julesssss
    Contributor

    Sounds good. I guess we will first get the skill working, then look into connecting it with Melvin. One thing I worry about is that our Melvin instructions have PR creation as a skill already and the melvin prompt handles many various workflows. With Melvin V2 this will change but I am not quite ready yet to extract the potential cases out. Once that is done it should be easier (this is App implementation > implement + run THIS skill to test).

    Lets add a goal of testing this thoroughly as a standalone skill, and getting some use from it before moving on. A second thing is that I'd like to avoid any work on performance testing for now. Nevermind, I see we have a simple skill already, we can keep it but lets not automate it further.

  3. Julesssss commented on May 5, 2026

    @Julesssss
    Contributor

    Refine agent device flow PR looking good and merged! 🎉

  4. Julesssss commented on May 5, 2026

    @Julesssss
    Contributor

    Just noting thoughts for later. We may want to switch to our S3 image upload solution (currently used by Melvin for PlayWright testing), as it lets Melvin one-shot the capture AND PR creation.

  5. kacper-mikolajczak commented on May 5, 2026

    @kacper-mikolajczak
    ContributorAuthor

    Oh ok cool, thanks for the heads-up Jules. I will take this into consideration!

    Next up I want to align this skill with newest adjustments to the core skill and continue with further improvements.

  6. kacper-mikolajczak commented on May 6, 2026

    @kacper-mikolajczak
    ContributorAuthor

    A second thing is that I'd like to avoid any work on performance testing for now. Nevermind, I see we have a simple skill already, we can keep it but lets not automate it further.

    @Julesssss Thanks for the insight! Let's use this to make sure what our goals for the upcoming weeks are.

    As we talked, I was planning our focus around all-things-PR related for now (recordings, evidence testing etc.) and integrating it with Melvin. Is that sounds good for you for near future or you'd like to refine something about it? Thanks!

  7. Julesssss commented on May 6, 2026

    @Julesssss
    Contributor

    Yes, PR creation sounds good. Though if we can leave some seperation that would be useful. So we can test it in isolation against existing PRs as well 👍

  8. added
    Reviewing
    Weekly
    on May 7, 2026
  9. changed the title [-]Enable agent-device to record PR evidence[/-] [+]Enable agent-device to record PR/issue mobile evidence[/+] on May 7, 2026
  10. added and removed
    Weekly
    on Jun 1, 2026
  11. melvin-bot commented on Jun 1, 2026

    @melvin-bot

    This issue has not been updated in over 15 days. @rlinoz, @Julesssss, @kacper-mikolajczak eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  12. rlinoz commented on Jun 8, 2026

    @rlinoz
    Contributor

    What are the next steps here? I think we are done and next steps is on another issue to make melvin have access to the emulators?

  13. kacper-mikolajczak commented on Jun 8, 2026

    @kacper-mikolajczak
    ContributorAuthor

    Yes, that's correct! I am working on the latter currently.

  14. rlinoz commented on Jun 9, 2026

    @rlinoz
    Contributor

    Nice, closing this one then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

MonthlyReviewing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions