docs(payments): require admin-page sync on money-model changes#366
Conversation
The credits admin page (src/api/v2/credits-admin/) hard-codes the balance model — it is not generated. The Option-B to single-ledger migration changed what balance means but skipped the admin page, leaving two balance cards rendering identical numbers under stale 'derived'/'parked' labels. Add a rule to the money law: any change to how credits are stored, computed, or displayed (new GrantKind/LedgerReason, changed getBalance/spendable meaning, changed entitlement math) MUST carry a matching admin-page update. Wire it into the add-a-money-flow checklist and a dedicated section.
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Claude finished @fbac's task —— View job PR Review Complete ✅Todo List
Review FeedbackThis is an excellent documentation addition that addresses a real operational problem. The changes are clear, well-motivated, and appropriately positioned. Strengths ✅
Minor Suggestions (Optional)
Code Quality Assessment
Security & Performance
VerdictApprove and merge. This is exactly the kind of meta-fix that prevents future production issues. The rule is clear, actionable, and well-integrated into the existing checklist workflow. Branch: |
ApprovabilityVerdict: Needs human review Documentation-only change adding guidance to AGENTS.md in the payments directory. The file is owned by xmtplabs/engineering, and designated code owners should review changes to their documentation even when trivial. You can customize Macroscope's approvability policy. Learn more. |
Summary
src/payments/AGENTS.md): any change to how credits are stored, computed, or displayed (newGrantKind/LedgerReason, changedgetBalance/spendable meaning, changed entitlement math) MUST carry a matching update to the credits admin page.Test Plan
prettier --checkclean (docs-only)Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Document requirement to sync credits admin page on money-model changes
Adds a checklist item and dedicated section to AGENTS.md instructing engineers to update
src/api/v2/credits-admin/whenever the balance model,GrantKind/LedgerReasonset, or entitlement math changes. The admin page is hard-coded (not generated) and must be kept in sync manually, covering the ledger view, balance cards, and subscription entitlement figures.Macroscope summarized 412b8ec.