Story: Commission: monetary_nature
Table of Contents
This page documents a story in Sprint 21. It captures the goal, current status, acceptance criteria, and the tasks that compose it.
Goal
monetary_nature is an auxiliary lookup type used by currency to classify
whether a currency is fiat, digital, or commodity-backed. It has a SQL table,
a full codegen model, and a Qt window — but it has never been formally
commissioned.
The purpose of this story is to close that gap: every codegen profile must produce zero drift (or every non-zero delta must be signed off by category and committed as a template fix or code fix), the SQL DDL must satisfy the canonical Domain entity evaluation checklist criteria, the Qt window must be manually verified end-to-end, and the type must be documented within the parent currency chapter.
Process reference: See Entity commissioning process reference for the canonical codegen output map, drift classification rules, and the standard task checklist.
Status
| Field | Value |
|---|---|
| State | BACKLOG |
| Parent sprint | Sprint 21 |
| Now | Not yet started. |
| Waiting on | Nothing. |
| Next | Break into tasks; start with appraise. |
| Last touched | 2026-06-25 |
Background
monetary_nature was first analysed as part of Commission: currency. Several
codegen sync tasks were executed there for this type:
| Work completed | Where |
|---|---|
| C++ messaging codegen sync (protocol, nats-eventing, nats-handler) — zero diff | Sync C++ messaging codegen for currency auxiliaries |
C++ core codegen sync (domain, repository, service, generator) — only domain header had accepted drift (@brief, example values) |
Sync C++ core codegen for currency auxiliaries |
| Qt codegen sync (12 files) — all drift resolved; templates fixed | Sync Qt codegen for currency auxiliaries |
What has not been done:
- SQL DDL audit against the full checklist
- SQL codegen sync (
sqlprofile) - Qt UI end-to-end manual verification
- Documentation in the currency chapter
Acceptance
Codegen (all profiles)
sqlprofile: zero diff formonetary_natureSQL files, or every delta signed off and committed (template fix / code fix / accept with justification).domainprofile: zero diff formonetary_naturedomain, json_io, table, table_io files (six files), or every delta signed off. Note the known domain secondary template path issue: verify that secondary templates produce files in the correct location (projects/ores.refdata/api/, not an untrackedprojects/ores.refdata.api/).repository,service,generator: zero diff (previously confirmed; re-verify if templates have changed since).protocol,nats-eventing,nats-handler: zero diff.qt: zero diff (confirmed in PR #1311; re-verify if qt templates change).- Drift classification table recorded for every non-zero delta.
SQL
- All DB-layer checklist criteria met (see Domain entity evaluation checklist Aux
column): temporal columns, GIST exclusion, indexes, insert trigger with
security definer + set search_path, validate function with same, bootstrap guard usingvalid_tofilter, soft-delete rule. - Any gap either fixed inline or filed as a capture.
Qt
- MDI list window loads correctly (records displayed, columns correct).
- Detail dialog: edit a field, save, reopen — change persisted.
- History dialog: after a save, history shows at least two versions.
- Delete: record removed; history entries preserved.
- The type appears correctly as a dropdown in the
currencydetail dialog.
Documentation
monetary_naturedocumented as a subsection of the currency chapter: valid codes + descriptions listed (Fiat, Digital, Commodity-backed, etc.); purpose explained for an operator.- Site builds cleanly.
- Wt and HTTP gap captures filed (backlog).
Tasks
| Task | State | Start | End | Description |
|---|---|---|---|---|
| Appraise: score all layers against evaluation checklist | BACKLOG | Walk the checklist; record findings; identify any gaps beyond what is listed here. | ||
| Verify and fix SQL DDL | BACKLOG | Check all DB-layer criteria from the evaluation checklist; fix any gaps inline. | ||
| Sync codegen: sql profile | BACKLOG | Run sql profile; diff; sign off or fix every delta. | ||
| Sync codegen: domain, repository, service, generator profiles | BACKLOG | Re-verify all four profiles (previously confirmed zero-diff for repo/service/gen; domain had accepted drift). Check secondary template path issue. | ||
| Sync codegen: protocol, nats-eventing, nats-handler profiles | BACKLOG | Re-verify (previously zero-diff; re-run if messaging templates changed). | ||
| Sync codegen: qt profile | BACKLOG | Re-verify (confirmed in PR #1311). Re-run if qt templates changed since. | ||
| Verify Qt UI end-to-end | BACKLOG | Manual test: MDI list, detail, history, delete, dropdown in currency detail dialog. | ||
| Write documentation | BACKLOG | Document monetary_nature as a subsection of the currency manual chapter; file Wt/HTTP captures. | ||
| File Wt and HTTP gap captures for monetary_nature | BACKLOG | File backlog captures for monetary_nature Wt web UI and HTTP API layers. |
Decisions
- Auxiliary scope.
monetary_natureis an auxiliary type: shell and CLI commands are N/A for this entity (operators interact with it only via the Qt dropdown in the currency detail dialog and via codegen-driven list/count/save/delete in the service layer). - Documentation in parent chapter. Auxiliary types are documented as subsections of the parent entity's manual chapter rather than having their own chapter.
Out of scope
- Implementing standalone shell or CLI commands for
monetary_nature(auxiliary type; if needed in future, file a capture). - Wt and HTTP REST endpoints (file gap captures; out of sprint scope).