fix(payout): hold ambiguous transfers, close announce/cancel races, review follow-ups - #57
Merged
Merged
Conversation
…eview follow-ups Money path: - executePayout stores the attempt reference at claim time and, when the transfer call throws, asks Paystack what happened before deciding: success confirms, failed/reversed/not_found retries, pending/unknown holds PROCESSING for the sweep. Paystack port gains a not_found status. - announceWinners and both cancel paths use conditional status updates, so a cancel and an announce racing each other can't both win. Security and ops: - Per-action rate-limit keys (register, event-cancel, judge-invite). - Hourly purge of expired RateLimitBucket rows. - /api/health reports 503 when the payment or chain port can't resolve. - CSP connect-src allows the Sentry ingest origin from the public DSN. - Drop the unused direct pg dependency (pg-boss brings its own). SEO and copy: - robots.txt blocks /organizer and /organizer/ without hiding /organizers. - Remove em/en dashes from user-facing strings; Title Case fixes.
…n and sign-up headings
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups from the review of #52, plus two auth UI tweaks.
Money path
executePayoutstores the attempt reference when it claims the payout. If the transfer call throws (timeout, dropped connection), it asks Paystack about that attempt before deciding:successconfirms,failed/reversed/not_foundretries,pending/unknownholds PROCESSING for the sweep. This removes a double-pay window. The Paystack port gains anot_foundstatus.announceWinnersand both cancel paths use conditional status updates, so a cancel racing an announce can't both succeed.Security and ops
mutate:counter.RateLimitBucketrows./api/healthreturns 503 when the payment or chain port can't resolve.connect-srcallows the Sentry ingest origin from the public DSN.pgdependency.SEO and copy
/organizerand/organizer/without hiding the public/organizers/<slug>pages.Auth UI
Test plan
tsc --noEmit, lint, buildpnpm test: 471 tests, including new ones for the ambiguous-transfer matrix, not_found/unknown/success after a thrown transfer, both race guards (verified failing without the guards), and the rate-limit purge