Skip to content

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 19, 2026

Summary

This fix addresses a critical issue where the registration wizard displays "Registration successful!" without actually verifying that the user registration was persisted in the database.

Problem

The registration wizard was showing a success message based solely on the server's response to the registration request. However, as reported in issue #29, the server could return a successful response (HTTP 200 with {"success": true}) while the actual database write failed silently. This resulted in:

  • Wizard output: "Registration successful!"
  • Status API: {"registered": false}
  • User not appearing on leaderboard

This behavior was misleading and caused confusion for users who believed they were registered when they were not.

Solution

The fix adds a verification step after receiving a successful registration response:

  1. After the registration endpoint returns success, the wizard now calls the status API (/api/v1/bridge/bounty-challenge/status/{hotkey}) to verify the registration was actually persisted.

  2. A brief delay (500ms) is added before verification to allow for any async database writes to complete.

  3. Based on the verification result:

    • If status.registered == true: Display the success message
    • If status.registered == false: Display a warning that registration may have failed, prompting the user to try again
    • If verification fails (network error, etc.): Display a warning that registration could not be confirmed, prompting the user to manually check their status

This ensures users receive accurate feedback about their actual registration state.

Testing

  • Verified the code compiles successfully with cargo check --bin bounty
  • The fix follows the existing code patterns and uses the already-implemented get_status method from BountyClient

Related Issue

Fixes #29

@coderabbitai
Copy link

coderabbitai bot commented Jan 19, 2026

Warning

Rate limit exceeded

@echobt has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 37 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between ebe0adf and 0465a7a.

📒 Files selected for processing (1)
  • src/bin/bounty/wizard/register_wizard.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

[bounty-challenge CLI] Registration wizard shows "success" but user is not actually registered

2 participants