-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Usage & Spend projections can prune wider retained Codex cost history #2914
Copy link
Copy link
Closed
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.ClawSweeper needs more reporter information before it can verify this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:data-lossThis issue is about lost, corrupted, or silently dropped user/session/config data.This issue is about lost, corrupted, or silently dropped user/session/config data.issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.Decent issue quality, but reproduction details are still incomplete.
Description
Activity
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.ClawSweeper needs more reporter information before it can verify this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:data-lossThis issue is about lost, corrupted, or silently dropped user/session/config data.This issue is about lost, corrupted, or silently dropped user/session/config data.issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.Decent issue quality, but reproduction details are still incomplete.
Summary
Usage & Spend requests a narrow reporting window while the cost cache may retain a wider configured history. Under row or byte pressure, the current save path treats the requested reporting window as the retention boundary.
As a result, opening or refreshing a 7- or 30-day dashboard projection can delete completed cached rows and daily aggregates outside that projection, then narrow the persisted scan metadata. A dashboard view should extract a slice from the cache; it should not rebuild or destructively redefine the cache's retained coverage.
Expected behavior
Synthetic reproduction
Scope
This is a persistence-boundary bug. It is distinct from dashboard catch-up progress or the hard-coded Finish now scan scope tracked in #2861.
Related: #2823 and #2825.