Protect collection sources and preserve outputs on failed export - #1
Merged
Merged
Conversation
added 5 commits
October 1, 2026 15:23
…publication-20261001
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.
Choosing a collection input as the output previously overwrote that source, and a failed direct save could destroy an existing report. Export now snapshots inputs, rejects resolved-path and file-identity aliases before conversion and publication, writes into a private directory beside the destination, reopens the PDF to verify its page count, and replaces the destination only after validation.
Output-directory failures return the existing typed error result. Empty output documents are closed, and a cleanup error after successful publication reports the completed export rather than a misleading failure.
Validation at final candidate
95b5b73f16a4b2e9f082611be5db1444b81d8463, including maina49529b: baseline 12 failing regression cases; final local full suite 480 passed, 1 missing-local-MSIX skip. Regression coverage includes actual PyMuPDF output, hardlinks, late aliases, interrupted writes, invalid PDFs, PNG disguised as PDF, replacement failure, identity-check permission failure, empty-document closure and postpublication cleanup. Ruff, actionlint and diff checks passed. CI 36869658628 passed all six Windows/Linux/macOS × Python 3.11/3.12 jobs at this exact head; both collection suites and GUI smoke steps executed successfully. Its pre-existing Bash line continuations broke PowerShell before dependencies were installed; pip installation now uses a single portable command.Output validation uses bytes and explicitly requests PDF format, avoiding leaked Windows file handles when malformed file parsing fails. The GUI smoke fixture destroys its own window while QApplication is alive and isolates settings in a temporary INI file. It processes deferred deletion only for its own window, preserving widgets from other tests. Independent final acceptance: 36 export/native counterprobes and six GUI/ownership probes passed, all exit 0; the previous foreign-widget deletion failure was reproduced and repaired.
Merged normally as
6f6910a106bbc26d11fe2f30028eb63bb3f20428; merge and reviewed candidate have the same treeca2e63b2aab75f5166ef81e5da4c61ca7a531fe4. Canonical main is clean and matches origin/main.The existing Welcome New Contributors workflow failed because first-interaction v3 expects underscore input names. It is unchanged and was not rerun: it sends external greeting comments and is separate from source validation.
The final identity check and filesystem replacement are separate operations; protection against a concurrent external actor between them is not claimed. No version, installed binary or Store change.