8000 What a Run will cost · Issue #43 · kiran-brahma/writing-tool · GitHub
[go: up one dir, main page]

Skip to content

What a Run will cost #43

Closed
Closed

Description

@kiran-brahma

Parent

#34 — the Obelus v1.2 spec (docs/specs/obelus-v1.2.md). Covers stories 188–189.

Blocked by #35 — the rail restructures ModelPassesPanel.

What to build

A Run spends money. The estimate for one sits in text-[11px] text-stone-400 — the least prominent
text in the row — while the Run button beside it is the most prominent. And "Run structural set"
has no estimate at all
, despite being the action that spends the most: every enabled document-scope
Pass, multiplied by the chunk count when the Document is past the character limit.

Put the estimate where the decision is: beside or on the control that starts the Run. Give the
structural set a summed estimate over the Passes it would actually run, multiplied by the chunks it
would actually make.

The session total stays where it is. This is about the moment before spending, not the tally after.

Where

  • src/core/cost.ts — the pure sum over a set of Passes and a chunk count.
  • src/editor/ModelPassesPanel.tsx — placement on the per-Pass Run control and on the structural set
    control.

Acceptance criteria

  • A Pass's estimate is beside or on the control that runs it, at the same visual weight as the
    other row text. (story 188)
  • "Run structural set" shows a summed estimate before it is pressed. (story 189)
  • The sum covers exactly the enabled document-scope Passes it would run, multiplied by the chunk
    count it would use.
  • With no price table configured, the control says the cost is unknown rather than showing
    $0.00.
  • A cached Run is still reported as served from the cache with no Provider call.
  • The session total is unchanged.

Verification

Pure tests on the sum in src/core/cost.ts: enabled Passes only; document-scope only; chunk count
greater than one; an empty price table. Same input, same output.

No DOM layer.

Constitution

Unchanged. An estimate is a number about a Run; it never gates one.

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-agentSpec is ready for an agent to implement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0