Skip to content
4 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Billing's fifteen minutes: spend alerts first, each step on its own, this month's users read once from an index (billing 0050)1-- This month's users, read every fifteen minutes for autopay and the limit
2-- warnings: usage entries from a date on, by kind and time, and the
3-- workspace in the index so the read never touches the ledger itself.
4CREATE INDEX IF NOT EXISTS ledger_usage_by_time ON ledger (kind, created_at, workspace);