You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a backend issue for the GrantFox FWC26 campaign. Replace the string cursor with a stable, sortable keyset so webhook-event pagination is exact.
e.id is a UUIDv4; lexicographic < comparison on UUIDs is not chronological — rows with created_at ordering can be skipped or repeated across pages.
The route GET /api/webhooks/:publicKey/events (in backend/src/routes/webhooks.js) additionally re-paginates in memory with (b.timestamp || 0) - (a.timestamp || 0) on top of the DB query, so two different orderings fight each other.
Labels:
Official Campaign | FWC26GrantFox OSSMaybe RewardedbackendwebhooksapibugRequirements and Context
backend/src/services/webhookService.js—getEvents:e.idis a UUIDv4; lexicographic<comparison on UUIDs is not chronological — rows withcreated_atordering can be skipped or repeated across pages.GET /api/webhooks/:publicKey/events(inbackend/src/routes/webhooks.js) additionally re-paginates in memory with(b.timestamp || 0) - (a.timestamp || 0)on top of the DB query, so two different orderings fight each other.getEventscursor pagination for the events route; this issue is the service-layergetEvents/replayEventscursor semantics — the DB-level cursor that feeds the route.Objectives
created_at+idtiebreaker) or add a numericseqcolumn; makeandWherea keyset comparison.Suggested Execution
git checkout -b fix/webhook-events-keyset.getEventsinwebhookService.jsand the route inroutes/webhooks.js.npm run lint && npm testinbackend/.Acceptance Criteria
npm run lintclean.Guidelines
Timeframe: 24 hours