Task: Group books under their portfolios
Table of Contents
This page documents a task in the Prove the report grid run end to end — the remaining work story. It captures the goal, current status, acceptance, and any notes or results.
1. Goal
A reader sees a portfolio's total above the books that make it up, and can check one against the other.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Prove the report grid run end to end — the remaining work |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-10-26 |
3. Acceptance
- A book carries its portfolio's name.
- A portfolio row states the sum of its books' trades, NPV and notional.
- Books sit under their portfolio, ordered largest first.
- A book in no portfolio stands on its own.
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 |
|---|---|
| #3893 | [web] Group books under their portfolios |
9. Review
| Comment summary | File | Decision | Notes |
|---|---|---|---|
10. Result
The book level states each portfolio above the books it holds.
A book that names a portfolio carries the portfolio's name, and a portfolio row sits above the books under it, with its trades, NPV and notional summed from them. Books sit under their portfolio, ordered largest first; a book in no portfolio stands on its own. The grouping is the one the counterparty level already uses, now shared: one helper, two parents.
On run c2a86671 the level draws Liquidity Buffer Portfolio at
33,709,129.46 HKD over eight trades, above Liquidity Buffer Bonds with the
same eight trades: the two agree, which is the point of stating a group at all.
A portfolio row does not lead anywhere, because no screen reads a portfolio record; the book under it does.