FAILURE MAP
← Case archive

FA-59664 / Subscription proration billing / Member archive

Flat fee proration with metered usage: usage window end · case 04

Usage recorded on the cancellation day is billed after cancellation.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Input {flat, period_days, from, cancel|None, unit, events: [[day, qty]]}. Active window is [from, end) with end = min(cancel, period_days) or period_days. The flat fee is prorated by active days half-up; usage is not prorated: every event inside the window is billed qty*unit. Return [flat_charge, usage_charge].

Why this case matters

Only the recurring fee is prorated; metered usage is billed exactly for the active window.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression 0[0, 410][0, 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 ↗