Repository navigation
fix(recording): save valid manual capture prefixes on interruption - #1118
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #1091. Implements only saving the valid manual-recording prefix and stopping. It does not add clean screenshots, microphone recording/tracks, new containers or automatic recording restart, and does not close the wider feature request.
Preserve valid output without blocking playback
Manual recording now distinguishes normal completion from an early save after stream discontinuity, recorder overflow or transport interruption. It excludes the first invalid frame and stops admitting queued media after a cut. A file is saved only after a configuration-bearing video picture was written, the real Matroska trailer succeeded, the file closed and publication succeeded. Missing/empty prefixes and codec, storage, trailer or publication failures remain errors.
Keep the existing source-media tap and recorder worker. A bounded one-slot notification wakes the worker even when publisher-lock contention occurs without another media frame. Receive/decode/render publication stays nonblocking; source payloads and clocks remain unchanged. Replay export and discontinuity policy are unchanged.
Publish manual recordings through same-directory atomic no-replace rename on Linux, macOS and Windows. This avoids overwriting a concurrent destination without adding replay's hard-link requirement to manual recording. Windows paths retain extended-length/UNC representation. Cleanup does not remove an unrelated preexisting partial.
Report early completion once
Add typed completion metadata and recording-start identity to existing
savedevents and stop responses under native JSON protocol 7. The C ABI is unchanged. Qt reduces each correlated result once, shows an early-save notice, handles terminal events before acknowledgements, and ignores stale/duplicate replies. An authoritative completion releases retry gates even if a command acknowledgement was lost. Update the retained core command bridge and protocol documentation consistently.The existing notice component, rendered with a synthetic completion fixture rather than live gameplay:

Verification
Exact reviewed head:
327b77ddcb8af91b6f022c398d057a678cce6a76. The final follow-up changes only test-directory allocation; production and consumer code are unchanged from the fully tested023efd66candidate.No physical microphone, authenticated GFN disconnection, hardware decoder, HDR/10-bit/4:4:4, long-duration A/V sync or OBS performance claim is made. The Windows long-path regression passed in the first Windows CI run on identical production code. The first macOS run exposed shared timestamp-based test directories; the test-only follow-up allocates directories exclusively with a 128-attempt collision bound and adds an ownership regression. Forced collision injection confirms explicit failure after exactly 128 attempts. All 180 affected platform tests passed locally, with 3 existing ignores. Fresh required CodeQL/Windows/Linux/macOS gates passed on exact
327b77dd; actual platform logs confirm Rust 1.99 strict core/streamer Clippy and tests, all repaired prefix/publication fixtures, the Windows long-path regression, and selected Qt checks (Windows 30, Linux/macOS 32 each). A filesystem that cannot perform atomic no-replace publication reports a real save failure. Existing callback loss/runtime destruction and stalled storage do not gain crash-durability or guaranteed-notification semantics.