SUBMISSION-196 PDF-Only Stamping#84
Merged
Merged
Conversation
…ISSION-196] TeX2PDF stamps TeX submissions and stores both stamped and unstamped PDFs in GCS during /convert; PDF-only submissions never run /convert, so do the equivalent on the Submit 2.0 side. New InstallPdfPreview (EventWithSideEffect, runs under the submission row lock) copies the uploaded PDF to <id>-nostamp.pdf, calls the tex2pdf /stamp/ endpoint, and writes the stamped PDF to the preview slot <id>.pdf -- falling back to the unstamped bytes if stamping fails so the preview slot is never empty. The controller dispatches this instead of doing unlocked store_preview work. Stamp text mirrors arXiv::Submit::Util::stamp_and_link. Adds CompileService.stamp (+ api impl and mock), the store_nostamp_preview slot across all file stores, and tests covering the stamped path, stamp-failure fallback, idempotency, and that stamping does not bypass the must-review gate (submitter_confirmed_preview ys False). David
DavidLFielding
requested review from
bdc34,
bmaltzan,
jweiskoff and
norbusan
as code owners
July 8, 2026 21:53
bdc34
reviewed
Jul 15, 2026
bdc34
reviewed
Jul 15, 2026
bdc34
reviewed
Jul 15, 2026
bdc34
reviewed
Jul 15, 2026
bdc34
reviewed
Jul 15, 2026
bdc34
reviewed
Jul 15, 2026
bdc34
reviewed
Jul 15, 2026
bdc34
requested changes
Jul 15, 2026
…-Only-Stamping # Conflicts: # submit_ce/implementations/file_store/gs_file_store.py
…tamp [SUBMISSION-196] David
…BMISSION-196] David
…, not viewed [SUBMISSION-196] David
bdc34
approved these changes
Jul 21, 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.
The prior PR #71 installed the PDF-Only in the location expected for preview (was missing). For TeX submissions the unstamped and stamped PDFs are placed at the top of the submission directory path. Since the new stamp code works reliable for PDF-Only submissions it makes sense to stamp the PDF while we are making the effort to copy the PDF to the preview location.
I did add the unstamped PDF in the same location as we do for TeX submission, but we already have it in the src directory, so I'm still debating about whether this helps.
This calls the TeX2PDF /stamp route and copies the stamped PDF into the preview location, and the unstamped PDF next to it. This seemed like an easy add on after adding the original code to install the PDF.
$ gcloud storage ls -l gs://arxiv-submit-dev/dlf2/4
2917 2026-07-08T21:24:03Z gs://arxiv-submit-dev/dlf2/4/4-nostamp.pdf
5121 2026-07-08T21:24:06Z gs://arxiv-submit-dev/dlf2/4/4.pdf