Skip to content

✅ server: wait for expected transfers instead of receipt count#764

Merged
cruzdanilo merged 2 commits intomainfrom
flaky
Feb 12, 2026
Merged

✅ server: wait for expected transfers instead of receipt count#764
cruzdanilo merged 2 commits intomainfrom
flaky

Conversation

@cruzdanilo
Copy link
Member

@cruzdanilo cruzdanilo commented Feb 12, 2026


Open with Devin

Summary by CodeRabbit

  • Tests

    • Updated test utilities to use a new withdrawal decoding function for improved assertion clarity.
  • Chores

    • Added changeset documentation for this release.

@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2026

🦋 Changeset detected

Latest commit: 35705b1

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 an existing test within the server module to improve its accuracy and reliability. Instead of asserting the completion of a fixed number of transaction receipts, the test now explicitly defines and waits for the confirmation of specific expected transfer events, ensuring that the intended blockchain operations have occurred. This change makes the test more resilient to environmental variations and more precise in its validation.

Highlights

  • Test Logic Refinement: Modified a test in server/test/hooks/block.test.ts to verify specific transaction transfers rather than relying on a fixed count of transaction receipts.
  • Improved Test Reliability: Enhanced the test's robustness by ensuring that the correct transfer events are observed, preventing potential flakiness from unrelated transactions.
Changelog
  • .changeset/clear-donkeys-grow.md
    • Added a new changeset file.
  • server/test/hooks/block.test.ts
    • Refactored a test to use specific transfer expectations instead of a transaction receipt count.
    • Introduced an expected array to define anticipated transfer details.
    • Updated the vi.waitUntil condition to use the hasTransfers utility with the new expectations.
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.

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors a test in server/test/hooks/block.test.ts to improve its robustness and readability. The waiting logic is changed from waiting for a fixed number of transaction receipts to waiting for specific expected transfers to occur. This makes the test more reliable and its intent clearer. The changes are a definite improvement. I've kept the suggestion to further improve code consistency by using an existing helper function, as it aligns with best practices and does not contradict any established rules.

@sentry
Copy link

sentry bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.74%. Comparing base (5275ddd) to head (35705b1).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #764      +/-   ##
==========================================
- Coverage   68.27%   67.74%   -0.53%     
==========================================
  Files         207      207              
  Lines        7300     6942     -358     
  Branches     2304     2164     -140     
==========================================
- Hits         4984     4703     -281     
+ Misses       2101     2050      -51     
+ Partials      215      189      -26     
Flag Coverage Δ
e2e 67.74% <ø> (+1.62%) ⬆️

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
Copy link

coderabbitai bot commented Feb 12, 2026

Walkthrough

This PR introduces a new utility export decodeWithdraw from the ProposalType module and refactors test code to use it instead of direct ABI parameter decoding for extracting withdrawal recipient data. A changeset metadata file is also added.

Changes

Cohort / File(s) Summary
Changeset Metadata
.changeset/clear-donkeys-grow.md
Empty changeset file with placeholder YAML separators.
Test Refactoring
server/test/hooks/block.test.ts
Replaced direct decodeAbiParameters usage with new decodeWithdraw utility for test assertions; updated transfer detection logic to use the decoded output and introduced expectedTransfers data structure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • nfmelendez
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title references 'wait for expected transfers instead of receipt count', which aligns with the PR's focus on consolidating withdraw decoding and improving transfer validation in block tests.

✏️ 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 flaky

No actionable comments were generated in the recent review. 🎉


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.

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

@cruzdanilo cruzdanilo merged commit 35705b1 into main Feb 12, 2026
14 of 15 checks passed
@cruzdanilo cruzdanilo deleted the flaky branch February 12, 2026 13:39
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

Comments