refdata's generated wire projection is drifted and no gate covers it
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
Eighteen generated TypeScript files under
projects/ores.web/packages/wire-protocol/src/generated/refdata/protocol/ do
not match the output of the templates that produce them. Two kinds of
difference:
- The render adds
party_idto the write shape of every party-scoped entity.BookWritegains it afterid, andportfolio,business_unit,crm_driver_pair,party_contact_informationand the rest follow. The generated C++ write struct does not carry it:book_protocol.hpphas noparty_idanywhere, whiledomain/book.hpphas it and the TypeScript domain type honours it. - The render drops the junction and entity
*Eventinterfaces the tree still carries, such asCurrencyCalendarEventandPartyCountryEvent.
The whole component is drifted, not only its TypeScript: rendering refdata at
the default address reports 499 files that would change, C++ headers,
repositories, services, shell commands and tests among them. That work is the
clean-refdata story's, in flight on another branch.
2. Why
Two things are wrong, and they are separate.
The projection is stale, because nothing regenerated it. refdata is not in
COMPONENTS_UNDER_TEST, so the drift job does not render it; the sweep renders
every catalogue component but fails only on files the branch touched. This
capture exists because a formatting branch touched the files, and the sweep
then reported them — which is the gate working exactly as designed.
And the two protocols disagree about party_id, which is a template defect
rather than staleness. The TypeScript write shape carries a natural-key field
the C++ write shape omits, so regenerating the TypeScript alone would make the
browser send a field the server's parser never reads. Until that is settled,
regenerating the TypeScript is not a safe fix.
3. References
projects/ores.web/packages/wire-protocol/src/generated/refdata/protocol/book_protocol.ts—BookWrite, noparty_id.projects/ores.refdata/api/include/ores.refdata.api/messaging/book_protocol.hpp— the C++ write struct, noparty_id.projects/ores.refdata/api/include/ores.refdata.api/domain/book.hpp:74and.../generated/refdata/domain/book.ts:38— both domains carry it.projects/ores.refdata/modeling/ores.refdata.book.org—party_idis a natural-key field of the entity.check_component_drift.py --component refdata --dry-run— 499 files would change.projects/ores.web/.prettierignore— records the exclusion this put on the format check.
4. See also
- The documented regenerate-all command generates components that do not project — found in the same pass.
- Format the generated TypeScript with prettier — the story that surfaced this.