Task: Model the FpML coded-scheme tables so codegen owns them
Table of Contents
This page documents a task in the Complete the ORE report configuration story. It captures the goal, current status, acceptance, and any notes or results.
1. Goal
Codegen produces the FpML coded-scheme tables, their DQ artefact tables and their notify triggers from models, so the "do not edit" comment on them is true again.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Complete the ORE report configuration |
| Now | Delivered elsewhere; this page records that and closes. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-10-14 |
3. Acceptance
- Each of the fifteen refdata coded-scheme tables has an entity model, and its generated create, notify trigger, drop and DQ artefact files are identical to the current ones or differ only in ways recorded and explained.
- The hand-written
refdata_*_notify_trigger_create.sqlfiles for these tables are replaced by generated ones. - The census reports none of these files as hand-written or as another generator's output.
4. Plan
(Implementation strategy. Written when work starts; key decisions
are distilled into the parent story's * Decisions at close, but the
plan itself stays — it is the historical record of what we did.)
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 | |
|---|---|---|---|---|
| The fifteen coded-scheme tables' artefact files | 0 come from sql_schema_artefact_create, the legacy lookup template; all 15 come from sql_schema_domain_entity_artefact_create |
=grep -rl 'Template: sql_schema_artefact_create.mustache' projects/ | wc -l= | dcd80a4c74 |
| Coded-scheme entity models | fifteen, one per table, under projects/ores.refdata/modeling/ |
git show --stat dcd80a4c74 -- projects/ores.refdata/modeling/ |
dcd80a4c74 |
6. Notes
From the hand-written SQL census in Find why so much SQL is hand-written and generate what codegen can.
These 44 files were written by the legacy JSON "table" models, which no longer
exist. They have been edited by hand since, for example by c30f8c312e. The
fifteen older refdata_*_notify_trigger.sql copies the legacy generator wrote
were dead and are deleted by Find why so much SQL is hand-written and generate what codegen can.
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 |
|---|---|
| #3294 | [dq] Move the lookup artefact tables onto domain models |
9. Review
| Comment summary | File | Decision | Notes |
|---|---|---|---|
10. Result
Delivered by Move the lookup artefact tables onto domain models
in sprint 28, not here. That task found the fifteen tables worse off than
this page recorded: they had no model at all, in any form, so nothing could
regenerate them and the JSON models this page blamed had never been in the
tree. It wrote all fifteen as ores.codegen.entity models under
projects/ores.refdata/modeling/, with the artefact hook and an * Artefact
columns section where the staging shape differs, and retired the legacy
sql_schema_artefact_create template with its literate source.
The acceptance holds as written: each of the fifteen has an entity model, its generated create, notify trigger, drop and DQ artefact files match the hand-written ones except the comment header and the model-stated staging prose, and the census reports none of them as another generator's output.
This page's last open question was whether the tables belonged in refdata at
all. They do: the artefacts are FpML coded schemes, which is refdata's data,
and the fifteen publish into ores.refdata tables.
Closed on the strength of the task above. No work is owed here.