Skip to content

fix: fetch Supabase metadata on hot-register, report crank result (M4+M5)#94

Open
0x-SquidSol wants to merge 1 commit intodcccrypto:mainfrom
0x-SquidSol:fix/m4-m5-register-supabase-crank-result
Open

fix: fetch Supabase metadata on hot-register, report crank result (M4+M5)#94
0x-SquidSol wants to merge 1 commit intodcccrypto:mainfrom
0x-SquidSol:fix/m4-m5-register-supabase-crank-result

Conversation

@0x-SquidSol
Copy link
Copy Markdown
Contributor

Summary

M4 — Missing Supabase metadata on hot-register:

  • registerMarket() never queried Supabase for dex_pool_address
  • HYPERP markets registered via /register had no pool address for up to 5 min
  • Now queries Supabase with .eq("slab_address", ...) and validates with base58 regex
  • Matches the validation pattern from discover() (lines 274-285)
  • Query failure is non-fatal (try/catch, logs warning)

M5 — Crank result discarded:

  • crankMarket() return value was ignored, always reported success
  • Now captures the boolean and reflects it in the response message
  • Registration is still success: true (market is tracked regardless), but message distinguishes crank success vs failure

Test plan

  • All 133 tests pass

🤖 Generated with Claude Code

…(M4+M5)

M4: registerMarket() did not query Supabase for dex_pool_address.
HYPERP markets hot-registered via /register had no pool address until
the next discover() cycle (5 min default), causing UpdateHyperpMark
to be skipped. Now queries Supabase for the single market's metadata
with base58 validation, matching the discover() pattern.

M5: registerMarket() discarded crankMarket() return value and always
reported success. Now captures the boolean and includes it in the
response message so callers know if the initial crank succeeded.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 9, 2026

Warning

Rate limit exceeded

@0x-SquidSol has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 25 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 0 minutes and 25 seconds.

⌛ 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 85224e6e-4153-495e-9754-c5741437d7b2

📥 Commits

Reviewing files that changed from the base of the PR and between 3280971 and 2247e1c.

📒 Files selected for processing (1)
  • src/services/crank.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

1 participant