Repository navigation
Add EZID service, DataCite XML builder, and skill - #109
Merged
neuromechanist merged 2 commits intoFeb 11, 2026
Merged
neuromechanist merged 2 commits into
neuromechanist merged 2 commits into
Conversation
Phase 1 of EZID DOI migration (#106): - backend/src/services/ezid.ts: EZID API client with ANVL encoding, mint/get/update/delete/makePublic operations - backend/src/services/datacite.ts: DataCite kernel-4 XML builder mapping all 20 metadata fields from BIDS data - .claude/plugins/ezid-doi/: Claude Code skill with API reference, DataCite field docs, metadata mapping, example scripts - test/ezid.test.ts: Unit + live API tests (32 tests) - test/datacite.test.ts: XML builder + BIDS mapping tests - test/ezid-sandbox.test.ts: Sandbox integration tests matching zenodo-sandbox.test.ts pattern (opt-in via RUN_EZID_TESTS=true) Tested against EZID test shoulder doi:10.5072/FK2. Full lifecycle verified: mint -> get -> update -> make public -> update metadata.
Type improvements: - Add controlled vocabulary union types (ResourceTypeGeneral, ContributorType, DateType, RelationType, DescriptionType) - Add discriminated union for EzidMintOptions (dataciteXml vs dataciteFields mutual exclusivity) - Consolidate per-author enrichment maps into single authorEnrichment record in DataCiteEnrichment - Add BidsDatasetDescription interface replacing unsafe as casts Error handling: - Add HTTP status validation in ezidRequest for non-ANVL responses - Wrap fetch in try/catch with EZID context - Fix body || undefined to body !== undefined check - Add mandatory field validation in buildDataCiteXml - Add empty-string auth validation in basicAuthHeader - Fix percentDecode for multi-byte UTF-8 via decodeURIComponent - Add parseEzidStatus for unavailable | reason parsing - Improve parseStatusLine for unknown response formats Tests: - Add ANVL continuation line, edge case, and roundtrip tests - Add colon preservation, combined encoding tests - Add PDDL license, double-quote escaping tests - Add buildDataCiteXml validation error tests - Add BIDS Funding fallback and enrichment priority tests - Use describe.skipIf for sandbox tests (honest skip reporting) - Improve assertion specificity on error messages
Contributor
Author
PR Review SummaryComprehensive review run with 5 specialized agents: code-reviewer, silent-failure-hunter, pr-test-analyzer, type-design-analyzer, and code-simplifier. All findings addressed in fccac36. Critical Issues (3 found, 3 fixed)
High Issues (5 found, 5 fixed)
Medium Issues (4 found, 4 fixed)
Type Design Improvements (5 found, 5 fixed)
Test Coverage Gaps (12 found, 12 fixed)
Test Results
Files Changed
|
neuromechanist
deleted the
106-phase-1-ezid-service-datacite-xml-builder-claude-code-skill
branch
February 11, 2026 00:55
This was referenced Feb 11, 2026
3 tasks
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 1 of the EZID DOI migration (Epic #105, closes #106):
backend/src/services/ezid.ts): Full ANVL encoding/decoding, mint/get/update/delete/makePublic operations, test and production shoulder constantsbackend/src/services/datacite.ts): Generates kernel-4 XML with all 20 DataCite metadata fields, maps BIDSdataset_description.jsonto DataCite, supports enrichment (ORCIDs, affiliations, related DOIs, funding).claude/plugins/ezid-doi/): API reference, DataCite field documentation, BIDS-to-DataCite mapping, example scripts,/ezid-testcommandzenodo-sandbox.test.tspatternTest plan
bun test test/ezid.test.ts test/datacite.test.ts(32 tests)RUN_EZID_TESTS=true bun test test/ezid-sandbox.test.ts(17 tests)doi:10.5072/FK2bash .claude/plugins/ezid-doi/skills/ezid-api/scripts/test-connectivity.sh