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.
BLOKOVÁNO vlna 1 · p2 · profil implementation · bezpečné paralelně
Blocked. This issue cannot start until I0301, I3287 are done. The status is derived from that, not declared.
Cíl
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.
Proč
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.
Aktuální stav
The benchmark run record keeps total_cost_usd as reported; no billing mode exists anywhere.
Cílový stav
Every surface prints the class beside each figure and refuses to sum across classes.
Rozsah
- 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
Závislosti
- I0301BLOKOVÁNO Definovat záznam provedení, včetně toho, jak vypadá nepřítomnost
- I3287READY A provider declares how it reports usage, with the evidence, beside its lifecycle
Co na tom čeká
- I3294BLOCKED /ui shows usage by provider, model, session, task and issue, and every figure opens its reported events
- I3295BLOCKED A task declared over its token budget is told so, and refused only where policy says refuse
- I3422BLOCKED Advisor consultations are economics usage with their measurement class, and a consultation over its plan's budget is a finding
Kritéria přijetí
- 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)
Validace
- cargo test --manifest-path apps/majordomus-cli/Cargo.toml --test economics
- majordomus economics check
Požadované důkazy
- test_usage_quantities_are_never_merged
Důkazy
Nic nezaznamenáno. Za každým tokenem výše musí stát příkaz nebo artefakt, než lze tento úkol dokončit; vyprávění se odmítá.
Časová osa
- zahájeno
- —
- ověřeno
- —
- dokončeno
- —
Tato tři pole, důkazy výše a stav závislostí jsou vše, z čeho se stav skládá. Neexistuje žádné pole stavu, které by s nimi mohlo být v rozporu.
Canonical record: .ai/repo/project/issues/I3292.yaml. Read it back with majordomus plan show I3292.