feat(admin): add service fee controls and reporting - #5266
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThis increment rewrites the revenue KPI anti-join to a single-column UNION ALL hash join and paginates Stripe subscription items, resolving both prior warnings with no new issues on the changed lines. Files Reviewed (3 files)
Previous Review Summaries (3 snapshots, latest commit 598947d)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 598947d)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryThis increment only retargets exemption-log and assessment-key wording in plan/ADR docs; the revenue KPI anti-join and Kilo Pass subscription-item truncation warnings remain open on unchanged code. Overview
Issue Details (click to expand)WARNING
Files Reviewed (5 files)
Fix these issues in Kilo Cloud Previous review (commit 62a1d45)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryThe exemption-history unification is consistent across the admin router, UI, and tests, but the revenue KPI anti-join still risks a quadratic scan on a 60-second dashboard query, and the Kilo Pass audit script still silently truncates Stripe subscription items at 10. Overview
Issue Details (click to expand)WARNING
Files Reviewed (6 files)
Fix these issues in Kilo Cloud Previous review (commit 16483ed)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryThe exemption UI, admin router endpoints, revenue split, and read-only audits are well structured and well tested, but the new revenue KPI anti-join risks a quadratic scan on a 60-second auto-refreshing dashboard query, and the Kilo Pass audit script silently truncates Stripe subscription items at 10, which can falsely fail the release gate. Overview
Issue Details (click to expand)WARNING
Files Reviewed (20 files)
Reviewed by grok-4.6 · Input: 151.8K · Output: 9.3K · Cached: 537K Review guidance: REVIEW.md from base branch |
fb58b8e to
9613595
Compare
16483ed to
62a1d45
Compare
9613595 to
37349ab
Compare
62a1d45 to
598947d
Compare
Add the org exemption admin UI, fee-vs-product revenue reporting, and read-only Kilo Pass classification and restricted-coupon audits.
37349ab to
f7b5df8
Compare
598947d to
9983757
Compare
Summary
Adds organization exemption controls, fee-aware revenue reporting, and read-only rollout audits for the completed service-fee implementation.
Why this change is needed
The fee cannot be operated safely from Stripe alone. Platform admins need reasoned, historical organization exemptions; finance needs product and fee revenue separated after refunds and disputes; and rollout needs audits for Kilo Pass line classification and unsafe product-restricted coupons.
How this is addressed
Stack: #5236 → #5262 → #5263 → #5264 → #5265 → #5266 (this PR).
Human Verification
No new product or browser verification was performed while publishing this PR. The completed local validation run covered exemption grant/revoke and access control, non-inheritance, customer-surface privacy, revenue dashboard behavior, a full fee-aware refund, and both audit defect signatures.
Reviewer Notes
Human Reviewer Flags
Code Reviewer Agent
Code Reviewer Notes