📌 Description
The transactional outbox in src/services/outboxRelay.ts drains vault
lifecycle events to webhooks and ETL, marking rows processed. When a subscriber
was misconfigured or down, there is a replay-by-time-range admin tool, but no way
to replay all events for a single vault — the common support request when one
integration missed one vault's lifecycle.
This issue adds a per-vault outbox replay that re-dispatches a vault's recorded
lifecycle events to a chosen subscriber without re-emitting to everyone.
🎯 Requirements and Context
- Add
POST /api/admin/vaults/:id/replay-events taking an optional subscriber id.
- Must read from the persisted outbox (source of truth), not reconstruct events.
- Must preserve original event ordering and idempotency keys so a subscriber that
already saw an event de-dupes it.
- Admin-only, audit-logged, and rate-limited.
🛠️ Suggested Execution
1. Fork the repo and create a branch
git checkout -b feature/vault-outbox-replay
2. Implement changes
- Add a
replayForVault(vaultId, subscriberId?) to src/services/outboxRelay.ts.
- Add the route to
src/routes/adminWebhooks.ts.
- Add
src/tests/outboxRelay.vaultReplay.test.ts.
- Document in
docs/webhooks.md.
3. Test and commit
- Run:
npm test -- src/tests/outboxRelay.vaultReplay.test.ts
- Cover edge cases: vault with no events, ordering preserved, idempotency-key
reuse, single-subscriber targeting, non-admin forbidden.
Example commit message
feat: per-vault outbox event replay endpoint
✅ Guidelines
- Minimum 95% test coverage on new/changed lines.
- Replays from persisted outbox only; preserves ordering and idempotency keys.
- Timeframe: 96 hours.
🏷️ Labels
type-feature · type-enhancement · area-backend · MAYBE REWARDED · GRANTFOX OSS · OFFICIAL CAMPAIGN
💬 Community & Support
- Join the contributor Discord to coordinate, ask questions, and get unblocked fast: https://discord.gg/xvNAvMJf
- Please introduce yourself in the channel before you start so we can avoid duplicate work, pair you with a reviewer, and get your PR merged quickly.
- Maintainers actively triage this channel and aim for fast, clear, respectful reviews — reach out any time you're blocked.
📌 Description
The transactional outbox in
src/services/outboxRelay.tsdrains vaultlifecycle events to webhooks and ETL, marking rows processed. When a subscriber
was misconfigured or down, there is a replay-by-time-range admin tool, but no way
to replay all events for a single vault — the common support request when one
integration missed one vault's lifecycle.
This issue adds a per-vault outbox replay that re-dispatches a vault's recorded
lifecycle events to a chosen subscriber without re-emitting to everyone.
🎯 Requirements and Context
POST /api/admin/vaults/:id/replay-eventstaking an optional subscriber id.already saw an event de-dupes it.
🛠️ Suggested Execution
1. Fork the repo and create a branch
2. Implement changes
replayForVault(vaultId, subscriberId?)tosrc/services/outboxRelay.ts.src/routes/adminWebhooks.ts.src/tests/outboxRelay.vaultReplay.test.ts.docs/webhooks.md.3. Test and commit
npm test -- src/tests/outboxRelay.vaultReplay.test.tsreuse, single-subscriber targeting, non-admin forbidden.
Example commit message
✅ Guidelines
🏷️ Labels
type-feature·type-enhancement·area-backend·MAYBE REWARDED·GRANTFOX OSS·OFFICIAL CAMPAIGN💬 Community & Support