Skip to content

fix: restore archived papers when reimporting documents - #20

Merged
HsukqiLee merged 1 commit into
mainfrom
fix/restore-reimported-paper
Nov 16, 2026
Merged

HsukqiLee merged 1 commit into
mainfrom
fix/restore-reimported-paper

Conversation

@HsukqiLee

Copy link
Copy Markdown
Contributor

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.

@HsukqiLee
HsukqiLee merged commit ddffc0b into main Nov 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant