Skip to content

fix(emulator): launch scrcpy through the background process wrapper - #35566

Merged
OrcaWin merged 1 commit into
mainfrom
audit/scrcpy-background-process-spawn
Oct 29, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
audit/scrcpy-background-process-spawn

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3

LoC: +5/-2

Launch the long-running scrcpy ADB server through the existing spawnProcess wrapper. Its direct Node spawn omitted Orca's Windows console-hiding policy. The wrapper supplies windowsHide: true, shell: false and existing argument handling while preserving argv, ignored stdin, piped output and the existing ChildProcess lifecycle.

Stacked on #35531; reconcile/merge it first, then retarget/rebase main and revalidate. Preserve #35518 socket retirement and adjacent SDK/network guards.

Validation: 33 emulator tests/three suites plus six existing process-host resolver policy tests pass; strict focused TypeScript and all five normal hook tasks pass. Real Node26.8.1 native spawn/pipes/TCP, seven baseline/21 final exact source inputs, ten groups per arm at N1/10: all 55 final launches emit the hiding/shell flags vs zero before. Both arms drain 4,325,629 bytes and emit 55 metadata/close callbacks; all 110 helper PIDs, socket peers, servers and profiles released. Final executed bundle rebuilt byte-identically.

This proves emitted flags on Linux and existing modeled win32/darwin/linux resolver policy. Actual Windows console/focus behavior, macOS, native ADB/device, Electron UI and CPU/RSS/latency remain untested. No new tests merely asserting the wrapper call; no installs or native ABI repair.

Aggregate queued after #35561; no pass or Claude takeover claimed. Frozen head 1c2ee0ea5c293ba12ca8863fb9bd4293bd7cd810, parent 955c6980c229ac98bea68d9e3da98622eadd9f93. Evidence /home/neil/.local/state/orca-electron-audit/scrcpy-background-process-spawn/report.md; 40-payload seal 00598a483e6ac8a252dc21b986bd34c67fca1ce5fbb3fd7f4efb8d8b67afd5dc.

@OrcaWin
OrcaWin changed the base branch from audit/scrcpy-server-log-preview to main October 29, 2026 20:39
@OrcaWin
OrcaWin force-pushed the audit/scrcpy-background-process-spawn branch from 1c2ee0e to c659d42 Compare October 29, 2026 20:40
@OrcaWin
OrcaWin marked this pull request as ready for review October 29, 2026 20:48
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

ScrcpyStreamSession now imports spawnProcess from @orca/process-host and uses it to start the scrcpy server with the ADB executable, server arguments, and existing options. The existing server output capture and error and exit handling remain.

Priority: Low

Merge Risk: Minimal · up to a70ca

The change is mergeable; supported scrcpy launches retain their existing behavior while gaining Windows console hiding.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description clearly explains the change, rationale, validation, and untested areas. However, it omits most required template sections, including ELI5, explicit What Changed and Why headings, a Fix… Update the description to follow the repository template. Add the missing sections and required details, including an explicit issue link such as Fixes #, Visual Proof with N/A and a reason if applicable, structured testing results and plat…
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: launching scrcpy through the background process wrapper.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Full details: Description check

Explanation

The description clearly explains the change, rationale, validation, and untested areas. However, it omits most required template sections, including ELI5, explicit What Changed and Why headings, a Fixes issue reference, Visual Proof or N/A, structured Testing, AI Disclosure, Review, Agent skill upstream boundary, Notes, and the Checklist.

Resolution

Update the description to follow the repository template. Add the missing sections and required details, including an explicit issue link such as Fixes #, Visual Proof with N/A and a reason if applicable, structured testing results and platforms, AI disclosure when applicable, review and boundary statements, notes, and checklist status.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable issues were found.

Summary

Routes the long-running scrcpy server through spawnProcess.

  • The Android scrcpy server starts through Orca’s background process wrapper.

Reviews (4) · Last reviewed commit: "fix(emulator): launch scrcpy through the..." · Reviewed by Greptile

@OrcaWin
OrcaWin force-pushed the audit/scrcpy-background-process-spawn branch 2 times, most recently from f9c9fe4 to 6b73552 Compare October 29, 2026 21:18
@OrcaWin
OrcaWin force-pushed the audit/scrcpy-background-process-spawn branch from 6b73552 to a70ca32 Compare October 29, 2026 21:44
@OrcaWin
OrcaWin merged commit 71918d4 into main Oct 29, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant