Story: Refdata entity NATS event registrar audit
Table of Contents
This page documents a story in Product backlog — inbox, carried unfinished from Sprint 24 at close. It captures the goal, current status, acceptance criteria, and the tasks that compose it.
Goal
Every refdata entity with a *_changed_event type
(ores.refdata.api/eventing/) should have a working NATS event
registrar (ores.refdata.service/messaging/*_event_registrar.cpp)
wired into event_registrar.cpp, so downstream consumers (audit
trail, cache invalidation, other services) reliably learn when the
entity changes. Investigation at planning time found only 8 of 34
entities wired: book, business_day_convention_type, country,
currency, currency_pair, currency_pair_convention,
party_type, purpose_type. Since then, day_count_fraction_type
(new entity, wired at commissioning) and contact_type (wired as
part of a full model regeneration — see Commission: contact_type)
have also been wired, leaving 24 of the original 26. The remaining 24
have a defined event type but no registrar — audit and close the gap
for all of them. The
registrar work itself is simple and mechanical per entity (mirrors
the existing currency_event_registrar.cpp pattern); the value here
is systematic completeness, not novel design.
Caveat (found in PR #1503 review): 10 of the 26 entities below —
business_unit, counterparty, counterparty_contact_information,
counterparty_identifier, currency_market_tier,
monetary_nature, party, party_contact_information,
party_identifier, portfolio — have stale changed_event.hpp
output per Migrate remaining refdata entities to generated
event-mapping registrar: the id field is the old plain ids
instead of the current template's {{entity_singular_short}}_ids.
Regenerating those 10 entities' nats-eventing output to add a
registrar is therefore a breaking change to any existing consumer
of the old field name — check every consumer (Qt controllers,
handlers, anything referencing .ids on that entity's
changed_event) before regenerating, not after. This applies to all
10 of those entities in the "Party family" and "Currency/FX family"
task groups below, plus business_unit and portfolio in "Books/
portfolios/misc".
Status
| Field | Value |
|---|---|
| State | BACKLOG |
| Carried from | Sprint 24 (unfinished at close) |
| Now | Not yet started. |
| Waiting on | Nothing. |
| Next | Break the story into tasks. |
| Last touched | 2026-07-11 |
Acceptance
- Every entity in Entities missing a registrar below has a
*_event_registrar.{hpp,cpp}following the existingcurrency_event_registrarpattern, registered inevent_registrar.cpp. - Each new registrar is exercised by at least one test confirming the NATS message is published when the entity changes.
- No entity with a
*_changed_eventtype is left unwired by story close (bar any explicitly deferred and recorded under * Decisions).
Entities missing a registrar
Has a *_changed_event type but no *_event_registrar.cpp (24, was
26 — contact_type wired 2026-07-13):
business_centre, business_unit, cds_convention,
counterparty, counterparty_contact_information,
counterparty_identifier, currency_group, currency_market_tier,
currency_pair_classification, deposit_convention,
fra_convention, ibor_index_convention, monetary_nature,
ois_convention, overnight_index_convention, party,
party_contact_information, party_identifier, party_id_scheme,
party_status, portfolio, regulatory_book_type,
rounding_type, swap_convention, zero_convention.
Tasks
| Task | State | Start | End | Description |
|---|---|---|---|---|
Planned tasks (not yet scaffolded as task docs) — one task per small batch of entities, grouped by domain family:
- Party family:
party,party_status,party_identifier,party_id_scheme,party_contact_information,counterparty,counterparty_identifier,counterparty_contact_information. Exceptparty_statusandparty_id_scheme, every entity here has stalechanged_event.hppoutput (see Goal's caveat) — check all consumers of the oldidsfield before regenerating. - Currency/FX family:
currency_group,currency_market_tier,currency_pair_classification,monetary_nature,rounding_type.currency_market_tierandmonetary_naturehave stalechanged_event.hppoutput (see Goal's caveat) — check consumers before regenerating. - Convention family:
cds_convention,deposit_convention,fra_convention,ibor_index_convention,ois_convention,overnight_index_convention,swap_convention,zero_convention. - Books/portfolios/misc:
business_centre,business_unit,portfolio,regulatory_book_type(contact_typealready wired, 2026-07-13).business_unitandportfoliohave stalechanged_event.hppoutput (see Goal's caveat) — check consumers before regenerating. - Add a test per new registrar confirming NATS publication on change (may fold into each batch's task above rather than a separate task, depending on effort).
Decisions
Out of scope
- Adding
*_changed_eventtypes to entities that don't have one yet — this story only wires registrars for events that already exist.
References
- Migrate remaining refdata entities to generated event-mapping
registrar — the 10-entity stale-
changed_event.hppcaveat in the Goal above; check this capture before regenerating any of its 10 named entities.