Skip to content

fix(emulator): retain only the scrcpy server log preview - #35531

Closed
OrcaWin wants to merge 1 commit into
mainfrom
audit/scrcpy-server-log-preview
Closed

OrcaWin wants to merge 1 commit into
mainfrom
audit/scrcpy-server-log-preview

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 29, 2026 •

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

LoC: +50/-2

Retain the existing first1000-character scrcpy exit-log preview while continuing to drain stdout/stderr. The session previously decoded and retained every helper log chunk,then discarded everything after that preview on exit. Stop decoding once the preview is full; preserve short/Unicode diagnostics and output order.

Validation:21 configured tests/3 suites,1 expected baseline regression with8 controls,strict focused TypeScript and all5 normal hook tasks pass. Real Node26.8.1 pipes/owned helper children:10groups per arm at1/10 streams. Both variants drain553648128large-log bytes;decoded input drops from553648128bytes/8604calls to2046720bytes/33calls. All55exit previews per arm match;all110helpers and socket/server/profile resources cleaned. Seven exact production modules;real spawn observer and controlled ADB/helper boundaries disclosed. Generated bursts establish discarded work,not typical device logging volume. Logical preview length is1000UTF-16 codeunits;V8 backing storage,RSS,CPU,latency,physicalAndroid/ADB,nativeElectronUI and macOS/Windows were not measured.

A similar cap was part of #10179 and removed by the broad #10255 revert. Saved history documents that context;this focused change adds session-level and native-pipe evidence without restoring the broad PR. Eight source/caller blobs equal main9babef286. Preserve #35518 socket cleanup and #9950 tests on rebase.

Required aggregate queued after #35518;no aggregate pass or Claude takeover claimed. Frozen head 955c6980c229ac98bea68d9e3da98622eadd9f93,base 79dbada2c873bef3584a0c53b23ae98f2a84e536. Evidence /home/neil/.local/state/orca-electron-audit/scrcpy-server-log-preview/report.md;44-payload seal f8b375e8124130c6b9562bf1085c9e3c416e30210a494c3b49981479c53e041e.

@OrcaWin

OrcaWin commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks. Closing: the scrcpy server runs at log_level=info and emits only a few lines per session, so the unbounded capture never grows enough to matter for real users. The evidence relies on synthetic 550MB bursts, and the Buffer.toString call-count test checks implementation details.

Closing per maintainer triage (low-risk / zero user trade-off / material-gain bar).

@OrcaWin OrcaWin closed this Oct 29, 2026
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