Repository navigation
Description
Parent
What to build
The figures reach the page. background-runs.jsonl's line gains three optional fields ("The run record"): units (the parts a First map writer or reviewer group covered), model (from the result's modelUsage) and subject, the key of the view that keeps the run's answer (the First map draft's id, a review's PR and head, a law's id, a micro-world's key), so a view can find its runs' cost after the run is dismissed and its id forgotten. Old lines without them still read. settings.json gains plan: {kind, confirmed}, read as unknown when unset. The engine's estimates ride on the views that hold run buttons, actual costs on the views that keep a run's answer (the Map draft, the map text review, Back a law's patch, a micro-world) and on the runs list's rows, and the 7-day total on the runs list. No UI shows them yet.
Acceptance criteria
- The runner's record test gains rows for
units,modelandsubject, and for reading an old line without them - Each view's actual cost is found by
subjectafter its run was dismissed, tested for the Map draft and the map text review -
planreads unset, each kind, and confirmed; a malformed value reads as unknown and is reported as other settings are -
server/tests/wire.rsbuilds every changed wire struct whole andui/types.tsagrees (lawwire-types-agree)
Reading
- Studio: Run cost — what a background run takes from your plan, before and after #1056, "The run record", "The actual cost and the total", "Where the figures show". The spec lists
unitsandmodel;subjectjoins them in the same stored change, because the views clear their run ids when a run ends (server/src/map_draft.rs,server/src/map_review.rs,server/src/micro_worlds.rs).
Touches
- Files:
server/src/runner.rs,server/src/map_draft.rs,server/src/map_review.rs,server/src/back_a_law.rs,server/src/micro_worlds.rs,server/src/map.rs,server/src/settings.rs,server/src/api.rs,ui/types.ts,server/tests/runner.rs,server/tests/wire.rs - Session: auto mode
- Route: strong · effort high — changes a stored type (the run record, a setting) and wire types on several views
Activity
Studio: the run record and the views carry each run's cost (#1060)
Merge #1060: the run record and the views carry each run's cost
danielrispler commentedon Dec 2, 2026
Built on the integration branch
issue-1056-run-cost, PR #1071 (closes on merge).Route outcome: strong·high claude/opus → pass | 18m