Summary
Deferred from 00 — accepted gap, not a bug. citation_usage has the same client-write flaw fixed for usage_records in #3: use-citation-usage.ts:111-121 upserts the user's own count, and get-citations does no auth. Anon citation counting lives purely in localStorage (sb_anon_citation).
Deferred because abuse burns NCBI rate limits, not OpenRouter spend (PRD §Non-goals).
When picked up
Apply the #2/#3 pattern to get-citations:
Trigger to prioritize
NCBI rate-limit pressure, or any feature that makes citations expensive (e.g. per-citation AI processing).
Summary
Deferred from 00 — accepted gap, not a bug.
citation_usagehas the same client-write flaw fixed forusage_recordsin #3:use-citation-usage.ts:111-121upserts the user's own count, andget-citationsdoes no auth. Anon citation counting lives purely in localStorage (sb_anon_citation).Deferred because abuse burns NCBI rate limits, not OpenRouter spend (PRD §Non-goals).
When picked up
Apply the #2/#3 pattern to
get-citations:consume_usageRPC family (decide: foldcitation_usageintousage_recordswithkind='citation', or keep the separate table + same policy swap)citation_usage; keep SELECT for displayTrigger to prioritize
NCBI rate-limit pressure, or any feature that makes citations expensive (e.g. per-citation AI processing).