Skip to content

[Bug]: emulator list ignores the supplied worktree scope and lists global iOS helpers #34749

Closed

Description

@Prakashmaheshwaran

Operating system

macOS, Darwin 27.0.0, Apple Silicon; Xcode 27.1 (27A9275).

Orca version

1.4.241

Details

orca emulator list --worktree <selector> accepts a worktree selector, but the shipped runtime's listing path ignores it and delegates to the global iOS helper listing. This makes the output unsuitable for deciding which emulator helpers belong to a worktree.

Minimal reproduction for a session with a running helper:

  1. Use two existing Orca worktrees, A and B. Attach a test simulator only in A; B should have no emulator attachment.
  2. Run orca emulator list --worktree path:<worktree-A> --json.
  3. Run orca emulator list --worktree path:<worktree-B> --json and compare with orca emulator list --worktree all --json.
  4. Check whether A's helper is also returned for B.

Expected: a specific selector returns only that worktree's helpers; all explicitly requests the global list. If the operation is intentionally global, reject or clearly document the ignored selector and provide a separate ownership-aware listing.

Actual implementation evidence from the installed 1.4.241 out/main/index.js:

async emulatorList(e={}) {
  return this.requireEmulatorBridge().listRunningHelpers()
}
// Bridge:
async listRunningHelpers() {
  return this.iosBackend.listRunningHelpers()
}
// iOS backend:
async listRunningHelpers() {
  return this.execServeSim([`--list`,`-q`], {json:!0})
}

The snippets are reformatted without changing their expressions. No worktree argument is used along this path. This is static evidence, not a claim that a new multi-device test was run: the current read-only comparison returned running:false for both worktrees and all because no helper was running.

Workaround: maintain explicit device/helper ownership records and verify identity and process provenance before cleanup; do not infer shutdown authority from this listing.

Related, but different symptoms: #13831 and #12893.

Activity

  1. Prakashmaheshwaran commented on Oct 28, 2026

    @Prakashmaheshwaran
    Author

    Additional live Android evidence for the iOS-only listing path described here. Recorded on Orca 1.4.241, macOS / Darwin 27.0.0 (Apple Silicon), Android Emulator 37.2.12, API 35 Google APIs (google_apis) arm64-v8a image revision 9.

    On 2026-10-28 UTC, in the same managed worktree with the same explicit worktree selector:

    • 05:08:08.039: orca emulator attach emulator-5554 ... --json succeeded with attached:true, the correct serial, streamCodec:h264, and streamUrl:scrcpy://emulator-5554.
    • 05:08:08.252: orca emulator devices --json included that serial with backend:android, state:booted, and isAvailable:true.
    • 05:08:08.898 and 05:08:30.809: orca emulator list --worktree <worktree-selector> --json returned the following, despite the successful Android attachment:
    {"ok":true,"result":{"running":false}}

    An Android AX read overlapping the second list call completed successfully, and subsequent tap/Back operations had matching AX and screenshot postconditions. Reproduction is to attach a booted Android serial, verify it with devices and a device-targeted ax call, then run list in the same worktree. Expected: the active Android attachment appears, or the command explicitly reports that its listing is iOS-only.

    The earlier Android confirmation in #13831 (comment) describes the same omission. Adding this current-version evidence here rather than opening another issue. Workaround: use explicit Android inventory/serial verification for device state and separately maintained ownership records; running:false from this command is not proof that Android is inactive or safe to clean up.

  2. deleted a comment from AmethystLiang on Oct 31, 2026
  3. added
    emulator
    on Nov 1, 2026
  4. AmoabaKelvin commented on Nov 1, 2026

    @AmoabaKelvin
    Collaborator

    Thanks for the report! Fixed in #37127: orca emulator list now shows the iOS and Android sessions Orca manages for the selected worktree (or every worktree with --worktree all) and drops stopped devices; the help text and skill guide match. It ships in the next release.

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

Metadata

Metadata

Assignees

Labels

emulator

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions