Skip to content

Studio: the run record and the views carry each run's cost #1060

In review

Description

@danielrispler

Parent

#1056

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, model and subject, and for reading an old line without them
  • Each view's actual cost is found by subject after its run was dismissed, tested for the Map draft and the map text review
  • plan reads unset, each kind, and confirmed; a malformed value reads as unknown and is reported as other settings are
  • server/tests/wire.rs builds every changed wire struct whole and ui/types.ts agrees (law wire-types-agree)

Reading

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

  1. added
    ready-for-agent
    on Dec 2, 2026
  2. added 2 commits that reference this issue on Dec 2, 2026
  3. danielrispler commented on Dec 2, 2026

    @danielrispler
    OwnerAuthor

    Built on the integration branch issue-1056-run-cost, PR #1071 (closes on merge).

    Route outcome: strong·high claude/opus → pass | 18m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions