Task: Model the engine settings
Table of Contents
This page documents a task in the See and change everything a report runs story. It captures the goal, current status, acceptance, and any notes or results.
1. Goal
Store the engine settings of a report as a named configuration: a central row and three parts, a configuration type, a binding slot, and the seed that replaces the run settings columns.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | See and change everything a report runs |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-10-22 |
3. Acceptance
- The central table and the three part tables exist, generated from models.
- A write to a part bumps the central version in the same transaction.
- A report definition binds an engine settings configuration in its own slot.
- The ACME seed holds the engine settings configurations in place of the twenty run settings columns.
- The engine setting columns are gone from
risk_report_config. The export reads the Setup block from the bound engine settings, and the import writes it to them. - The importer drops a Setup parameter that the model does not hold and warns, naming it.
4. Plan
Reference entities, chosen so the knobs are the standard ones. The central row follows risk_report_config in the same
component and binds the profile uuid-identified-lookup. Each part follows book and binds the profile
fk-scoped-child, with parent_entity_singular set and the foreign key to the central row flagged
bump_parent_version. The central row sets generate_touch_function, as convention and portfolio do. The drift check
(projects/ores.codegen/scripts/check_model_drift.py) passes.
- Four models under
projects/ores.reporting/modeling/:engine_settingsand the partsengine_settings_fixings,engine_settings_buildingandengine_settings_execution. Every setting column is nullable. A null means the engine default, and a missing part row means the default for the whole group. - Generate the SQL, the domain, entity, mapper, repository and generator, and the TypeScript twins.
- Wire the new scripts into the create and drop lists and the tenant reset list.
- Seed the configuration type
engine_settings. A report type does not require it, because absent settings mean the defaults. - Add the publish function, the artefact type row, the operation and its subject, so a dataset can stage a document.
- Test the publish with pgTAP.
- Seed the ACME engine settings (7 configurations, only the five values the rows set today) and bind them in the report definitions by name.
- Decommission the engine columns of
risk_report_config: the model, the generated code, the staging table, the publish and the seed. The currency, the market data kind and the package layout columns stay. They have their own tasks. - Project the Setup block from the bound engine settings (export), and write it to them (import). The importer drops a parameter the model does not hold and warns.
- Update the tests that name the old columns.
Not in this task: moving the currency and the market kind to the report definition, recording what a run used, and the engine settings messaging, service and screens.
5. Measurements
Every number this task claims about a tree, with the command that produced it
and the commit it was measured at. A number without both is not a measurement,
because a clean-up record describes a tree and trunk moves under a branch: a
consumer count, a gate's component count and a suite's size all change with no
code changing, and the reader of a bare number cannot tell which tree it came
from. Where the raw output matters, put it in an evidence/ file beside the
task and name that file in the Command column.
| What | Value | Command | Commit |
|---|---|---|---|
6. Notes
7. Test Scenarios
Manual QA scenarios (scaffolded via compass add test_scenario)
that verify this task. Link
new ones here as they're created; the scenario doc itself links back
via its "Verifies task" field.
| Scenario | State | Notes |
|---|---|---|
8. PRs
| PR | Title |
|---|---|
| 3630 | Replace the engine columns of the run settings with named engine settings |
9. Review
| # | Comment summary | File | Decision | Notes |
|---|---|---|---|---|
| 1 | The import dropped Setup parameters with no log line and no mention in the message. | run_configuration_handler.cpp |
Fixed | The handler logs each warning and the message gives the count. |
| 2 | Removing the engine settings of an imported definition had no test. | run_store_database_tests.cpp |
Fixed | A database test imports, removes and checks that all four tables are empty. |
10. Result
PR 3630 merged as 1fe6abd775. The engine settings are a central row with three parts: fixings, building and execution. They hold the 15 documented settings. The 19 engine columns are gone from risk_report_config. The Setup projection reads and writes the bound engine settings, and the import drops a parameter the model does not hold and warns. The ACME seed stages seven configurations.
The PR was squash merged by mistake. The process asks for a merge commit. The owner chose to leave it.
Left for other tasks: the descriptions of the settings in the SQL, the currency and the market kind on the report definition, recording what a run used, and the engine settings messaging, service and screens.