Task: Implement triple isolation for RFL complexity
This page documents a task in the Resolve RFL complexity issues story. It captures the goal, current status, acceptance, and any notes or results.
1. Goal
Apply the structural isolation strategy to permanently fix compilation failures in ores.qt.api across all platforms.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Resolve RFL complexity issues |
| Now | Completed. PR #819 merged. |
| Waiting on | Nothing. |
| Next | None. |
| Last touched | 2026-05-24 |
3. Acceptance
projects/ores.trading.api/src/CMakeLists.txtcontains increased Clang limits (-fbracket-depth=1024).getTradeDetailis isolated in its own TU:ClientManagerTradeDetail.cpp.- Two-phase parsing is implemented in
ClientManagerTradeDetail.cppusing restored helper types intrade_protocol.hpp. - Code builds successfully on Linux (Clang) and Windows (MSVC).
4. Plan
- Increase Clang Limits: Update
projects/ores.trading.api/src/CMakeLists.txt. - Restore Protocol Types: Restore
get_trade_detail_response_baseandget_trade_detail_instrument_wrapperintrade_protocol.hpp. - Perform TU Split: Move
getTradeDetailfromClientManagerTrades.cpptoClientManagerTradeDetail.cpp. - Implement Two-Phase Parse: Refactor the isolated
getTradeDetailto perform two separaterfl::json::readcalls. - Validate: Verify the build on all target platforms.
5. PRs
| PR | Title |
|---|---|
| #819 | [ores.qt.api] Implement triple isolation for RFL complexity |
6. Review
| # | Comment summary | File | Decision | Notes |
|---|---|---|---|---|
| 1 | Phase 2 silently ignores parse failure | ClientManagerTradeDetail.cpp | Applied | Now returns std::nullopt + logs error; matches original behaviour. Fixed in dc0c653f5. |
7. Notes
8. Result
projects/ores.qt.api/src/ClientManagerTradeDetail.cpp— new TU;getTradeDetailwith two-phase parse (phase 1: trade only; phase 2: instrument variant withrfl::AddTagsToVariants).projects/ores.qt.api/src/ClientManagerTrades.cpp—getTradeDetailremoved;listTradesonly.projects/ores.trading.api/src/CMakeLists.txt— added PUBLIC-fbracket-depth=1024for Clang; propagates to all consumers.projects/ores.trading.api/include/ores.trading.api/messaging/trade_protocol.hpp— addedget_trade_detail_response_baseandget_trade_detail_instrument_wrapper.