Repository navigation
Show the PDF on a deposit request, not a preview site - #10
Conversation
A "Deposit: <slug>" pull request asks one question -- should this note have a DOI minted against it -- and the thing that answers it is the archival PDF. Publishing a whole preview site to answer that costs minutes and still leaves you clicking through a page to reach the download. So deposit-queue branches no longer trigger the preview, and deposit-pdf.yml builds the PDF for the slugs THIS pull request adds to the queue and uploads it as a run artifact, with a comment saying where to find it. Entries already in the queue are skipped: they have been deposited, and rebuilding their PDFs says nothing about the decision in hand. Two things it deliberately does. It fails if no PDF was produced, because MyST can drop a figure or a whole export and still exit zero -- which is how UWTN 2026-011 nearly shipped without one -- and an empty artifact that reads as a passing check is worse than a failed run. And it carries no Figshare token and no --live, so it can show you a PDF and nothing else. Also, since the preview stays for note branches: its comment now links the built PDF directly alongside the page, rather than making a reviewer open the note and hunt for the download. Underworld development team with AI support from Claude Code
Louis: 'if there is no doi added, the deposit should not really be creating that artefact'. The overclaim was mine -- I called it the copy that gets deposited and it cannot be. TWO title-page fields differ, not one: the DOI, and archived_at, which is stamped immediately before the rebuild and also prints. Both are written by the deposit run itself, so neither can exist in a PDF built before that run. It is still worth having, but for the reason that is true: the body is what gets archived, and the body is where figures, maths, references and layout can actually be wrong. The two fields that differ are machine-written and cannot be wrong in an interesting way. The workflow and its comment now say that instead of claiming equivalence. Underworld development team with AI support from Claude Code
The previous commit corrected the wording the reviewer sees but left the comment above the build step still claiming the artifact is what gets uploaded. Same correction, same reason. Underworld development team with AI support from Claude Code
|
Preview: https://underworld-technical-notes.github.io/underworldcode.org-preview/cfe41783d4/ No article changed on this branch. Built from |
Louis asked what happens if a run aborts after reserving the DOI. That case is benign: a reserved Figshare DOI is not registered until publish, so an abort before publish leaves an inert draft that --delete-draft removes, and a re-run resumes because run() reads archive_doi and repository_record_id back out of metadata.yml instead of reserving again. The dangerous window is one step later. A run that PUBLISHES and then dies before its identifiers pull request is merged leaves the DOI live and citable while this repository has no record of it. pending() selects on archive_published_at, so the note still looks undeposited and the next run would mint a SECOND live identifier for it. Two citable DOIs for one note is the only outcome in this design that cannot be undone -- a published DOI is superseded, never withdrawn. An open deposit/identifiers-* pull request is precisely that state, sitting in plain sight, so the deposit now refuses to start while one exists and says to merge it first. Nothing previously stopped someone re-running past it; the data supported the guard but only a human remembering enforced it. dry-run and delete-draft are exempt. Neither can publish, and cleaning up a stray draft is a reasonable thing to want while the pull request is open. The test asserts the guard runs BEFORE the first --live step, since a check that fires after the deposit has already talked to Figshare guards nothing. Negative-controlled. Underworld development team with AI support from Claude Code
|
Added the guard discussed: the deposit now refuses to start while an open Why that window and not the one it looks like. An abort after reserving is benign — a reserved Figshare DOI is not registered until publish, so it leaves an inert draft that The dangerous window is one step later. A run that publishes and then dies before its identifiers pull request merges leaves the DOI live and citable while the repository has no record of it. An open identifiers pull request is exactly that state, in plain sight — so the workflow stops and says to merge it first. The test asserts the guard runs before the first Underworld development team with AI support from Claude Code |
|
Added the preview-link work discussed. The notification is the preview. The directory is a hash of the branch name and nothing links to it, so a missing comment is a missing preview — which is what happened to UWTN 2026-012, recovered only by computing the URL by hand. Two defects, both fixed here.
The dedupe never worked. It matched Underworld development team with AI support from Claude Code |
The paths filter added in #10 did not stop #8 previewing. GitHub evaluates a paths filter against the files changed IN THE PUSH, and "Update branch" merges main into the branch -- so the merge commit touches articles and the filter matches, even though the branch's net difference from main is still one line of deposit-queue.txt. Since a strict-protection repo REQUIRES that update before merging, every deposit request would have previewed at exactly the point it was about to be merged. branches-ignore now carries 'deposit/**', which says what was meant: a deposit branch never wants a preview, whatever a merge dragged onto it. The question it asks is answered by deposit-pdf.yml. Also fixed a test that pinned the literal string "branches-ignore: [main]" and so failed the moment another branch was added to that list -- the second time today a guard has broken on a change that strengthened what it guards. It now checks that main is in the list, however the list is written. Underworld development team with AI support from Claude Code
Louis's call and the right one: a Deposit:
<slug>pull request asks whether a note should get a DOI, and the archival PDF answers that. Building a whole preview site for a one-line change todeposit-queue.txtcosts minutes and still leaves you clicking through a page to reach the download.What changes
preview.ymlgainspaths-ignore: ['deposit-queue.txt'], so a deposit branch no longer publishes a preview site.deposit-pdf.ymlbuilds the PDF for the slugs this pull request adds to the queue — entries already present have been deposited, so rebuilding them says nothing — and uploads it as a run artifact, with a comment saying where to find it.Two deliberate properties
It fails if no PDF was produced. MyST can drop a figure, or an entire export, and still exit zero — which is how UWTN 2026-011 nearly shipped without one. An empty artifact that reads as a passing check is worse than a failed run.
It has no
FIGSHARE_TOKENand no--live, asserted by test. It shows you a PDF and nothing else; merging remains the only thing that mints an identifier.One caveat worth knowing: the artifact's title page has no DOI on it, because the DOI does not exist until the deposit run reserves it. Everything else is the copy that gets uploaded.
Underworld development team with AI support from Claude Code