Skip to content

downsize's driver-role card doesn't disclose it double-counts resend's cost figure for the same sessions #613

Description

@anshss

Severity: Low

Where: core/optimize/cost_proposals.py (_downgrade_to_proposals / the driver-role adapter branch), analyzers/model_downgrade.py, and the driver-role partition in analyzers/resend_tail.py::premium_driver_role.

Observed: The resend and downsize analyzers' estimated_recoverable_* figures are kept disjoint by design, but NOT their cost figures. 706 sessions carrying $1,787.15 of resend's observed cost are the same sessions downsize's driver-role case reports $512.23 of avoidable spend on. A user reading both cards is seeing one underlying population twice under two headings.

#598 closed half of this: resend's coverage_note now states, on its own card, that those 706 sessions and that $1,787.15 are analysed on the model-role card instead. The mirror sentence on downsize's card was left out because it is a change to a different adapter with a different shape (per-agent cards, no cost figure of its own), and bundling it would have widened an already large PR.

Fix direction: The driver-role downsize card should name the reciprocal fact — that the sessions it prices also appear in resend's cost figure, and that the two are not additive. Reuse the shared premium_driver_role predicate for the session count so the two cards cannot state different numbers. Consider whether a single shared helper should generate BOTH sides' disclosure text from one computation, the way the tail arithmetic already lives in resend_tail.py once.

Done when: A user reading the downsize driver-role card can see that its sessions overlap resend's cost figure and that the two figures must not be summed; the session count and dollar figure quoted on each card come from one computation, pinned by a test that builds both cards from one report and asserts they agree.

Ref: Found while working on the resend both-ends + window normalization change in #598.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions