Skip to content

fix: webhook retry jitter, search vector refresh, idempotency cleanup… - #1752

Merged
Olowodarey merged 5 commits into
Arena1X:mainfrom
meloball9993-star:fix/webhook-search-issues
Aug 27, 2026
Merged

fix: webhook retry jitter, search vector refresh, idempotency cleanup…#1752
Olowodarey merged 5 commits into
Arena1X:mainfrom
meloball9993-star:fix/webhook-search-issues

Conversation

@meloball9993-star

Copy link
Copy Markdown

Description

This PR fixes critical webhook, search, and backend reliability issues:

Fixes

Webhook Delivery Retry Backoff Schedule (#1631)

  • Added jitter to exponential backoff to prevent thundering herd on slow consumers
  • Backoff now caps at max attempts before marking delivery as failed
  • Delivery attempt history exposed per webhook endpoint

Search Vector Refresh on Entity Update (#1632)

  • Search full-text vectors now refresh on market title/description update
  • Added backfill support for existing rows
  • Updated entities become findable by new search terms

Webhook Processed-Events Idempotency (#1630)

  • Processed event ids recorded and duplicates short-circuited
  • Added TTL cleanup for old processed records
  • Duplicate event ids are ignored; distinct ids processed normally

Webhook Delivery Signature and Replay Protection (#1629)

  • Outbound payloads signed with HMAC-SHA256 including timestamp
  • Added X-Webhook-Timestamp header for freshness verification
  • Inbound events rejected outside freshness window (replay protection)

All fixes include proper test coverage.

Closes #1631
Closes #1632
Closes #1630
Closes #1629

…, signature timestamp

- Arena1X#1631: Add jitter to exponential backoff for webhook retries
- Arena1X#1632: Refresh search vectors on market entity update
- Arena1X#1630: Add TTL cleanup for webhook processed events
- Arena1X#1629: Include timestamp in outbound webhook HMAC signatures
- Add mimo-related entries to .gitignore
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@meloball9993-star Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
insight-arena-4rll Ready Ready Preview Aug 27, 2026 2:12pm

…ill support

- Add refreshMarketSearchVector() to SearchService using weighted tsvector
- Add backfillMarketSearchVectors() for existing NULL vector rows
- MarketsService.update() now auto-refreshes search vector on title/description change
- Inject DataSource into SearchService for raw SQL updates
- Add tests for refresh and backfill methods
…arch specs

MarketsService now depends on SearchService (for search-vector refresh)
and SearchService now depends on DataSource (for raw SQL updates), but
several spec files that build their own TestingModule providers array
weren't updated, so Nest couldn't resolve dependencies at test time.
main gained webhook-dispatcher.service.spec.ts and fuzzy-search.spec.ts
via Arena1X#1740 while this branch was in flight. Merging main in surfaces two
real conflicts with this PR's own changes:

- fuzzy-search.spec.ts builds SearchService without a DataSource mock,
  which this PR now requires for refreshMarketSearchVector().
- webhook-dispatcher.service.spec.ts asserted retry delays and HMAC
  signatures assuming no jitter/timestamp, which this PR intentionally
  adds. Updated the assertions to match the new, intended behavior
  instead of the old deterministic one.
@Olowodarey
Olowodarey merged commit dc63c01 into Arena1X:main Aug 27, 2026
5 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

2 participants