What is wrong
examples/bank/include/bank/core/types.hpp declares 10 enum class types used as bare DTO fields (Currency, AccountKind, AccountStatus, TxnDirection, PaymentSchedule, PaymentStatus, CardStatus, CardKind, LoanStatus, TxnKind), none of which have a glz::meta/glz::enumerate specialization.
Per morph#392 (fixed by #444), morph::forms::schemaJson<A>() now static_asserts that every enum class member it reaches declares glz::meta/glz::enumerate — without one, glaze emitted a six-way wildcard schema type that the shipped DynamicForm rendered as a checkbox, silently reporting a form ready for a value nobody chose.
schemaJson<A>() is called unconditionally by BRIDGE_REGISTER_ACTION (morph::model::detail::buildActionDescription), independent of whether a rung renders any form through morph::forms — so bank, which uses BRIDGE_REGISTER_ACTION extensively (account_model.hpp, card_model.hpp, transaction_model.hpp, etc.) but predates the DTO-palette rule (IMPLEMENTATION.md rule 3 already notes "bank predates this rule"), fails to build with -DMORPH_BUILD_BANK_EXAMPLE=ON.
Why this isn't caught by CI today
MORPH_BUILD_BANK_EXAMPLE does not appear anywhere in .github/workflows/ci.yml — no CI job builds bank. This is a real, reproducible build break for anyone building bank locally (confirmed via -DMORPH_BUILD_BANK_EXAMPLE=ON on the windows-everything/cl-qt-release presets), but currently invisible to the CI matrix.
Why this needs its own investigation, not a copy-paste of ledger's fix
Unlike ledger's enums (which used implicit 0, 1, 2, ... values with no other reliance on the integer encoding), every one of bank's 10 enums declares explicit = 0, = 1, ... values:
enum class Currency : std::uint8_t {
USD = 0,
EUR = 1,
GBP = 2,
CHF = 3,
JPY = 4,
};
Adding glz::meta/glz::enumerate switches the wire encoding from the raw integer to the enumerator name string. Before doing that for bank, someone needs to check whether anything — the WASM demo's JS glue, the CLI, a stored/cached payload — currently depends on the integer encoding, since this is bank's oldest, most widely-deployed rung (it has a live GitHub Pages WASM demo).
What would close this
Add glz::meta/glz::enumerate for all 10 enums (same pattern as ledger::Currency/kanban::Role), after confirming no consumer depends on the integer wire encoding — or, if one does, a considered decision on how to migrate it (a version bump, a dual-read period, etc.) rather than a silent break.
Verification status: reproduced
Confirmed via a real build: -DMORPH_BUILD_BANK_EXAMPLE=ON on windows-everything fails to compile bank's model/action-registration translation units with the same static_assert #392 added, once ledger's equivalent gap (fixed in #444) is cleared.
Found while verifying #444 (which fixed morph#392); bank's build was not exercised by that PR's CI, so this was found locally, not by a red check.
What is wrong
examples/bank/include/bank/core/types.hppdeclares 10enum classtypes used as bare DTO fields (Currency,AccountKind,AccountStatus,TxnDirection,PaymentSchedule,PaymentStatus,CardStatus,CardKind,LoanStatus,TxnKind), none of which have aglz::meta/glz::enumeratespecialization.Per morph#392 (fixed by #444),
morph::forms::schemaJson<A>()nowstatic_asserts that everyenum classmember it reaches declaresglz::meta/glz::enumerate— without one, glaze emitted a six-way wildcard schema type that the shippedDynamicFormrendered as a checkbox, silently reporting a formreadyfor a value nobody chose.schemaJson<A>()is called unconditionally byBRIDGE_REGISTER_ACTION(morph::model::detail::buildActionDescription), independent of whether a rung renders any form throughmorph::forms— sobank, which usesBRIDGE_REGISTER_ACTIONextensively (account_model.hpp,card_model.hpp,transaction_model.hpp, etc.) but predates the DTO-palette rule (IMPLEMENTATION.mdrule 3 already notes "bank predates this rule"), fails to build with-DMORPH_BUILD_BANK_EXAMPLE=ON.Why this isn't caught by CI today
MORPH_BUILD_BANK_EXAMPLEdoes not appear anywhere in.github/workflows/ci.yml— no CI job buildsbank. This is a real, reproducible build break for anyone building bank locally (confirmed via-DMORPH_BUILD_BANK_EXAMPLE=ONon thewindows-everything/cl-qt-releasepresets), but currently invisible to the CI matrix.Why this needs its own investigation, not a copy-paste of ledger's fix
Unlike
ledger's enums (which used implicit0, 1, 2, ...values with no other reliance on the integer encoding), every one of bank's 10 enums declares explicit= 0, = 1, ...values:Adding
glz::meta/glz::enumerateswitches the wire encoding from the raw integer to the enumerator name string. Before doing that for bank, someone needs to check whether anything — the WASM demo's JS glue, the CLI, a stored/cached payload — currently depends on the integer encoding, since this is bank's oldest, most widely-deployed rung (it has a live GitHub Pages WASM demo).What would close this
Add
glz::meta/glz::enumeratefor all 10 enums (same pattern asledger::Currency/kanban::Role), after confirming no consumer depends on the integer wire encoding — or, if one does, a considered decision on how to migrate it (a version bump, a dual-read period, etc.) rather than a silent break.Verification status: reproduced
Confirmed via a real build:
-DMORPH_BUILD_BANK_EXAMPLE=ONonwindows-everythingfails to compilebank's model/action-registration translation units with the samestatic_assert#392 added, onceledger's equivalent gap (fixed in #444) is cleared.Found while verifying #444 (which fixed morph#392); bank's build was not exercised by that PR's CI, so this was found locally, not by a red check.