Skip to content

tracking: cost and subscription outlook (resurrected from #870, #803) #995

Closed

Description

@Sinity

Context

#870 (subscription usage outlook) was closed 2026-05-09 although PR #987 explicitly stated "Does NOT close this issue" — only lint/type housekeeping landed; zero of the nine feature ACs were met. #803 was closed with headline cost-tracking features deferred to "follow-up" with no issue number.

#870 acceptance criteria — all open

  • Subscription plan model (plan tier, included quota, overage rules)
  • Subscription-aware cost tracking (separate metered vs covered usage)
  • Per-model cost breakdown rollups
  • Quota forecasting (project usage vs cap on rolling window)
  • Overage detection and surfacing
  • Cost outlook surface in CLI / MCP / web reader
  • Tests for cost/quota math
  • Documentation of cost model
  • Migration of existing cost rows to new model where applicable

(Pull verbatim AC text from #870 when starting work — list above is reconstructed.)

#803 carry-overs

  • Per-model breakdown in cost surfaces
  • Cost query tests (explicitly deferred)
  • Removal of `provider_meta` cost fallback reads

Source

Activity

  1. added
    type:feat
    type:tracking
    on May 9, 2026
  2. Sinity commented on May 11, 2026

    @Sinity
    OwnerAuthor

    Strengthening pass — cost/subscription outlook

    This should be treated as a durable semantic model issue, not a reporting widget. Current code has pricing/cost payload models under polylogue/archive/semantic/pricing.py and subscription/outlook model shapes, but the issue needs a source-of-truth contract for usage, pricing, plan coverage, and forecasts.

    Refined scope:

    • Separate usage facts (tokens/messages/tool calls/provider events), pricing facts (model/unit/currency/effective date/source), subscription plan rules (included quota/caps/overage/reset cycle), and forecasts/anomalies (derived, confidence-bearing).
    • Preserve provider/source/model identity correctly: source family is not the same as lab, and model strings need canonicalization plus unknown handling.
    • Plan-covered usage and metered overage should be computed separately; do not collapse everything into dollar estimates.
    • Pricing tables must be versioned/effective-dated and allow unknown/stale prices to degrade explicitly.
    • CLI/API/insight surfaces should report confidence and missing data, not false precision.

    Implementation anchors:

    Acceptance should include fixtures for: plan-covered usage, overage usage, unknown model pricing, pricing effective-date change, monthly reset/cycle boundary, and forecast confidence with missing token data.

  3. Sinity commented on May 17, 2026

    @Sinity
    OwnerAuthor

    Decomposition

    Same pattern as #993 → #1118-#1125 and the parallel #994 decomposition. Filed six PR-sized children covering every #870 and #803 carry-over AC.

    Child Title #870/#803 ACs covered Depends on
    #1132 typed subscription plan config (cycle, quota, overage rules) #870 "Subscription plan model"; config parts of "Quota forecasting", "Overage detection" —
    #1136 split cost rollup by basis + per-model breakdown #870 "Subscription-aware cost tracking (separate metered vs covered)", "Per-model cost breakdown rollups"; #803 carry-over "Per-model breakdown" —
    #1137 cycle outlook engine — burn, projection, quota pressure, overage #870 "Quota forecasting", "Overage detection", "Forecasts read from typed read models", "Output includes cycle range/basis/confidence/coverage/projection method" #1132, #1136
    #1138 expose cycle outlook through CLI and MCP #870 "Cost outlook surface in CLI/MCP/web reader" (CLI+MCP slice), "Deterministic CLI JSON", "Labelled estimates" #1137
    #1139 remove provider_meta cost fallback reads outside extractors #803 carry-over "Removal of provider_meta cost fallback reads" #1136
    #1140 contract suite, migration of legacy rows, cost model docs #870 "Tests for cost/quota math", "Documentation of cost model", "Migration of existing cost rows" #1132, #1136, #1137

    Coverage check against #870 ACs

    #803 carry-overs

    Web reader cost panel

    Not a new child here — #1122 (cost panel with confidence chips) already exists from the #993 reader decomposition and is the right home. It depends on #1138's typed payload.

    Status

    Keeping this as an open umbrella until all six children close. Will close #995 with an AC matrix when #1132/#1136/#1137/#1138/#1139/#1140 (and the #1122 reader slice) ship.

  4. Sinity commented on May 17, 2026

    @Sinity
    OwnerAuthor

    Closing — all decomposition children shipped

    Per the 2026-05-17 decomposition comment, this umbrella tracked six child issues covering every #870 AC and #803 carry-over. All six are now closed:

    Capability Child Status
    Typed subscription plan config (cycle, quota, overage rules) #1132 CLOSED
    Split cost rollup by basis + per-model breakdown #1136 CLOSED
    Cycle outlook engine — burn, projection, quota pressure, overage #1137 CLOSED
    Expose cycle outlook through CLI and MCP #1138 CLOSED
    Remove provider_meta cost fallback reads outside extractors #1139 CLOSED
    Contract suite, migration of legacy rows, cost model docs #1140 CLOSED

    #870 AC coverage

    #803 carry-overs

    All shipped. Closing as completed.

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

    type:feattype:tracking

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions