fix: broker fallback from card selection + FX double-counting detection#136
Conversation
When auto-detection fails for a file, try parsers for brokers the user selected in the card grid before throwing an error. Add Signal 4 to FxFifoEngine.detectAutoConvert(): amount-correlation heuristic detects auto-convert when CASH trade amounts match same-day securities tradeMoney within 2% (≥3 trades, 90%+ matched). Fixes double-counted FX gains for EUR-base IBKR accounts missing Notes/AFx.
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Add step 5 telling users to check all field boxes in each Flex Query section, emphasizing Notes field is critical for FX auto-convert detection. Renumbers subsequent steps.
IBKR shows section/field names in English regardless of user locale. Use Trades, Cash Transactions, Open Positions, Financial Instrument Information instead of translated names that don't match the UI.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #136 +/- ##
==========================================
+ Coverage 97.75% 97.76% +0.01%
==========================================
Files 34 34
Lines 6594 6633 +39
Branches 1322 1335 +13
==========================================
+ Hits 6446 6485 +39
Misses 147 147
Partials 1 1
🚀 New features to boost your workflow:
|
…on (#136) * fix: broker fallback from card selection + FX double-counting detection When auto-detection fails for a file, try parsers for brokers the user selected in the card grid before throwing an error. Add Signal 4 to FxFifoEngine.detectAutoConvert(): amount-correlation heuristic detects auto-convert when CASH trade amounts match same-day securities tradeMoney within 2% (≥3 trades, 90%+ matched). Fixes double-counted FX gains for EUR-base IBKR accounts missing Notes/AFx. * fix: update IBKR guide to recommend selecting all fields Add step 5 telling users to check all field boxes in each Flex Query section, emphasizing Notes field is critical for FX auto-convert detection. Renumbers subsequent steps. * fix: use English IBKR interface names in Flex Query guide IBKR shows section/field names in English regardless of user locale. Use Trades, Cash Transactions, Open Positions, Financial Instrument Information instead of translated names that don't match the UI.
Summary
Broker fallback: When auto-detection fails for an uploaded file, the system now tries parsers for brokers the user selected in the card grid (step 1) before showing an error. If multiple brokers were selected and only one file fails detection, the unmatched broker's parser is attempted automatically.
FX double-counting fix (Signal 4): Adds amount-correlation heuristic to
FxFifoEngine.detectAutoConvert()for EUR-base IBKR accounts that don't export the Notes field (missing AFx marker). Detects auto-convert when CASH trade amounts match same-day securitiestradeMoneywithin 2% — requires ≥3 CASH trades and 90%+ matched. This prevents spurious FX gains from being double-counted on top of EUR-denominated capital gains.Test plan