Install verified FFmpeg libraries transactionally - #135
Draft
Blackspirits wants to merge 1 commit into
Draft
Blackspirits wants to merge 1 commit into
Blackspirits wants to merge 1 commit into
Conversation
Blackspirits
commented
Sep 15, 2026
Blackspirits
left a comment
Owner
Author
There was a problem hiding this comment.
Final adversarial review on exact HEAD dd7e85e4319154aaf3105f85e745509ea902c4dc after authoritative CI SubtitleEdit#270. Rechecked staging/validation/commit ordering, cancellation boundaries, partial replacement rollback, preservation of unrelated target files, duplicate flattened leaf-name rejection, binding-major-derived required DLL names, and the fail-closed path when rollback itself fails. The active FFmpeg folder is not touched until all five directly required runtime libraries are present; handled commit failures restore prior bytes. No correctness blocker found. PR remains draft; no merge/promotion performed.
This was referenced Sep 15, 2026
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.
Purpose
Dependent follow-up to #134 ("Pin and verify the FFmpeg shared-library archive").
#134 authenticates the downloaded native-code archive before extraction. This tranche hardens the next boundary: installing those verified DLLs into the active FFmpeg library folder without leaving a partial/hybrid runtime if extraction or replacement fails.
Current upstream
SubtitleEdit/subtitleeditmain was rechecked atd6917286e355976da953d0ee22208b4bf9461699; its latest delta only changes the mpv preview subtitle margin and does not touch the FFmpeg downloader/installer.Findings fixed
Failed extraction could leave a mixed FFmpeg installation
ExtractLibraries()previously wrote every/bin/*.dlldirectly into the active folder with overwrite enabled. Cancellation, disk-full, permissions, AV/file-locking or ZIP failure after some entries had been written could leave new and old FFmpeg DLLs mixed together.Any single DLL counted as success
The old success condition was only
count > 0. The player directly requires avcodec, avformat, avutil, swscale and swresample, so a partial archive could be reported as installed.Fix
Installation is now a fail-closed transaction:
/bin/*.dllonly into private staging;/bin/*.dllentries from the verified archive.Regression coverage
Tests cover complete installation, incomplete archive fail-before-change, cancellation before commit, rollback after the first active DLL has already been replaced, cleanup of staging/backup after successful paths, preservation of unrelated files, and the updated complete-runtime extraction contract.
Scope / branch state
88f1405ec15e2b73d9192c0307cb2efc3da65d3edd7e85e4319154aaf3105f85e745509ea902c4dcd6917286e355976da953d0ee22208b4bf9461699AI assistance: ChatGPT was used for adversarial native-library installation review, transactional staging/rollback design, binding-major validation and focused failure-path regression coverage.
Final CI
Authoritative run: SubtitleEdit#270 on
dd7e85e4319154aaf3105f85e745509ea902c4dcFinal adversarial review was performed on this exact HEAD after CI; no blocker found.