-
Notifications
You must be signed in to change notification settings - Fork 138
rfq: delegate accept quote validation to PortfolioPilot #1935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Implement `AcceptedRate` and `OriginalRequest` methods for `BuyAccept` and `SellAccept` structs, updating the `Accept` interface to support retrieving accepted rates and corresponding original requests. This is a prep commit to provide uniform access to accept message data.
Summary of ChangesHello @ffranr, 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 refactors the Request for Quote (RFQ) system by centralizing the validation logic for accepted quotes. Previously, the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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 is a solid refactoring that moves quote acceptance validation logic from the Negotiator to the PortfolioPilot, improving separation of concerns and code clarity. The new VerifyAcceptQuote method in PortfolioPilot correctly encapsulates the validation logic for both buy and sell accepts. The changes are well-tested with a new test suite for VerifyAcceptQuote. My main feedback concerns a change in error handling: errors from asynchronous validation are no longer propagated to the main error channel, which could mask potential issues. I've suggested restoring this behavior to ensure robust error handling.
Pull Request Test Coverage Report for Build 20821737324Details
💛 - Coveralls |
0c6d33b to
bf1e28d
Compare
Introduce a new method, `VerifyAcceptQuote`, in `InternalPortfolioPilot` to validate expiry and price deviations for buy and sell accept messages.
Streamline logic for handling buy and sell accept messages by delegating expiry and price validation to the PortfolioPilot's `VerifyAcceptQuote` method.
bf1e28d to
713b884
Compare
|
/gemini review |
There was a problem hiding this 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 effectively refactors the quote acceptance logic by delegating validation to the PortfolioPilot interface. This centralization simplifies the Negotiator and improves code organization. The introduction of the VerifyAcceptQuote method is a clean abstraction, and the changes are well-supported by new and updated tests.
I've included a few minor suggestions to align the new code with the repository's style guide regarding comments.
jtobin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 🔥 🔥
jtobin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol, I accidentally entered my 🔥 🔥 🔥 comment in the wrong browser tab. Meant to approve 1936.. 😁
(Reviewing this one next!)
jtobin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (officially). 👍
|
|
||
| ## Functional Enhancements | ||
|
|
||
| - [PR#1935](https://github.com/lightninglabs/taproot-assets/pull/1935) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something I thought about when looking at release notes lately is that we might be including too much information in them. This change, for example, isn't something I'd expect end users to particularly care about, as it's primarily an internal matter of organization.
It's more broadly a topic for another day, but just something I thought was worth commenting on.
Summary
AcceptedRateandOriginalRequestmethods to theAcceptinterface for uniform access to accept message dataVerifyAcceptQuotemethod inInternalPortfolioPilotto validate expiry and price deviations for buy and sell accept messages