Task: Carry the accumulator ranges and the worst-of-basket levels in the domain

Table of Contents

This page documents a task in the Close the credit loose ends story. It captures the goal, current status, acceptance, and any notes or results.

1. Goal

(Describe what user-visible-or-internal change this task produces.)

2. Status

Field Value
State DONE
Parent story Close the credit loose ends
Now Nothing.
Waiting on Nothing.
Next Nothing.
Last touched 2026-10-15

3. Acceptance

  • The five documents that still fail to re-read now round trip, so known_export_gaps() in xml_exporter_directory_roundtrip_tests.cpp is the empty set.
  • Every value the export writes is the value the source document carried. No placeholder stands in for a value the domain does not hold.
  • The new fields are model-driven: they live in the ores.trading codegen models and the component's drift check is clean, so no generated file is hand-edited.
  • No document that already re-read stops re-reading.

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
Documents that fail to re-read 0, down from 5 compass test run -- -R ores.ore.core.tests (the case "roundtrip mirrors every portfolio in the ORE example corpus"); known_export_gaps() is empty 25bd87137d
ORE core suite 667 cases, 0 failures the same command 25bd87137d
Trading codegen drift clean python3 projects/ores.codegen/scripts/check_component_drift.py --component trading-cpp 25bd87137d

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
#3384 [ore,trading] Carry the ORE values the schema requires

9. Review

Comment summary File Decision Notes
       

10. Result

No document in the example corpus fails to re-read any more, so known_export_gaps() is empty and the defect the previous task could only shrink is gone.

The five values the schema required now live in the domain. The equity and fx accumulators carry their range bounds, and the equity swap instrument carries the worst-of-basket swap's initial prices, knock-out levels and fixed trigger levels. Each is a nullable JSON text column beside the established basket_json, so the change is model-driven end to end: the domain class, mapper, repository, service, SQL schema, shell commands and wire protocol all come from the ores.trading models, and the component's drift check is clean.

Every value written back is the value the source document carried. No placeholder stands in for a value the domain does not hold, which is what the previous task refused to ship.

Acceptance met: the five documents round trip, every value is real, the fields are model-driven with a clean drift check, and nothing that re-read before stopped re-reading.

Emacs 29.3 (Org mode 9.6.15)