Skip to content

I3292 — Reported tokens, a price-list estimate and a billed amount are three fields, and the billing mode says which account paid

Give the usage record of I3288 reported_tokens, estimated_cost (class estimated) and billed_cost (absent unless reconciled), plus billing_mode (subscription, api_key, api_credits, unknown) declared by the person, so that on a subscription an API-equivalent price is never shown as spend.

BLOCKED wave 1 · p2 · implementation profile · parallel safe

Part of every-sessions-usage-is-observed — What every AI session consumed is observed from the provider, attributed to the work it served, and never estimated into a fact.

Blocked. This issue cannot start until I0301, I3287 are done. The status is derived from that, not declared.

Objective

Give the usage record of I3288 reported_tokens, estimated_cost (class estimated) and billed_cost (absent unless reconciled), plus billing_mode (subscription, api_key, api_credits, unknown) declared by the person, so that on a subscription an API-equivalent price is never shown as spend.

Why

The owner works on subscriptions; Claude Code's cost field is an approximation and Admin cost reports are unavailable to individual accounts (dated vendor claims). docs/ECONOMICS.md already classes every number observed, counted, derived, estimated or counterfactual; this record must use those classes, not a second vocabulary. No provider event carries the plan type, so billing_mode needs a named reporter; the critique also found that 'the execution record' could land on the capability-execution type. It extends milestone execution-telemetry. Proposed in ADR 0213 (Usage is observed through each provider's official telemetry into one provider-neutral record, and reported, estimated and billed amounts are never merged) (proposed; it carries no authority until the owner accepts it). Sources: chatgpt-majordomus:c253#2, chatgpt-majordomus:c267#2, chatgpt-majordomus:c267#7.

Current state

The benchmark run record keeps total_cost_usd as reported; no billing mode exists anywhere.

Desired state

Every surface prints the class beside each figure and refuses to sum across classes.

Scope

  • apps/majordomus-cli/src/economics
  • docs/ECONOMICS.md
  • share/schemas/generated/economics-summary.schema.json
  • apps/majordomus-cli/tests/economics.rs
  • docs/generated/economics.json

Dependencies

What waits on this

Acceptance criteria

  • A subscription session shows its estimate labelled estimated and no spend
  • Summing estimated with billed is a compile- or test-time refusal
  • An unknown billing mode reads unknown
  • reported_tokens, estimated_cost, billed_cost and billing_mode live on the I3288 usage record, never on execution::Execution
  • billing_mode is a declaration the person makes through the consented I3289 step, recorded as declared; without one it reads unknown; an inferred value is refused (test)

Validation

  • cargo test --manifest-path apps/majordomus-cli/Cargo.toml --test economics
  • majordomus economics check

Evidence required

  • test_usage_quantities_are_never_merged

Evidence

None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.

Timeline

started
—
verified
—
completed
—

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I3292.yaml. Read it back with majordomus plan show I3292.

Searches the titles and descriptions of every page this site publishes.