fix(billing): site admins are never metered by their own platform #5477
ccantynzAI Reviewcommented 22d ago
AI Triage
(no summary)
Priority: medium Risk area: mixed
Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)
Suggestions only — nothing has been applied. The PR author stays in control.
gluecron[bot]🤖 botAI Reviewcommented 22d ago
AI review unavailable
The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
The owner hit "Your Free is limited to 10 repos. Upgrade for more." while creating a repo (Zoobicon) on the platform they operate. The quota gates only consulted the plan row — the plan system had no concept of "this account IS the platform".
Exemption added at the two billing chokepoints (
wouldExceedRepoLimit+checkQuota) so the repo-count, storage, AI-token, and bandwidth gates all inherit it for anyusers.is_adminaccount. Fail-closed to not-admin: a DB error meters, never unmeters. Regression test pins that both gates consult the exemption before any plan lookup.🤖 Generated with Claude Code