# Native baseline overlap attribution

Candidate [f1c7a8df](https://git.cafe/pingdotgg/t3code/commit/f1c7a8dfed4aca60afec1dbc9672a2bd0e17b095); baseline [b3d382e1](https://git.cafe/pingdotgg/t3code/commit/b3d382e1009d5430de8c528aef99a39854a7cbc4).

**Result: a pre-existing native recording-stop / surviving-viewer freeze is reproduced on baseline with valid advancing frames before stop. Exact hidden-state parity is NOT established: baseline hidden capture fails earlier. Do not classify the candidate stop edge as a confirmed regression from this evidence.** No implementation edits or fixes were made.

## Exact hidden attempt

Fresh exact baseline build, Electron 44.9.3 / Chromium 152.0.7977.167, Linux X11 Xvfb, `--no-sandbox --disable-gpu`. Only Electron main-process inspector attachment; no Playwright `_electron.launch`, guest evaluate, guest inspector, or parent-window capturePage. External X11 ffmpeg recording only.

- 08:45:12.902–12.945: real test-turn `preview_status` found hidden native A, available, unclaimed.
- 08:45:16.324–32.360: API `preview_recording_start` failed: `Preview automation recordingStart timed out after 15000ms.` Active recording state unconfirmed.
- Authenticated ordinary BrowserWindow viewer: pairing-token and browser-session both HTTP 200. Viewer remained Connecting with default 300×150 canvas, 0 decoded and 0 drawn frames.
- 08:45:57.163–08:46:09.204: zero viewer frames throughout; fixture HTTP ticks 1555→1795 over 12.041 s (~19.93 Hz). This is a failed prerequisite, not a stop-induced freeze. No recording-stop comparison was claimed.

## Supplementary native visible warmup and stop edge

A separate clean runtime at the same baseline was used after the exact attempt. Native A was visibly mounted before recording start. This is an explicit deviation from the candidate hidden start.

- API recording started 08:48:37.499; tool completed 08:48:37.539.
- Hiding A before viewer attach yielded Connecting. Native reveal produced only three frames, then a viewer reconnect while A stayed visible established normal advancement.
- First reconnect: 112 decoded frames by 08:50:04.265, first 08:49:58.791 / last 08:50:04.235. Saved clock frame is included.
- Native A was hidden at 08:50:10. The viewer froze at 242 decoded/drawn frames before any recording-stop request. Fixture ticks continued. This baseline visibility failure prevents using the hidden stop edge as an identical comparison.
- A was visibly mounted again; viewer reloaded at 08:50:24.721 and reattached. API recording remained active throughout. Final viewer stream began 08:50:32.733.
- Valid pre-stop advancement: 125 decoded/drawn frames at 08:50:38.979 (last frame 38.931), then 255 at 08:50:45.461 (last frame 45.433): 130 fresh decoded JPEGs in 6.482 s. Saved canvas frames and frame timestamps/bytes are retained. Adaptive stream resolution ranged 355×806 to 77×175; the low-resolution pre-stop still is not used to claim a precise clock number.
- Viewer control was released, leaving its stream attached, before stop was requested at 08:50:45.657.
- API `preview_recording_stop`: began 08:50:49.303, artifact created 08:50:49.449, completed 08:50:49.465. Returned MP4 is 307,944 bytes / 131.941433 seconds and decodes successfully.
- Last viewer frame: **08:50:49.572**, total **331 decoded / 331 drawn**, clock **2998**. The remaining viewer still showed Watching.
- At 08:51:29.773 and again 08:52:18.849: **331 unchanged**, same last-frame timestamp and clock. This is 89.277 s without viewer advancement after the last frame.
- Independent post-stop fixture sample 08:51:29.872–08:51:41.905: HTTP ticks **3804→4045** over 12.033 s (~20.03 Hz), while viewer frames stayed 331. Native A remained visibly mounted during this final stop test; no parent capture or guest probe was used.

Candidate prior evidence: stop 08:33:43.396, last viewer frame approximately 08:33:45.058, frozen through 08:34:36 with 20 Hz fixture. Baseline exhibits the same recording-stop/surviving-viewer symptom on the native surface, with a visible-source qualification. Baseline hidden capture itself could not satisfy valid pre-stop frames. A hidden-specific additional regression is neither proved nor disproved.

## Mechanism hypothesis (not a diagnosis)

Baseline `ServerBrowser.ts` starts recording and viewer screencasts through separate CDP sessions on the same native target. Recording stop sends `Page.stopScreencast` and detaches its session (around lines 1557–1559), while viewer attachment starts/stops a screencast on another session (around lines 2254–2280). Target-global screencast ownership/interference is a plausible explanation for this already-present stop edge. This run did not instrument Chromium internals or prove that mechanism. No unrelated baseline bug was fixed.

## FRICTION / limits

- Exact hidden recording start times out; visible warmup and viewer reconnect are needed to establish baseline frames. Hiding baseline A freezes its stream even before stop. These are separate baseline prerequisites, not evidence of candidate regression.
- `vp install`, server `vp run build` (including web build), and desktop `vp pack` succeeded. Direct pack avoided the known standard desktop libsecret metadata build step. Runtime logged unavailable libsecret and used its plaintext fallback inside the isolated test config; no credentials are in this pack.
- The installed baseline dependency lacked its Electron executable. The unchanged Electron 44.9.3 executable from candidate dependencies was used with freshly built baseline main/server/web bundles. Baseline desktop bundle SHA256 exactly matches the prior baseline provenance: `240619e7546de0283ea2727fb40933db06746525c87953fd726a02e743534a95`.
- First Xvfb launch died with its spawning shell; restarted as a retained session before any accepted sample. Initial Vite hydration needed reload. All reset boundaries remain in actions.
- Recording API required a thread-scoped MCP credential. Ordinary synthetic fixture-thread turns invoked recording start/stop; no delegated task/subagent tools were used. No full matrix, core A input tests, implementation work, push, forge write, merge, or watch occurred.
- Public pack excludes runtime homes, credentials, bearer values, pairing tickets/cookies, and private logs. Driver paths referring to the candidate checkout are replaced with a placeholder.

## Cleanup

All owned test processes were stopped, including Electron, backend, recorder, fixture, proxy, Vite, and Xvfb. One first-runtime backend needed SIGKILL after SIGTERM, after confirming its captured ownership and temporary baseline cwd. Temporary baseline worktree removed. Candidate source remains clean at the requested SHA. Lead ports 6013 (PID 1162159) and 14053 (PID 1237975) were untouched and remain listening. Final checks are in cleanup.json.
