FAILURE MAP
← Case archive

FA-59502 / Subscription proration billing / Member archive

Usage tiers after a prorated included allowance: covered usage short-circuit · case 02

Customers whose usage is fully covered by the allowance are billed a tier flat fee.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Input {usage, tiers: [[up_to|None, unit_price, flat_fee]], mode volume|graduated, included, active_days, period_days}. Allowance = included*active_days//period_days. Billable = max(0, usage - allowance); zero billable costs 0. Volume: all billable units at the first tier with billable <= up_to, plus that tier's flat fee. Graduated: each tier bills the units falling in its range plus its flat fee if any unit falls in it. Return [allowance, cost].

Why this case matters

A partial first period shrinks the included allowance, and volume versus graduated tiers price the remainder differently.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression 0[225, 500][225, 0]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗