Skip to content

enhancement: reprice source-dead preserved day-slices from their cached tokens on cache bumps #1132

Description

@iamtoruk

Found during 0.9.21 from-scratch verification. The partial-survival guard correctly refuses to replace a preserved day-slice when the fresh parse has fewer calls (sources pruned since sealing) — but keeping the slice also keeps its historical pricing. After a repricing wave (v29: #1118 orcarouter, #1123 copilot, #1101 etc.), days with partially-dead sources retain old rates: measured 3 days across a 200-day corpus, ~$46 total (0.15%), always under-claiming.

Preserved slices carry per-model token counts, so a cache-version bump could REPRICE them through the current tables without re-reading dead files — keeping the call-preservation guarantee AND current pricing. Needs the usual never-lose analysis (models missing from current tables keep their stored cost; never zero a priced slice).

Evidence: 2026-07-19 live-disk/fresh-install = $28.86/143 calls (agree to the cent); warm preserved = $15.29/283 calls (more calls, older prices). Fresh > warm on exactly 3 days, warm > fresh (durable value) on 19+69 days — union semantics working as shipped, this is the refinement.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions