Skip to content

fix(preview): recover recording lifecycle with native settlement proof - #839

Merged
Mjones13 merged 2 commits into
mainfrom
fix/browser-recording-recovery-2d8c70e7-20261103
Nov 3, 2026
Merged

Mjones13 merged 2 commits into
mainfrom
fix/browser-recording-recovery-2d8c70e7-20261103

Conversation

@Mjones13

@Mjones13 Mjones13 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

A recording start that expires before touching its tab now releases its own request and marker even if the desktop detached first. Late preparation closes only its own scratch resources. Once tab work has begun, capture remains blocked until native cessation and every submitted command are accounted for. A concurrent stop during an existing stop returns its own not_started result instead of falsely reporting no active recording.

Recorder state remains attributable to the current tab instance. Frame tokens prevent late callbacks and encoder completions from sending commands against a successor. Stop files are written as pending attachments before cessation proof; only an ordinary proven success lets the existing handler move the file into the thread. Status owns its title deadline and reports recorder metadata without lifting quarantine. Wire compatibility, #824 retention and the original SessionControl started-permit regression are preserved.

Validation on the final committed bytes:

  • Full 12-file REC-H affected union: 282 tests passed, including the real broker and recording-stop handler, guard and compatibility suites.
  • 42 gated start-await cases cover scratch creation, encoder script, capture queue, initial capture, first encoder-frame evaluate, CDP session creation and native start. Each exercises server close, logical drop and replacement, before and after expiry. Inert replacement cases start B before releasing A.
  • Both duplicate-active paths; held accepted=false completion released after B is active; shared-debugger effect/reply gates and cleanup resolve/reject/noncompletion. The detached-owner protocol-error branch executes while a legitimate ack reply is held on an open session/connection; separate closure controls keep commands unanswered and captures blocked.
  • Regressions fail against the reviewed source. Negative controls on the formatted final candidate disable the F1/F2 fixes, current-instance checks, replacement barrier, command drain, cessation proof, frame authority and status deadline ownership; exact byte restoration is recorded before the positive union.
  • Server and contracts typechecks, focused format/lint, strict Jones boundary, scoped unused exports, native vp commands and test-scratch cleanup checks passed. Ordinary pre-commit hooks retained.

The 15 unmodified Chromium cases remain unavailable. Apple Silicon/native behavior and the underlying capture-stall cause remain unqualified. This is a source change; no installed application/server was updated or restarted. Independent affected re-review, current-head CI, merge and final UI qualification remain with the root owner.

Implemented by GPT-6.1 Sol through the Codex harness.

@Mjones13
Mjones13 merged commit 424cc87 into main Nov 3, 2026
31 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.

2 participants