Skip to content

🥅 server: handle legacy withdraw validation revert#792

Merged
cruzdanilo merged 1 commit intomainfrom
legacy
Feb 17, 2026
Merged

🥅 server: handle legacy withdraw validation revert#792
cruzdanilo merged 1 commit intomainfrom
legacy

Conversation

@cruzdanilo
Copy link
Member

@cruzdanilo cruzdanilo commented Feb 17, 2026


Open with Devin

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced legacy withdrawal validation to properly handle cases where validation functions are unavailable, ensuring affected withdrawals are appropriately managed.

@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2026

🦋 Changeset detected

Latest commit: fdd213d

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

This PR includes changesets to release 1 package
Name Type
@exactly/server Patch

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 enhances the server's handling of legacy withdraws by explicitly recognizing a specific runtime validation error as a terminal condition. This ensures that withdraws failing due to RuntimeValidationFunctionMissing(0x3ccfd60b) are properly marked as complete and removed from the processing queue, preventing them from being retried indefinitely and improving the robustness of the withdrawal mechanism.

Highlights

  • Error Handling: Identified and added RuntimeValidationFunctionMissing(0x3ccfd60b) to the list of terminal reasons for legacy withdraws, ensuring these specific validation failures are properly recognized.
  • Queue Management: Ensured that legacy withdraws encountering the RuntimeValidationFunctionMissing error are correctly removed from the processing queue, preventing indefinite retries.
  • Test Coverage: Introduced a new test case to validate the proper handling and removal of withdraws when the RuntimeValidationFunctionMissing error is encountered, improving system robustness.
Changelog
  • .changeset/calm-otter-guard.md
    • Added a new changeset entry documenting the handling of a specific withdraw validation revert.
  • server/hooks/block.ts
    • Updated the isTerminalWithdrawReason function to include RuntimeValidationFunctionMissing(0x3ccfd60b) as a condition for terminal withdraw reasons.
  • server/test/hooks/block.test.ts
    • Added a new test case to verify that legacy withdraws are correctly removed from the queue when a RuntimeValidationFunctionMissing error occurs.
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.

@sentry
Copy link

sentry bot commented Feb 17, 2026

Sentry Issue: SERVER-HD

@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

Walkthrough

This PR introduces handling for a new terminal withdrawal validation error condition (RuntimeValidationFunctionMissing). It adds a check for this error in the withdrawal validation logic, includes a changeset entry documenting the change, and provides test coverage for the new error case.

Changes

Cohort / File(s) Summary
Changeset Documentation
.changeset/calm-otter-guard.md
Documents a patch version bump for @exactly/server with note about handling legacy withdraw validation revert.
Withdrawal Validation Logic
server/hooks/block.ts
Adds RuntimeValidationFunctionMissing(0x3ccfd60b) as a terminal withdrawal reason check alongside existing insufficient liquidity and pre-exec hook reverted conditions.
Test Coverage
server/test/hooks/block.test.ts
Adds new test case for the legacy withdraw suite verifying that withdrawals with RuntimeValidationFunctionMissing errors are removed from the queue without exception capture.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • nfmelendez
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: handling legacy withdraw validation revert by adding a new terminal withdrawal reason check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

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

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

@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 correctly handles a new terminal error condition, RuntimeValidationFunctionMissing, for legacy withdrawals. The implementation is sound and is accompanied by a good test case. My feedback focuses on improving code clarity by adding comments to explain the magic string 0x3ccfd60b used as a function selector, which will make the code more maintainable.

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 2 additional findings.

Open in Devin Review

@sentry
Copy link

sentry bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.01%. Comparing base (1f3e84f) to head (fdd213d).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #792      +/-   ##
==========================================
+ Coverage   68.98%   69.01%   +0.02%     
==========================================
  Files         207      207              
  Lines        7032     7032              
  Branches     2222     2222              
==========================================
+ Hits         4851     4853       +2     
+ Misses       2000     1999       -1     
+ Partials      181      180       -1     
Flag Coverage Δ
e2e 52.89% <ø> (ø)

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.

@cruzdanilo cruzdanilo merged commit fdd213d into main Feb 17, 2026
15 checks passed
@cruzdanilo cruzdanilo deleted the legacy branch February 17, 2026 01:21
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