FAILURE MAP
← Case archive

FA-59423 / Subscription proration billing / Member archive

Trial conversion stub period: stub cycle length · case 03

Stub invoices after a trial exceed the monthly price when the stub spans a 31-day cycle.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Input {trial_end date, anchor_day 1..28, price}. If trial_end.day equals anchor_day, charge the full price and the next anchor is one month later. Otherwise charge price*days/cycle half-up, where days runs from trial_end to the next anchor date strictly after it and cycle is the length of the anchor-to-anchor month containing trial_end. Return [amount, next anchor ISO].

Why this case matters

Converting a trial onto a fixed billing anchor produces a stub invoice whose length depends on real month boundaries.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression 0[870, "2025-02-15"][842, "2025-02-15"]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 ↗