Task: Appraise currency across all layers and produce evaluation checklist

Table of Contents

This page documents a task in the Commission: currency story. It captures the goal, current status, acceptance, and any notes or results.

1. Goal

Produce a per-layer appraisal of the currency entity covering every access layer (DB, domain, table IO, JSON IO, Qt, shell, CLI, HTTP, Wt, manual). For each layer: record what exists, whether it is working post-NATS, and what is missing or broken. The findings are distilled into a reusable entity evaluation checklist — a knowledge document listing the standard criteria at each layer that any ores.refdata entity must satisfy to be considered fully commissioned.

2. Status

Field Value
State DONE
Parent story Commission: currency
Now Nothing.
Waiting on Nothing.
Next None.
Last touched 2026-05-29

3. Acceptance

  • Each layer assessed: DB, domain, table IO, JSON IO, Qt, shell, CLI, HTTP, Wt, manual.
  • Per-layer findings recorded in the * Result section.
  • A knowledge document entity_evaluation_checklist.org exists listing the standard criteria at each layer.
  • Any gaps or regressions found are filed as captures or noted inline.
  • Checklist is referenced from Entity Coverage Matrix.

4. PRs

PR Title
#929 [doc] Appraise currency entity; produce domain entity evaluation checklist

5. Review

# Comment summary File Decision Notes
1 Now field should be 'Nothing.' on DONE tasks task_appraise_currency.org Fixed in ffc43de33  
2 Now field should be 'Nothing.' on DONE tasks task_verify_sql.org Fixed in ffc43de33  
         

6. Result

Checklist document produced: ores.refdata entity evaluation checklist.

Per-layer findings for currency are recorded below. Status key: ✓ = present and working, ~ = present but needs verification post-NATS, ✗ = missing or broken.

6.1. DB layer

File: projects/ores.sql/create/refdata/refdata_currencies_create.sql

Criterion Status Notes
Table exists ✓ refdata_currencies
tenant_id column N/A Currencies are global (no tenant scope)
version column ✓  
modified_by, performed_by ✓  
change_reason_code, change_commentary ✓  
valid_from / valid_to temporal columns ✓  
GIST exclusion constraint ✓  
Natural key unique index ~ Verify index on code + valid_from
Soft-FKs documented N/A No party or workspace scope

6.2. Domain layer

File: projects/ores.refdata.api/include/ores.refdata.api/domain/currency.hpp

Criterion Status Notes
Domain struct exists ✓ 22 fields
All DB columns represented ✓  
Canonical C++ types ✓  
valid_from / valid_to as ptime ✓  
No logic in struct ✓  

6.3. Repository layer

Files: ores.refdata.core/include/.../repository/currency_entity.hpp, currency_mapper.hpp, currency_repository.hpp

Criterion Status Notes
Entity class ✓  
Mapper class ✓  
Repository class ✓  
list, count, save, delete, get ✓  
get_history ✓  
list_for_party N/A Global entity

6.4. Service layer

File: ores.refdata.core/include/.../service/currency_service.hpp

Criterion Status Notes
Service class ✓  
list, count, save, delete, get, get_history ✓  
list_for_party N/A Global entity
Authorization checks ~ Verify post-NATS
NATS event firing on mutation ~ Verify post-NATS

6.5. Messaging / JSON IO layer

Files: currency_json.hpp, currency_json_io.hpp

Criterion Status Notes
JSON struct ✓ rfl-based
IO handler ✓  
NATS message types (save, delete, saved, deleted) ✓  
List / count / get / history NATS types ✓  
JSON round-trip ~ Verify via NATS end-to-end test

6.6. Qt layer

Files: CurrencyMdiWindow, CurrencyController, CurrencyDetailDialog, CurrencyHistoryDialog, ClientCurrencyModel, ImportCurrencyDialog

Criterion Status Notes
MDI list window ✓  
Detail dialog ✓  
History dialog ✓  
Controller ✓  
Client model ✓  
Import dialog ✓ Bonus: bulk import
List window loads post-NATS ~ Needs manual verification
Detail dialog edit + save ~ Needs manual verification
History dialog correct ~ Needs manual verification
Delete preserves history ~ Needs manual verification
NATS eventing cross-session ~ Needs manual verification

6.7. Shell layer

File: projects/ores.shell/src/app/commands/currencies_commands.cpp

Criterion Status Notes
Submenu registered ✓  
list command ✓  
add command ✓  
remove command ✓  
history command ✓  
Post-NATS verification ~ Needs verification

6.8. CLI layer

File: projects/ores.cli/include/ores.cli/config/add_currency_options.hpp

Criterion Status Notes
Config struct ~ Only add options found; list/remove may be missing
list subcommand ~ Not confirmed; needs investigation
add subcommand ✓ Options struct exists
remove subcommand ~ Not confirmed; needs investigation
Post-NATS verification ~ Needs verification

Gap: CLI appears to have only add implemented. List and remove subcommands need confirmation and likely implementation.

6.9. HTTP layer

File: projects/ores.http.core/src/routes/risk_routes.cpp

Criterion Status Notes
GET list route ✓  
POST save route ✓  
DELETE batch route ✓  
GET history route ✓  
Routes registered ✓  
Routes tested ~ Manual verification needed

6.10. Wt web UI layer

Files: ores.wt.service/include/.../app/currency_list_widget.hpp, currency_dialog.hpp

Criterion Status Notes
List widget ✓  
Detail dialog ✓  
Wired into Wt app ~ Verify integration
List + edit round-trip ~ Needs verification

6.11. Manual

Criterion Status Notes
Entity chapter in doc/manual/user_guide/ ✗ Missing; recipes exist in doc/recipes/ but no manual chapter
Chapter covers what/why ✗  
Qt windows documented ✗  
Shell commands documented ✗  
CLI commands documented ✗  
Site builds cleanly with chapter ✗  

Gap: Manual chapter is entirely missing. Only recipe stubs exist.

6.12. Summary of gaps

  1. CLI: List and remove subcommands not confirmed; likely need implementation.
  2. Qt: All windows exist but post-NATS end-to-end verification needed.
  3. Shell / Service / NATS: Implemented but post-NATS verification needed.
  4. Manual: Chapter entirely missing — highest priority documentation gap.
  5. Wt / HTTP: Implemented; verification deferred to backlog (out of sprint scope).

Emacs 29.3 (Org mode 9.6.15)