Task: Read a run's results in the reporting area

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 person opens a report in the reporting area, sees its runs, and reads the result the latest run produced without leaving the page.

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-25

3. Acceptance

  • The report page carries Definition, Runs and Results tabs.
  • The Runs tab lists the report's runs newest first with their state.
  • The Results tab reads npv.csv from the latest run's output archive and shows the figures first, then the rows.
  • A run with no output, or an output that holds no npv.csv, says so rather than drawing an empty table.
  • The parsing is tested against a file shaped the way the engine writes it.

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
#3844 [web] Read a run's results in the reporting area

9. Review

Comment summary File Decision Notes
       

10. Result

A report in the reporting area now carries the result of its latest run.

The page has three tabs. Definition is the record as before. Runs lists the report's runs newest first, each with its state and when it started and finished, and each opens the run it names. Results reads npv.csv from the latest run's output archive and draws the trade count and the total of each currency first, then one row per trade with its type, NPV, base NPV, notional and counterparty. No other screen carries a copy: the run page links here.

The run that proves it is 9ff0e92e-f21d-4137-bb24-ad4956fa99f0, on the NPV definition of ACME Corporation HK Ltd. It completed, and its Results tab shows eight bond trades and a total NPV of 31,607,092.99 HKD. The Runs tab shows the six runs of that definition, one completed and five failed, which is the history of the market data work that led here.

The market data the run priced against is hand crafted: 521 swap series for fourteen currencies, each with an observation at 2026-05-05, in the shape the engine names (IR_SWAP/RATE/<ccy>/0D/1D/<term>, with the term in the months or years the engine asks for).

The answer carries a reason code rather than a sentence, so the screen words an empty run, an output with no npv.csv and a file with no figures in the reader's language.

Three things are deliberately not here yet. The comparison against a previous run, the book tree and the plots are the rest of variant A. The counterparty column shows the id the engine writes, not a name. And the reports list pages at fifteen rows, so a person finds an NPV report by searching for it.

Emacs 29.3 (Org mode 9.6.15)