FAILURE MAP
← Case archive

FA-59713 / Subscription proration billing / Member archive

Subscription schedule phases within a period: phase ordering · case 03

Schedules entered out of order produce wrong phase boundaries.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Input {ps, pe (exclusive), phases: [[start_day, price per full period]]}. Phases are ordered by start; each lasts until the next phase starts (the last until pe). The period charge is sum(price * overlap days with [ps, pe)) / (pe - ps), rounded half-up once. Return cents.

Why this case matters

Phase transitions inside a billing period must be charged exactly for their overlapping days.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression 012671000Failed

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 ↗