Model the two trading export verbs as operation models
Table of Contents
This page is a capture in the inbox bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.
1. What
Two trading verbs are not entity verbs: trading.v1.trades.portfolio.export
and trading.v1.trades.export-to-storage. Their request and response structs
are declared in a cpp block in ores.trading.trade.org, and codegen pastes
that block into the generated trade_protocol.hpp. Their handlers are
hand-written in registrar_trades.cpp. Write one operation model per verb,
in the shape that ores.dq.publish_bundle uses. The protocol and its
TypeScript twin then generate, and the handlers stay hand-written.
2. Why
Items P04 and M06 of the Component Clean Standard want every operation that is not an entity verb as an operation model, and no hand-written wire type. These two verbs are the only gap for both items in ores.trading. The PR 7 task recorded the fix as the next unit and did not take it.
3. References
projects/ores.trading/modeling/ores.trading.trade.org: the pastedcppblock.projects/ores.trading/core/src/messaging/registrar_trades.cpp: the two handlers.ores.dq.publish_bundle: the operation model shape to copy.