[ores.trading] Port Batch 2 trading entity-convention rollout - #1950
Conversation
Story-ID: 6AC16489-70F6-4F95-A5FA-0D561FF151A3 Task-ID: 08547F5A-B07C-4429-9EA5-022ACDC882C9
|
@claude please review this pull request |
|
Claude finished @mcraveiro's task in 7m 0s —— View job Code Review — PR #1950
I reviewed the full diff and checked the new messaging/eventing wiring against actual call sites, and compared the new generators against the batch-1 reference pattern in Findings (most severe first)
Not blocking, but worth a lookNone beyond the above — the codegen-convention updates (tenant-scoped generation, version=0) and the migration of both models to the full entity shape (primary key folded into Columns, Table display section) otherwise look consistent with the batch-1 rollout pattern. |
|
Claude finished @mcraveiro's task in 3m 22s —— View job Code review in progress
|
|
Claude finished @mcraveiro's task in 2m 11s —— View job Review complete
Note: Bash tool calls (including SummarySolid, well-scoped port. The entity-shape migration (primary key folded into Bug: leftover
|
Slice of e48092942 (feature/badge-batch2-cross-component), restricted to projects/ores.trading: migrate the party_role_type and trade_type models to the full entity shape (primary key folded into Columns, Table display section) and carry over the generated table, eventing, generator, messaging, presentation, repository, and service files that are absent on main. The source commit's other components (iam, reporting, dq, qt, sql, codegen) are excluded: their content is superseded on main or deleted surface. Task-ID: 08547F5A-B07C-4429-9EA5-022ACDC882C9 Story-ID: 6AC16489-70F6-4F95-A5FA-0D561FF151A3 Environment: solid_dirac Co-Authored-By: Claude <noreply@anthropic.com>
Batch 3 of the badge/image/plain-text rendering rollout (task 08547F5A, closing): the audit/classification story is closed and batches 1-2 (badge_key wiring + regenerated entities) shipped. What remains from the implementation task's acceptance is the plain-text documentation leg: for each entity the audit classified as plain-text (no badge/image wiring), record a one-line documented reason per entity, and publish the plain-text-vs-badge-vs-image policy note. Small, documentation-only, no codegen changes expected. Co-Authored-By: Claude <noreply@anthropic.com>
Task DONE — batches 1-2 shipped (11 refdata entities via PR #1784; batch 2's trading slice via this branch: party_role_type/trade_type full entity shape + regeneration). Batch 3 (plain-text documentation) filed as capture B2FDEACD-C4D5-4651-91CF-73CBE26B713A. Story synced to DONE; no sprint row (product backlog inbox). Task-ID: 08547F5A-B07C-4429-9EA5-022ACDC882C9 Story-ID: 6AC16489-70F6-4F95-A5FA-0D561FF151A3 Environment: solid_dirac Co-Authored-By: Claude <noreply@anthropic.com>
Story-ID: 6AC16489-70F6-4F95-A5FA-0D561FF151A3 Task-ID: 08547F5A-B07C-4429-9EA5-022ACDC882C9
Codegen template cpp_domain_type_table.cpp.mustache streams enum columns raw (table << iter_var.column), which cannot compile: generated enum classes have no operator<<, only to_string(). trade_type_table.cpp is the first entity table with an enum column (product_type, added in the badge batch-2 trading rollout); it was hand-rendered via to_string(). The template needs an is_enum branch like the existing is_bool/is_optional/is_uuid branches. Co-Authored-By: Claude <noreply@anthropic.com>
Review findings 1-4 on PR #1950: the entity-shaped party_role_type and trade_type handler stacks were never reachable over the wire, and the legacy instrument_ref_handler path they replace is now retired. - registrar.cpp: append register_party_role_type_handlers to the messaging fan-out - registrar_trades.cpp: replace the four instrument_ref_handler trade-type subscription blocks with register_trade_type_handlers - application.cpp: register the party_role_type and trade_type event mappings for the Postgres LISTEN/NOTIFY -> NATS pipeline - delete instrument_ref_handler.hpp (header-only, no callers remain) Task-ID: 08547F5A-B07C-4429-9EA5-022ACDC882C9 Story-ID: 6AC16489-70F6-4F95-A5FA-0D561FF151A3 Environment: solid_dirac Co-Authored-By: Claude <noreply@anthropic.com>
Review findings 5-6 on PR #1950. - drop the leftover ++counter in both generators: codes are now built from the fetch_add index alone, matching the refdata party_type generator pattern (noun_role-<idx>, one atomic increment per record) - update the org generator expressions to match; regenerating reproduces the fixed code - render the product_type column in the trade type table converter, with the org Table display section updated product_type is the first enum column in an entity table display; the codegen table template streams enums raw and cannot compile, so the column is rendered via to_string() until the template gains an is_enum branch (captured as codegen-table-enum-columns). Task-ID: 08547F5A-B07C-4429-9EA5-022ACDC882C9 Story-ID: 6AC16489-70F6-4F95-A5FA-0D561FF151A3 Environment: solid_dirac Co-Authored-By: Claude <noreply@anthropic.com>
PR #1950 round: findings 1-6 fixed (wiring, handler retirement, generator counters, table Product column); two minors declined with reasons. See the * Review table. Task-ID: 08547F5A-B07C-4429-9EA5-022ACDC882C9 Environment: solid_dirac Co-Authored-By: Claude <noreply@anthropic.com>
055befa to
af0027d
Compare
|
All six findings fixed. 1-3. Wiring — fixed in f95e305: register_party_role_type_handlers appended to the fan-out in core/src/messaging/registrar.cpp; register_trade_type_handlers now called from registrar_trades.cpp (the four instrument_ref_handler trade-type subscription blocks replaced); application.cpp registers the party_role_type and trade_type event mappings alongside the six instrument mappings, before event_source.start().
Verification: local build clean (linux-clang-debug-make); ctest 71/71 passed, including all three ores.trading suites. |
|
Claude finished @mcraveiro's task in 7m 20s —— View job Code review in progress
|
|
Fixed in 185bb1f — both generators and both org sources dropped the leftover ++counter, matching the refdata party_type pattern. Minors, not changed:
Verification: local build clean (linux-clang-debug-make); ctest 71/71 passed, including all three ores.trading suites. |

Summary
Slice of the batch-2 cross-component badge rollout, restricted to trading: migrate the party_role_type and trade_type models to the full entity shape (primary key folded into Columns, Table display section) and port the generated table, eventing, generator, messaging, presentation, repository, and service files that are absent on main. The source commit's other components (iam, reporting, dq, qt, sql, codegen) are excluded: their content is superseded on main or deleted surface. The regenerated generators follow the current codegen convention (tenant-scoped generation, thread-safe counter, version=0); their tests were updated to match — the same stale-expectation fix already applied to the refdata generators. Closes task 08547F5A (batches 1-2 shipped); batch 3 (plain-text documentation) is captured.
Changes
Traceability
🤖 Generated with Claude Code