Bill Pro plans on active time-series#918
Conversation
🤖 Claude Code ReviewPR: #918 Code Review: Bill Pro plans on active time-seriesOverall this is a high-quality, well-documented change. It replaces the per-metric Pro billing (plus the daily credit-grant/reconciliation sweep) with an active-series meter fed by a Correctness / robustness
Performance
Minor / cleanup
Standards compliance
Recommendation: Approve after (1) confirming the Model: claude-opus-4-8 |
|
| Branch | active-series-billing |
| Testbed | intel-v1 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result microseconds (µs) (Result Δ%) | Upper Boundary microseconds (µs) (Limit %) |
|---|---|---|---|
| Adapter::Json | 📈 view plot 🚷 view threshold | 4.63 µs(+0.34%)Baseline: 4.62 µs | 4.86 µs (95.34%) |
| Adapter::Magic (JSON) | 📈 view plot 🚷 view threshold | 4.48 µs(-0.28%)Baseline: 4.49 µs | 4.70 µs (95.33%) |
| Adapter::Magic (Rust) | 📈 view plot 🚷 view threshold | 26.12 µs(+2.33%)Baseline: 25.52 µs | 26.55 µs (98.36%) |
| Adapter::Rust | 📈 view plot 🚷 view threshold | 3.56 µs(+2.13%)Baseline: 3.48 µs | 3.60 µs (98.94%) |
| Adapter::RustBench | 📈 view plot 🚷 view threshold | 3.55 µs(+1.92%)Baseline: 3.48 µs | 3.59 µs (98.92%) |
84c9153 to
c1977a7
Compare
c1977a7 to
98be1a1
Compare
98be1a1 to
d427941
Compare
d427941 to
33fd222
Compare
33fd222 to
d91be06
Compare
d91be06 to
9d3170c
Compare
9d3170c to
4d313d0
Compare
4d313d0 to
c7253e9
Compare
c7253e9 to
090ef76
Compare
090ef76 to
34f168c
Compare
34f168c to
eca5974
Compare
eca5974 to
7a3b125
Compare
7a3b125 to
d555f66
Compare
d555f66 to
4c86eb2
Compare
4c86eb2 to
0683e88
Compare
0683e88 to
0efb312
Compare
0efb312 to
776d5e6
Compare
776d5e6 to
3b074f9
Compare
3b074f9 to
18ef1d0
Compare
18ef1d0 to
2e6ed84
Compare
2e6ed84 to
93f7008
Compare
Use a single tiered Stripe price on the Bencher Pro product to bill both the monthly base fee (tier 1 flat fee) and the per-series step-ups on the active_series meter. This replaces the separate series product, the flat base price, and the monthly included-usage credit grants. Pro subscriptions now carry the tiered active-series price plus bare metal, are identified by that price, and no longer bill the per-metric metrics meter. The 30-day free trial uses a native subscription-level Stripe trial (Checkout compatible) instead of a coupon. Active-series usage is posted to Stripe after each report (counted on the request connection, posted in a detached task) rather than by a nightly sweep, which is removed along with the account-credit grants.
93f7008 to
894c2bd
Compare
Add a value-based billing dimension for the Pro plan: monthly-active series,
where a series is a distinct testbed x benchmark x measure an organization
reports to.
greatest report.created (the server-side ingestion time) seen for each
series, written on ingest in the same transaction as the metric inserts (so
it cannot drift) and backfilled from existing metrics. Reads are a single
index range scan over (organization_id, last_seen); the cascaded entity
foreign keys are indexed as well.
base fee plus per-series step-ups) backed by a new active_series Stripe meter
with last aggregation. After each report, the org's cumulative period-to-date
active-series count (all project visibilities) is posted to the meter; the
final post of the period is the period total, and a missed post self-heals on
the next report. The credit grants and the nightly sweep are removed.
base-fee waiver coupon. The trial is granted once per customer: any prior
subscription (any status, including canceled) disqualifies it, so
cancel-and-resubscribe cannot restart the trial.
(canceled, incomplete-expired, or gone in Stripe) so the organization can
subscribe again; live or recoverable (dunning) subscriptions still conflict.
metrics meter. The ingest upsert is plan-agnostic; the billing read decides
who is billed. Ships dark until the pro product's tiered price is configured.
Includes unit and property tests asserting the cache equals a from-scratch
distinct-series oracle, ingest atomicity, backfill correctness, and the
entity-delete cascade behavior, plus a live Stripe test covering the
once-per-customer trial.