Skip to content

✅ server: scope capture checks by nonce#780

Merged
cruzdanilo merged 3 commits intomainfrom
github
Feb 16, 2026
Merged

✅ server: scope capture checks by nonce#780
cruzdanilo merged 3 commits intomainfrom
github

Conversation

@cruzdanilo
Copy link
Member

@cruzdanilo cruzdanilo commented Feb 15, 2026


Open with Devin

Summary by CodeRabbit

Release Notes

This release contains internal improvements and smoother UI flow timing.

  • Bug Fixes

    • Added error-reporting context to include withdrawal amounts for better diagnostics.
    • Added waits for animations in repayment and rollover flows to reduce timing glitches.
  • Tests

    • Enhanced tests to deserialize and validate serialized messaging payloads with new matchers.
  • Chores

    • Added a release metadata/changeset file.

@changeset-bot
Copy link

changeset-bot bot commented Feb 15, 2026

🦋 Changeset detected

Latest commit: 9cd2bdb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gemini-code-assist
Copy link

Summary of Changes

Hello @cruzdanilo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the testing infrastructure for server-side proposal and withdraw functionalities. It introduces a more granular approach to verifying Sentry exception captures and Redis operations by implementing dedicated matching utilities. These changes ensure that test assertions are precisely scoped to specific transaction parameters, leading to more accurate and reliable test outcomes.

Highlights

  • Refactored Test Assertions: Test assertions for proposal and withdraw operations were refactored to precisely scope checks by relevant parameters, improving test accuracy.
  • Introduced Matching Utilities: New matchProposal and matchWithdraw helper functions were added to filter Sentry captureException and Redis zrem calls based on specific proposal (account, nonce) and withdraw (amount, account, market, receiver) details.
  • Enhanced Keeper Mocks: The robustness of keeper.exaSend mocks in tests was enhanced by allowing conditional mocking for specific function calls, leading to more precise test scenarios.
Changelog
  • .changeset/cozy-badgers-allow.md
    • Added an empty changeset file.
  • server/test/hooks/block.test.ts
    • Refactored proposal and withdraw tests to use new matching utilities for Sentry and Redis calls.
    • Improved keeper.exaSend mocking to allow conditional behavior based on function calls.
    • Introduced deserialize import from @wagmi/core for payload parsing in matching functions.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Feb 15, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

Adds an empty changeset file, enhances block hook tests to deserialize and validate encoded proposal/withdraw Redis payloads via new matcher helpers, adds withdraw amount to Sentry error context in the block hook, and inserts waitForAnimationToEnd steps into two Maestro subflows (repay and rollover).

Changes

Cohort / File(s) Summary
Changeset
\.changeset/cozy-badgers-allow.md
Adds a new empty changeset metadata file (two YAML delimiters).
Block hook tests
server/test/hooks/block.test.ts
Imports deserialize from @wagmi/core; adds matchProposal() and matchWithdraw() matcher helpers to deserialize and validate Redis zrem payloads; replaces string-based assertions with matcher-based checks; updates keeper.exaSend mock behavior and parameterizes amounts/addresses in tests.
Block hook: runtime
server/hooks/block.ts
Enhances withdraw error capture to include amount: String(amount) in Sentry context; no other control-flow changes.
Maestro: repay flow
.maestro/subflows/repay.yaml
Inserts three waitForAnimationToEnd steps at specific points to wait for UI animations; no other functional changes.
Maestro: rollover flow
.maestro/subflows/rollover.yaml
Inserts three waitForAnimationToEnd steps at specific points to wait for UI animations; no other functional changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • nfmelendez
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'scope capture checks by nonce' directly addresses the main changes in server/hooks/block.ts and server/test/hooks/block.test.ts, where nonce-based matchers and capture validation logic are introduced for proposal and withdraw checks.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch github

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.

gemini-code-assist[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@sentry
Copy link

sentry bot commented Feb 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.50%. Comparing base (ea55bdf) to head (9cd2bdb).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #780      +/-   ##
==========================================
+ Coverage   69.04%   69.50%   +0.45%     
==========================================
  Files         207      207              
  Lines        7011     7201     +190     
  Branches     2205     2256      +51     
==========================================
+ Hits         4841     5005     +164     
- Misses       1992     2007      +15     
- Partials      178      189      +11     
Flag Coverage Δ
e2e 69.47% <ø> (+16.56%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@cruzdanilo cruzdanilo merged commit 9cd2bdb into main Feb 16, 2026
14 of 15 checks passed
@cruzdanilo cruzdanilo deleted the github branch February 16, 2026 00:47
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