Conversation
…ting Treat filled_qty == leaves_qty as a complete fill (>=) so InvalidOrderStatus is not raised when the queue model reports an exact fill (nkaz001#312). Apply PartiallyFilled responses on the local side so position/balance track incremental exec_qty (nkaz001#316). Co-authored-by: Cursor <cursoragent@cursor.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
Independent verification of this change against head The core accounting fix works. However, the
The minimal additional guards that make all 12 pass: if (order.status == Status::Filled || order.status == Status::PartiallyFilled)
&& order.req != Status::Rejected
&& order.exec_qty > 0.0
{
self.state.apply_fill(&order);
}Zero-quantity fills cannot be masked by the Run comparison: baseline I did not open a competing PR. If you want the tests, they are on my fork branch |
Summary
filled_qty == leaves_qtyas a complete fill (>=) inPartialFillExchange, avoidingInvalidOrderStatuswhen the queue model reports an exact fill (Bug: PartialFillExchange fails with InvalidOrderStatus when filled_qty == leaves_qty #312).PartiallyFilledresponses on the local processors (Local/L3Local) so position and balance track each incrementalexec_qty(Partial fills of resting orders are never applied to position/balance (PartialFillExchange + prob queue models) #316).Test plan
position/balanceshould move on each partial, and exactfilled_qty == leaves_qtyshould complete without errorFixes #312
Fixes #316
Made with Cursor