Skip to content

Zenodo reuse-external: archive under the record's existing DOI - #1

Merged
sickerine merged 5 commits into
openscholarfrom
feat/zenodo-reuse-external
Aug 24, 2026
Merged

Zenodo reuse-external: archive under the record's existing DOI#1
sickerine merged 5 commits into
openscholarfrom
feat/zenodo-reuse-external

Conversation

@sickerine

@sickerine sickerine commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Adds the Zenodo identifier policy reuse-external: Zenodo publishes under the DOI the record already has, without registering or minting anything.

  • zenodoReusedDoi(policy, identifiers) is the one place that decides which DOI Zenodo must use (Crossref-managed, the record's own, or none).
  • Planner: MISSING_EXTERNAL_DOI when the policy is asked for without a record DOI; the Zenodo payload carries the record DOI; Crossref is never waited on or written.
  • Mapper and snapshot: metadata.doi set, prereserve_doi never sent (existing external-crossref deposit policy).
  • Executor: a Zenodo DOI collision recovers through the same lookup as for reused Crossref DOIs.
  • Target policy: reuse-external does not require Crossref.

Consumer: OpenDevEd/new-el PR #119 (plan 03 in plans/optional-doi/).

Tests: 314 passing (4 new). Lint and build clean.

Note

Add reuse-external identifier policy for Zenodo archival

  • Adds the reuse-external policy to archive Zenodo records under their existing bibliographic DOI without requiring Crossref
  • Updates planner.ts to return MISSING_EXTERNAL_DOI if the DOI is absent. The DOI is propagated to Zenodo snapshots and file-correction approval checks
  • Adds recoverAlreadyPublishedDraft to live-executor.ts to adopt a published record when publishJournaledDraft returns a 404
  • Behavioral Change: buildZenodoPayloadSnapshot in snapshots.ts now uses external-crossref doiPolicy for reuse policies

Macroscope summarized 0715aa7.

…dy has

A third Zenodo identifier policy. Zenodo publishes under the record's own
DOI (the bibliographic DOI) instead of a Crossref DOI this library
registered or a DOI Zenodo mints. Nothing is registered or prereserved;
the existing external-crossref deposit policy sends metadata.doi. The
planner needs attention (MISSING_EXTERNAL_DOI) when the policy is asked
for without a record DOI, and a DOI collision on Zenodo recovers through
the same lookup used for reused Crossref DOIs.
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 15116c85-1d5a-47c1-9806-70ead62ee9c4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread src/planner.ts
…publish answers 404

When an earlier run published the draft but failed before the journal was
cleared, every retry hit 404 on the draft and the job looped. The published
record keeps the draft's id, so the executor now reads it and adopts its
identifiers, the same way a DOI collision is adopted. ZenodoWriter gains
an optional readPublishedRecord; the client implements it on top of
readRecordSnapshot.
…s keep this

Detaching the method lost the client instance and failed with "Cannot read
properties of undefined (reading 'readRecordSnapshot')" on the first live
recovery. The test now uses a class instance provider.
Comment thread src/executor/live-executor.ts
@sickerine
sickerine merged commit 84c55ae into openscholar Aug 24, 2026
3 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