Repository navigation
Add EZID DOI provider integration and ORCID support - #110
Merged
Merged
Conversation
Integrate EZID as the default DOI provider with per-dataset provider selection. Add ORCID collection at user registration for automatic DataCite creator metadata enrichment. - Add DOI provider dispatch layer (backend/src/services/doi.ts) - Add database migration for ORCID and EZID columns - Update signup flow to collect optional ORCID - Update concept DOI route to support EZID and Zenodo - Update webhook version DOI with dual-provider routing - Add CLI --provider option and doi update command - Add tests for ORCID validation and DataCite enrichment Closes #107
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR110Version: 🤖 Updated on each push. |
- Fix webhook default provider to "ezid" (was "zenodo", inconsistent) - Add EZID credential validation before DOI operations - Make concept DOI update non-fatal in version DOI creation - Add BIDS metadata warning to concept DOI response - Validate JSON.parse result shape for dataset_description.json - Add NaN guard for Zenodo providerRecordId parseInt - Fix inaccurate JSDoc on concept DOI route
Contributor
Author
PR Review SummaryRan 6 specialized review agents in parallel (code, errors, tests, types, comments, simplify). Critical Issues (6 found, all fixed)
Important Issues (documented, deferred to Phase 3)
Improvements Applied (by code-simplifier)
Type Design Notes (deferred)
Strengths
|
- Fix HasVersion overwrite: add dataset_versions table to track all version DOIs; concept DOI update now includes all versions - Add parseDoiProvider() to replace unsafe `as` casts at DB boundary - Add EZID credential validation to DOI update endpoint - Make refresh_metadata fail explicitly when repo/file missing - Surface manifest errors in webhook JSON responses - Refactor DoiResult to discriminated union on provider field - Refactor CreateConceptDoiResponse to discriminated union - Type ezid_status as literal union instead of bare string - Add 18 new tests: parseDoiProvider, buildOrcidEnrichment matching, credential rejection, multiple HasVersion preservation
Contributor
Author
Final Review SummaryAll critical, important, and suggested issues from the 6-agent review have been addressed across 3 commits. Commit 1: Implementation (4a18316)Phase 2 EZID DOI provider integration and ORCID support (13 files, 1081 insertions). Commit 2: Initial review fixes (c3c011f)
Commit 3: All remaining review findings (80de83a)
Review Agent Results
Verification
Closes #107 |
Separate sandbox credentials (EZID_SANDBOX_USERNAME, EZID_SANDBOX_PASSWORD) so --sandbox uses the test account instead of production credentials. resolveEzidAuth() picks the right credentials based on sandbox flag.
- Export resolveEzidAuth from doi.ts, use in /doi/update route (fixes bug where inline credential logic didn't throw on empty creds) - Fix inaccurate comments: DOI permanence, "Zenodo as fallback", uploaderName purpose, handler descriptions, DoiResult docstring - Add sandbox credential routing tests (5 new) - Add wrangler.toml sandbox secret comments
Contributor
Author
PR Review v2 Summary (Post-Sandbox Credential Changes)All 6 specialized review agents ran. All findings addressed in commit d57c498. Critical Issues Fixed (2)
Important Issues Fixed (5)
Tests Added (5)
Suggestions Deferred (not blocking)
Test Results305 pass, 17 skip, 0 fail (596 expect() calls across 14 files) |
This was referenced Feb 11, 2026
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
backend/src/services/doi.ts) that routes concept and version DOI creation to EZID or Zenodo based on per-datasetdoi_providersettingorcidon users table andezid_identifier,ezid_status,doi_provideron datasets table--provideroption todoi createand newdoi updatecommand for EZID metadata refresh/status changesTest plan
bun testpasses (283 pass, 17 skip, 0 fail)bunx tsc --noEmittype-checks cleanbun run buildproduces working CLI bundlenemar auth signupcollects ORCID,nemar auth status --refreshshows itnemar admin doi create nm099999 --provider ezidmints on test shoulder0007_ezid.sqlto D1wrangler secret putCloses #107