You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds read-only iter/IntoIterator to SortedOrders and ActiveLimitOrders, PositionSide::invert, try_from_scaled/to_f32/to_f64/Div<i64> for both currencies, and a new AI PR-review workflow. The order-book and currency changes are correct and tested, but the trade_aggregation.rs test edit breaks the test build.
Issues
src/trade_aggregation.rs:61, blocker: <Trade as TakerTrade>::price(trade) passes trade by value, while the pre-existing line directly below calls the same method as price(&trade) (and the pre-change code used trade.price()), so TakerTrade::price takes a reference. Fully-qualified method syntax does not auto-ref the receiver, so this line fails to compile and cargo test — the CI cargo-test step — errors out. Fix: pass &trade.
The PR adds a dedicated AI PR-review workflow (pi against the self-hosted vLLM endpoint, isolated PI_CODING_AGENT_DIR, minimal .#review nix devShell), bumps the crate to 0.138.3, and widens the public API: non-consuming SortedOrders::iter/IntoIterator, PositionSide::invert, try_from_scaled/to_f64/to_f32/Div<i64> for both currency types, and public new_weighted_price. I verified the pi env var and CLI flags against the pi docs, the worst-to-best iteration semantics against the sort invariant (best() is orders.last()) and the new tests, the workflow's failure guards, and Cargo.toml/Cargo.lock version consistency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
try_from_scaledmethods forBaseCurrencyandQuoteCurrency.to_f64andto_f32methods forBaseCurrencyandQuoteCurrencynew_weighted_pricepublic onQuoteCurrency.invertmethod toPositionSideiterforSortedOrdersSortedOrderspublicreview.ymlworkflow backed my local inference with Qwen3.8-27B.