Skip to content

Bug: Failed concept merges do not appear in notifications #2800

Description

@filiperochalopes

User story

As a curator, I want failed background concept merges to appear in the notification center so I know when a merge was rolled back and can investigate or retry it.

Use case

A concept merge runs in the background and OCL rejects one or more writes. The merge is rolled back, but the curator receives no notification and may incorrectly assume the operation is still processing or was successful.

Requirements

  • Record a concept_merge.failed notification when a background concept merge fails or is rolled back.
  • Include a link to the failed merge or its merge history.
  • Preserve the existing merge and OCL write-log details as the notification evidence.

Acceptance criteria

  • Given a concept merge is rolled back after an OCL rejection, when the background job finishes, then an error notification appears in the user's notification center.
  • Given a concept merge fails unexpectedly, when the background job finishes, then an error notification appears in the user's notification center.
  • The notification identifies the affected merge and does not change the existing rollback behavior.

More details (collapsible)

Investigation evidence

The notification registry already defines concept_merge.failed as a persistent error event with browser push enabled.

However, the concept merge execution path in apply_concept_merge / run_merge_job updates the merge job and item status but does not call notification_service.record.

Recent examples:

  • 118305 → 118306: rolled back after OCL returned HTTP 400 because a name already existed for the same source and locale.
  • 115801 → 115800: rolled back for the same type of OCL rejection.

The failures are visible in the merge history and ocl_concept_write_logs, but not in the notification center.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

signal/low-riskSafe to execute with minimal downsidesignal/quick-winLow complexity, high clarity — easy winsignal/small-scopeLimited to a small part of the codebasesignal/well-specifiedClear requirements and acceptance criteriastage/triagedAI triage complete — scored and classifiedtype/bugSomething is broken

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions