Repository navigation
fix: restore archived papers when reimporting documents - #20
Merged
Merged
Conversation
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.
Re-importing an archived paper through the Python document store returned the existing paper ID while leaving it archived, so the caller still received 404 when opening the result. The same failure occurred for duplicate content, new document versions and the early return that protects registry-verified metadata.
Restore the existing paper within the ingestion transaction before those paths diverge. Paper identity, workspace boundaries, immutable versions and verified-metadata protection remain intact. The Go ingestion path already restores archived papers and needs no change.
The new Store/HTTP/SQLite regression failed in all three cases before the fix. Five focused scenarios now pass, including existing metadata-upgrade and archive-permission checks. A broader local four-file test run timed out and is not counted as passing; CI must pass before merge. Addresses FR-02 in #4.