Skip to content

test(webhooks): cover bounded retry and safe dead letters - #476

Open
flowpatch-reliability wants to merge 1 commit into
Posnic:developfrom
flowpatch-reliability:webhook-retry-dead-letter-fixture
Open

test(webhooks): cover bounded retry and safe dead letters#476
flowpatch-reliability wants to merge 1 commit into
Posnic:developfrom
flowpatch-reliability:webhook-retry-dead-letter-fixture

Conversation

@flowpatch-reliability

Copy link
Copy Markdown

Closes #75. Links back to the integration-platform parent #34.

This adds the requested deterministic failure-path coverage and tightens the durable record contract:

  • timeout and 5xx failures retry with bounded backoff
  • non-retryable 4xx failures dead-letter immediately
  • success after retry reuses the same X-Posnic-Delivery id (documenting at-least-once duplicate expectations)
  • permanent 5xx failure stops at MAX_ATTEMPTS
  • durable failures store only stable error codes, not raw exception text
  • dead-letter rows remove shop/time payload fields and record deadLetteredAt

Validation performed:

  • node --check api/src/realtime/webhooks.js
  • node --check api/tests/unit/realtime/webhooks.test.js
  • standalone Node failure-path harness covering 400, 500, retry-success, stable delivery IDs, and permanent failure

The container did not include npm, so I could not run the repository Jest command locally.

Adds explicit retry classification, stable delivery-ID coverage, bounded permanent-failure tests, and sanitized dead-letter metadata.

Refs Posnic#75 and parent Posnic#34.
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.

Webhooks: add retry and dead-letter fixture

1 participant