FAILURE MAP
← Case archive

FA-59739 / Subscription proration billing / Member archive

Metered usage split at a mid-period price change: change day ownership · case 04

Usage recorded on the change day is billed at both prices.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Input {events: [[day, qty]], change day, old_unit, new_unit, agg sum|max|last}. Events are ordered by day (stable). Events before the change day are aggregated and priced at old_unit; events on or after it at new_unit. Empty segments aggregate to 0; last means the chronologically last quantity. Return [old_charge, new_charge].

Why this case matters

Metered usage must be attributed to the price in effect when it occurred, with the aggregation mode applied per segment.

One recorded failure

Sample boundary fixture

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

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