Collapse the ORE import rollback's saved-entity lists into one ordered collection
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
The ORE import rollback request carries one string list per entity kind:
saved_currency_iso_codes, saved_portfolio_ids, saved_book_ids and
saved_trade_external_ids. Replace them with one ordered collection of
kind-and-key entries — an enumerated kind beside its keys, or a flat list
of key-value pairs. Adding a kind would then change one model field
instead of four lists, two handlers and a wire name, and the order the
rollback traverses would become explicit in the payload.
2. Why
Each list carries a different key type: an ISO code, a uuid, and (since PR 2 of the trading clean-up) the trade's external identifier. One ordered collection states that order once. The cost is that the rollback must still dispatch a different delete request per kind, so a generic bag trades a typed field for a stringly kind and moves exhaustiveness from the compiler to a switch. That is why the trading clean-up deferred it, and it is why the enumerated kind is the better of the two shapes.
3. References
- Decision D9 on Clean ores.trading to the component clean standard, which records why the change was deferred out of Sync the ores.trading tree to its models.
projects/ores.ore/modeling/ores.ore.ore_import_messages.orgholds the request and the execute result.
4. See also
- Finish the eventing payload migration, or read the legacy shape — the other protocol shape this work touched.