You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(backend): keep Developer API conversation reads under one shared ceiling
Splitting conversation list and detail reads into separately tunable policies
(#8713) gave each route its own bucket, so a single API key can make 60 list
reads *and* 60 detail reads per hour where it previously made 60 in total.
The practical exposure delta is small -- detail reads return one conversation
each, ~1% of what the list endpoint's 100-record pages already allow, and the
polling vector from the original incident is still capped at 60/hr. The reason
to fix it is structural: nothing bounds the policy set, so every future
dev:conversation_*_read policy silently raises the aggregate again.
Add a "dev:conversation_reads_total" policy that every conversation read charges
before its per-route budget. The aggregate returns to 60/hr while list, detail
and transcript budgets stay independently tunable underneath it, which also
settles the review thread asking why detail was given the same value as list.
Costs one extra Redis round trip on the two conversation read routes; the
existing transcript sub-budget already charges two buckets on the same request.
The added test drives both routes in alternation and asserts the aggregate, not
a per-route budget, is what rejects the caller. It fails on the prior wiring
with "120 != 60".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments