Story: Reporting subsystem

Table of Contents

This page documents a story in Sprint 14. It captures the goal, current status, acceptance criteria, and the tasks that compose it.

Goal

Stand up the ores.reporting subsystem from scratch: design, schema, C++ domain + messaging + repository, Qt UI with cron widget

  • scheduling backend, and the party-codename design that supports

per-party queue isolation.

Status

Field Value
State DONE
Parent sprint Sprint 14
Now Completed 2026-03-03.
Waiting on None.
Next None.
Last touched 2026-03-03

Continued in: Reporting and analytics (sprint 16). Sprint 14 stood up ores.reporting; sprint 16 sources report definitions from the DQ artefact table, adds the report execution workflow pipeline, and lands the analytics pricing engine.

Acceptance

  • Design document captures domain model + dual FSMs + scheduler integration.
  • SQL schema in place with FSM lifecycle, RLS, NOTIFY triggers.
  • C++ component with 32 new message types.
  • Qt UI for report types / policies / definitions / instances; cron widget integrated.
  • Party codename design plan captured for the implementation that follows.

Tasks

Task State Start End Description
Add reporting component design document DONE 2026-05-20 2026-03-01 Design specification for ores.reporting: report_type enum; report_definition (template, lifecycle FSM); report_instance (execution, lifecycle FSM); risk_report_config; scheduler integration via pg_cron at the time; open questions captured.
Add ores.reporting SQL schema DONE 2026-05-20 2026-03-02 SQL schema for the reporting subsystem: report_definitions + report_instances with FSM lifecycle; concurrency_policies + report_types enum tables; risk_report_configs for NPV / cashflow / XVA / VaR / SIMM with temporal junctions for portfolio + book scoping; NOTIFY triggers; RLS for tenant + party isolation; ores_reporting_ component prefix in the schema validator.
Reporting: domain types, messaging, repository DONE 2026-05-20 2026-03-02 C++ ores.reporting component: report_type / concurrency_policy / report_definition / report_instance domain types; 32 new message types for CRUD + history across the four entities; repository layer; codegen models.
Reporting UI: cron widget, party codename plan DONE 2026-05-20 2026-03-03 Qt UI for report types / concurrency policies / report definitions / instances (MDI windows, detail dialogs, history); CronExpressionWidget + CronEditorDialog; scheduling backend message handlers leveraging pg_cron + pgmq; party codename design plan; tenant provisioning wizard gains initial-report-definition step; new icons (Arrow Trending, Chart Multiple, Tasks App).

Decisions

Two distinct FSMs
report_definition (draft/active/suspended/archived) and report_instance (pending/running/completed/failed/cancelled) — separate lifecycles.
Cron widget + editor dialog
takes the cron-expression UX off the user's mental load.
Schedule via ores.scheduler
re-use sprint-13 infrastructure (originally pg_cron-backed; later migrated to in-process).

Out of scope

  • Distributed execution (ores.grid) — future.
  • Report output storage strategy — open question captured.

See also

Emacs 29.1 (Org mode 9.6.6)