Skip to content

fix(harvester): normalize malformed URN identifiers#866

Open
TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/harvester-invalid-urn-identifier
Open

fix(harvester): normalize malformed URN identifiers#866
TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/harvester-invalid-urn-identifier

Conversation

@TahaKhan998

@TahaKhan998 TahaKhan998 commented Jul 20, 2026

Copy link
Copy Markdown

Part of #861.
Solves no.7 of https://codimd.web.cern.ch/s/DBWeY3d5y

This fixes the harvester failure metadata.related_identifiers.identifier: Invalid URN identifier, which was found for INSPIRE#1714668. INSPIRE marks the identifier as a URN but provides it in a malformed form such as http://nbnurn:nbn:de:..., while CDS-RDM expects it to start with urn:. The related identifier mapper now extracts the actual urn: value, validates and normalizes it with idutils, and only adds it when it is valid. Values that cannot be safely corrected are skipped and reported as transformation errors instead of reaching CDS record validation. The same handling is used for both persistent and external identifiers, while the existing behavior for valid URNs, DOIs, and other identifier schemes stays unchanged. Tests cover the real failing value, existing valid URNs, and values that cannot be corrected.

image image

@TahaKhan998 TahaKhan998 linked an issue Jul 20, 2026 that may be closed by this pull request
8 tasks
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.

thesis harvester: verification

1 participant