Story: Commission: monetary_nature

Table of Contents

This page documents a story in Sprint 22. 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 DONE
Parent sprint Sprint 22
Now Nothing.
Waiting on Nothing.
Next None.
Last touched 2026-07-10

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 (sql profile)
  • Qt UI end-to-end manual verification
  • Documentation in the currency chapter

Acceptance

Codegen (all profiles)

  • sql profile: zero diff for monetary_nature SQL files, or every delta signed off and committed (template fix / code fix / accept with justification).
  • domain profile: zero diff for monetary_nature domain, 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 untracked projects/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 using valid_to filter, 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 currency detail dialog.

Documentation

  • monetary_nature documented 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

None of the checklist rows below were ever broken out into real tracked task files except the last one — they describe the plan, not executed work. Resolved 2026-07-10 by checking the actual evidence rather than trusting this stale checklist:

  • Codegen sync (all profiles, including SQL) — done via Commission: currency's auxiliary sync tasks ("Sync C++ core codegen for currency auxiliaries", "Sync C++ messaging codegen for currency auxiliaries", "Sync Qt codegen for currency auxiliaries", "Sync SQL codegen for currency and auxiliaries" — all DONE).
  • Qt UI end-to-end — verified: the Monetary Natures window and detail dialog screenshots in the currency manual chapter (monetary_natures_main_window.png, monetary_natures_details.png) could not exist without a working, manually-driven Qt session.
  • Documentation — done: =chapter_5_currencies.org=§"Monetary Natures" documents all four values (Fiat, Commodity, Synthetic, Supranational) with screenshots.
Task State Start End Description
File Wt and HTTP gap captures for monetary_nature ABANDONED   2026-07-10 Superseded by the top-level Wt/HTTP commissioning-story captures.

Decisions

  • Auxiliary scope. monetary_nature is 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).

Emacs 29.3 (Org mode 9.6.15)