Task: Page the blotter by keyset

Table of Contents

This page documents a task in the Let the blotter read a page, not the book 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 Let the blotter read a page, not the book
Now Nothing.
Waiting on Nothing.
Next Nothing.
Last touched 2026-11-01

3. Acceptance

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
       

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
[#4403](https://github.com/OreStudio/OreStudio/pull/4403) [trading] Answer the blotter's two questions with two reads

9. Review

Comment summary File Decision Notes
       

10. Result

The page is a keyset read. read_blotter_page reads one page after a key the service itself wrote: the sort value and the row id, joined by a separator no value holds. The default order is the trade date, newest first, then the id. A page with no key is the first page. trading.v1.blotter.page carries the key back to the screen, and is_sortable refuses a field the order cannot state, so the page and the list cannot disagree about what an order means.

Merged on main in #4403 at b903acb4. The four [page] cases in trading/core/tests/blotter_rail_tests.cpp cover a page of five read in twos, a page after a key, the page's agreement with its rail, and every sortable field stating a key.

Two costs remain, and they are not this task's: the key is compared as text, so no index serves the order, and the page reads the union view, so it pays for each row's laterals. List a package as the trade it is and Order the page by an indexed key carry them.

Emacs 29.3 (Org mode 9.6.15)