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.
Goal
Apply the structural isolation strategy to permanently fix compilation failures in ores.qt.api across all platforms.
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 |
Acceptance
projects/ores.trading.api/src/CMakeLists.txt contains increased Clang limits (-fbracket-depth=1024).
getTradeDetail is isolated in its own TU: ClientManagerTradeDetail.cpp.
- Two-phase parsing is implemented in
ClientManagerTradeDetail.cpp using restored helper types in trade_protocol.hpp.
- Code builds successfully on Linux (Clang) and Windows (MSVC).
Plan
- Increase Clang Limits: Update
projects/ores.trading.api/src/CMakeLists.txt.
- Restore Protocol Types: Restore
get_trade_detail_response_base and get_trade_detail_instrument_wrapper in trade_protocol.hpp.
- Perform TU Split: Move
getTradeDetail from ClientManagerTrades.cpp to ClientManagerTradeDetail.cpp.
- Implement Two-Phase Parse: Refactor the isolated
getTradeDetail to perform two separate rfl::json::read calls.
- Validate: Verify the build on all target platforms.
PRs
| PR |
Title |
| #819 |
[ores.qt.api] Implement triple isolation for RFL complexity |
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. |
Notes
Result
projects/ores.qt.api/src/ClientManagerTradeDetail.cpp — new TU; getTradeDetail
with two-phase parse (phase 1: trade only; phase 2: instrument variant with
rfl::AddTagsToVariants).
projects/ores.qt.api/src/ClientManagerTrades.cpp — getTradeDetail removed;
listTrades only.
projects/ores.trading.api/src/CMakeLists.txt — added PUBLIC -fbracket-depth=1024
for Clang; propagates to all consumers.
projects/ores.trading.api/include/ores.trading.api/messaging/trade_protocol.hpp —
added get_trade_detail_response_base and get_trade_detail_instrument_wrapper.
Emacs 29.1 (Org mode 9.6.6)