Spend · Routing savings receipts
Routing savings receipts
What each adopted routing proposal measurably saved. RepoOps routing advice arrives as a reviewable pull request, and each proposal whose PR actually merged earns a before and after receipt from real measured calls. This is the honesty counter to a router vendor's projected percentage: a dollar figure is published only where a real measured window exists.
Where to find it
- Localhost: the Routing savings receipts section on the Token Diet tab (
/token-diet.html?repo=<id>, sidebar: Spend → Token Diet) - API: the
routing-receiptssection ofGET /api/token-diet; the shareable card atGET /api/token-diet/receipt-card.svg?repo=<id>&pr=<n>
The three states, none fabricated
Adoption evidence
A proposal counts as adopted when the PR stamped on its decision-ledger row resolves to a number in the repo's merged-PR history. The adoption lookback tracks the measurement window back to the oldest finding's decision date (never shorter than 180 days), so an old adopted proposal cannot silently revert to unadopted.
No double count
Every dollar in a receipt is already counted exactly once, by the Token Diet savings signal. Receipts are that total's per-proposal breakdown: the section never enters the verdict decision and never adds to the realized total, and a test asserts the verdict and the total are byte-identical with and without receipts. A regressed receipt stays visible (and the labeled net-of-regressions figure includes its negative), but the verdict downgrade flows from the savings signal that already carries the same finding.
Sharing a receipt
Each receipt row offers Copy (the canonical JSON receipt payload, with a self-describing basis line), Download as JSON, and a link to the SVG receipt card, one shareable image per adopted proposal.