Repository navigation
Phase 2: one-off DOI re-target script - #844
Merged
neuromechanist merged 2 commits intoJun 27, 2026
Merged
neuromechanist merged 2 commits into
neuromechanist merged 2 commits into
Conversation
Epic #837 Phase 2. Guarded run-once ops script (NOT a CLI/endpoint) that re-points all NEMAR EZID DOI _targets from the legacy dataexplorer URL to the canonical https://nemar.org/dataset/<id> (forwarded to ww2). Dry-run by default; --execute requires EZID creds; idempotent/resumable (skips DOIs already on the canonical target); --only canaries a single dataset. Reuses the real ezid.ts client. Dry-run validated against prod D1: 1,194 DOIs (590 concept + 604 version). The execute run is a gated prod op.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR844Version: 🤖 Updated on each push. |
neuromechanist
merged commit Jun 27, 2026
77f308f
into
feature/issue-837-epic-legacy-separation
1 check passed
This branch was previously deployed
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.
Summary
Phase 2 of epic #837. Re-targets the existing EZID DOIs from the legacy
nemar.org/dataexplorer/detail?dataset_id=<id>to the canonicalhttps://nemar.org/dataset/<id>(version DOIs:?v=v<version>), now that the Cloudflare forwarder to ww2 is live.Per owner direction, this is not a CLI command or admin endpoint (a standing "mass-mutate 1,194 prod DOIs" capability is a footgun) — it's a guarded run-once script (
scripts/retarget-dois.ts), committed as a record but not part of the deployed product._target(the doi.org resolution target). The DataCite metadata's secondaryIsDescribedByrelated-identifier self-heals on the next enrichment /nemar admin doi update(canonical since Phase 1).--executerequiresEZID_USERNAME/EZID_PASSWORD._targetis mutable),--only <id>canary, concurrency + transient-retry.planRetargetis unit-tested; dry-run validated against prod D1 (1,194 DOIs: 590 concept + 604 version).The
--executerun is a gated prod op (needs the EZID creds + explicit go); recommended sequence:--only nm000132 --executecanary → verify doi.org resolution → full run.Closes #839
Part of epic #837
Test plan
bun test test/retarget-dois.test.ts(planRetarget: identifiers, version upper-case mint-parity, no legacy URL).--executerun is performed out-of-band with creds + owner go.