Skip to content

CCM-15801: Reject duplicate trust requests#298

Open
lapenna-bjss wants to merge 11 commits intomainfrom
feature/CCM-15801_reject_duplicate_trust_requests
Open

CCM-15801: Reject duplicate trust requests#298
lapenna-bjss wants to merge 11 commits intomainfrom
feature/CCM-15801_reject_duplicate_trust_requests

Conversation

@lapenna-bjss
Copy link
Copy Markdown
Collaborator

@lapenna-bjss lapenna-bjss commented Apr 17, 2026

Description

This change separates internal Lambda retries from duplicate messages sent by trusts.

If a trust sends a duplicate, we now emit a MESHInboxMessageInvalid event, which results in a negative acknowledgement back to the trust.

Internal retries are ignored. The message is removed from the inbox and no event is emitted.

Key changes:

  • S3 storage now uses a key based on senderId and messageReference. meshMessageId is stored as metadata
  • On S3 write conflicts, duplicates are classified as:
    • Internal retry (same meshMessageId)
    • Trust duplicate (different meshMessageId)
  • Internal retries are removed from the inbox, tracked via a metric, and do not emit events
  • Trust duplicates emit a MESHInboxMessageInvalid event with a DL_CLIV_004 failure code, then are removed from the inbox
  • Unit and component tests updated to cover both scenarios
  • Added missing DLQ purge in the beforeAll of a few component tests
    • Fixes failures caused by leftover messages in the DLQ

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@lapenna-bjss lapenna-bjss marked this pull request as ready for review April 22, 2026 12:34
@lapenna-bjss lapenna-bjss requested review from a team as code owners April 22, 2026 12:34
@gareth-allan gareth-allan self-assigned this Apr 23, 2026
Comment thread lambdas/mesh-download/mesh_download/document_store.py
Comment thread lambdas/mesh-download/mesh_download/processor.py
Comment thread lambdas/mesh-download/mesh_download/processor.py Outdated
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.

4 participants