Skip to content

feat(bw): implement percentage-based rollout#7845

Draft
limitofzero wants to merge 1 commit into
developfrom
feat/implement-percentage-based-rollour-bw
Draft

feat(bw): implement percentage-based rollout#7845
limitofzero wants to merge 1 commit into
developfrom
feat/implement-percentage-based-rollour-bw

Conversation

@limitofzero

Copy link
Copy Markdown
Contributor

Summary

Partial rollout gate for the balances-watcher SSE stack. The previous all-or-nothing isBwEnabled boolean flag is replaced by a numeric bwEnabledPercentage in LaunchDarkly, so we can shift the watcher onto a limited share of wallets and grow the cohort as barn stability holds.

Gating is deterministic per wallet — BigInt(account) % 100n < percentage — so the same address stays in the same bucket across refreshes/tabs, no flip-flopping between watcher and multicall polling.

To Test

Prereq: in LaunchDarkly enable the bwEnabledPercentage flag (type: number). The old isBwEnabled boolean is no longer read and can be retired.

  1. Full rollout — bwEnabledPercentage = 100, connect a wallet, open swap
  • DevTools Network shows POST /sessions/* and GET /sse/*/balances/* — watcher is running
  • Multicall stack (BalancesAndAllowancesUpdater / PriorityTokensUpdater) is NOT mounted while the watcher is Healthy
  1. Off — bwEnabledPercentage = 0, refresh
  • No /sessions / no SSE requests
  • Multicall polling is the only balances source
  1. Out-of-bucket wallet — bwEnabledPercentage = 50
  • Connect a wallet whose address bucket >= 50 (e.g. 0x…63 → bucket 99, since 0x63 = 99)
  • Watcher is NOT running; multicall stack is running

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explorer-dev Ready Ready Preview Jul 12, 2026 5:48pm
sdk-tools Ready Ready Preview Jul 12, 2026 5:48pm
storybook Ready Ready Preview Jul 12, 2026 5:48pm
swap-dev Ready Ready Preview Jul 12, 2026 5:48pm
widget-configurator Ready Ready Preview Jul 12, 2026 5:48pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
cosmos Ignored Ignored Jul 12, 2026 5:48pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a0d3507f-6933-402e-9479-66cbc2898574

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/implement-percentage-based-rollour-bw

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.

@limitofzero limitofzero self-assigned this Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant