Skip to content

fix harvester conflict handling#854

Merged
kpsherva merged 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:feat/issue-846-harvester-inspire-source-of-truth
Jul 15, 2026
Merged

fix harvester conflict handling#854
kpsherva merged 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:feat/issue-846-harvester-inspire-source-of-truth

Conversation

@TahaKhan998

Copy link
Copy Markdown

Closes #846
This change reduces false harvester conflicts by treating INSPIRE as the source of truth for valid publication date differences. For regular records, the incoming INSPIRE publication date is now applied automatically instead of requiring manual conflict resolution. Records with a CDS-managed DOI remain on the existing strict conflict path because CDS is authoritative for those records. Genuine transformation failures and other update conflicts continue to be reported as errors.
Tests cover both regular records and CDS-DOI records to verify the two policies behave as expected.

@TahaKhan998
TahaKhan998 force-pushed the feat/issue-846-harvester-inspire-source-of-truth branch from eab429e to 386dcb0 Compare July 15, 2026 09:15
"metadata.identifiers": IdentifiersFieldUpdate(),
"metadata.related_identifiers": RelatedIdentifiersUpdate(),
"metadata.publication_date": PublicationDateUpdate(),
"metadata.publication_date": PublicationDateUpdate(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be easier to use OverwriteFieldUpdate, instead of creating a new argument?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I changed this to use OverwriteFieldUpdate and removed the new argument.

}


CDS_DOI_UPDATE_STRATEGY_CONFIG = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this name confused me a little bit - I would suggest changing it to something more descriptive

Suggested change
CDS_DOI_UPDATE_STRATEGY_CONFIG = {
CDS_ORIGINAL_RECORD_UPDATE_STRATEGY_CONFIG = {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I renamed it to CDS_ORIGINAL_RECORD_UPDATE_STRATEGY_CONFIG.

@TahaKhan998
TahaKhan998 force-pushed the feat/issue-846-harvester-inspire-source-of-truth branch from 386dcb0 to 55a9af7 Compare July 15, 2026 14:26
@kpsherva
kpsherva merged commit a9c8734 into CERNDocumentServer:master Jul 15, 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.

Harvester: reduce false conflicts by treating INSPIRE as source of truth (except CDS-DOI records)

2 participants