fix: make round-trip exports independent of media mode - #1153
Merged
Conversation
Round-trip export was disabled in Stream Only even though required original documents can be fetched from LFS. Allow supported exports without changing the project's media strategy. Resolve originals through a shared loader that checks local files, the sync mirror, embedded content, and the Git LFS cache before requesting a download. Verify downloaded content and retain it in a bounded per-export cache without rewriting project originals. Share cancellable download retries with audio export, propagate cancellation through round-trip formats, keep PDF intermediates in operation-scoped temporary storage, and count only successful outputs. Clarify download progress and report individual failures without preventing other files from exporting. Add regression coverage for all round-trip formats, storage modes, local fallbacks, integrity failures, cancellation, and temporary cleanup. Validated with 104 targeted tests, compilation, type checks, and lint; LFS network and PDF subprocess boundaries are mocked in tests.
…n-stream-only Resolve import conflict in exportHandler.ts: keep the new round-trip resolver imports from this branch, adopt main's toExportFileName helper, and drop the legacy original-file/LFS lookup imports this branch replaced. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
On Windows, vscode.Uri.fsPath lower-cases the drive letter while path.resolve keeps it upper-case, so every read through the stubbed workspace filesystem missed the in-memory map and all 20 round-trip export regressions that expect a successful export failed in CI. Derive the fixture root from Uri.fsPath so both sides agree, and make the temporary-directory assertion separator-agnostic. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
LeviXIII
approved these changes
Sep 8, 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.
fix: make round-trip exports independent of media mode
Summary
Round-trip export was disabled in Stream Only mode even when original documents were available locally or could be downloaded from LFS.
Supported exports now work without changing the project's media strategy. Required originals are downloaded only when no usable local copy is available.
Changes
Test Checklist
Validation limits
LFS network requests and the PDF conversion subprocess are mocked in tests. Real PDF conversion was not exercised because its existing Python script is absent from this checkout.