Skip to content

fix: harden bounty notification key exchange retries#2787

Open
kongwen686 wants to merge 1 commit into
stakwork:masterfrom
kongwen686:codex/notification-key-exchange-retry
Open

fix: harden bounty notification key exchange retries#2787
kongwen686 wants to merge 1 commit into
stakwork:masterfrom
kongwen686:codex/notification-key-exchange-retry

Conversation

@kongwen686
Copy link
Copy Markdown

Summary

  • Treat nil, empty, and whitespace-only V2 contact_key values as unavailable so notifications remain in the key-exchange retry path.
  • Add non-2xx handling for contact lookup, add_contact, and /send calls, and close the add_contact response body.
  • Preserve explicit notification statuses when saving queued notifications while still defaulting new notifications to PENDING.
  • Add focused handler tests for contact-key availability, contact lookup errors, and V2 send status handling.

Why

The notification lifecycle in #2386 depends on only sending once the v2 bot has a usable contact key. The previous code only checked for nil, so an empty contact_key could be treated as ready and skip the intended WAITING_KEY_EXCHANGE retry behavior.

Validation

  • git diff --check
  • go test ./handlers ./db was not run because this environment does not have the Go toolchain installed (go: command not found).

Payment/contact

For bounty/payment coordination: chaoqiang.tian@gmail.com. If non-Stripe payout is needed, PayPal is hooqee@126.com; EVM is 0x225b4bC64E051827c069312f82fA590Ec9632209.

Refs #2386

@kongwen686 kongwen686 marked this pull request as ready for review May 17, 2026 17:15
@kongwen686
Copy link
Copy Markdown
Author

Payment / contact note if this PR is accepted for a bounty or reward:

I am based in mainland China and Stripe onboarding may not be available for me. PayPal would be the preferred payout method if supported: hooqee@126.com.

Contact email: chaoqiang.tian@gmail.com
EVM address: 0x225b4bC64E051827c069312f82fA590Ec9632209
Stellar address: GDYPL56JCCHD75ZB2I5Z4WEWZFRD24LEC62XQ2MBL34653XKO65LA
RTC/ClawRTC address: RTC02d8536941d636aee4012596afbcd8185e9f8283
Alipay: chaoqiang457963@126.com

Please let me know which payout route is supported.

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.

1 participant