Story: Hotfix: the trading children write outside the session party
Table of Contents
This page documents a story in Sprint 27. It captures the goal, current status, acceptance criteria, and the tasks that compose it.
1. Goal
Let the trade booking and trade state eventing tests pass again, so the suite reports on the notification chain rather than on a row its own session cannot see.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent sprint | Sprint 27 |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-10-09 |
3. Acceptance
- The two eventing tests run under a party-scoped session.
ores.trading.core.testspasses.
4. Tasks
| Task | State | Start | End | Description |
|---|---|---|---|---|
| Scaffold story: Hotfix: the trading children write outside the session party | DONE | 2026-10-09 | 2026-10-09 | Story scaffolding rides this task: documents, sprint wiring, and the scaffold PR. Close it before merging that PR. |
| Implement Hotfix: the trading children write outside the session party | DONE | 2026-10-09 | Initial task for: Hotfix: the trading children write outside the session party |
5. Decisions
- The model says its test needs a session party, rather than the codegen
guessing it. The codegen decides `party_scoped_writes` from the entity's own
party_id column, and cannot see that a parent is party-isolated when the
parent is a hand-authored table with no modeling org – which is exactly the
case for
ores_trading_trades_tbl. A model flag,:party_scoped_writes: true, lets the two children that need it say so. - A party-scoped session does not imply a party column. The template set
v.party_idfrom the session whenever the session was party-scoped. The flag above breaks that implication, so the assignment is now gated onhas_party_columnas well.
6. Out of scope
- Whether
ores_trading_trades_tblshould be modelled. If it were, the codegen could derive the party isolation of this parent and the flag would not be needed. That is a much larger change.
7. Result
Done. ores.trading.core.tests passes: 929 assertions in 140 test cases. Only
the two generated eventing tests changed, plus the template and the flag that
produce them.