FAILURE MAP
← Case archive

FA-59427 / Subscription proration billing / Member archive

Trial conversion stub period: previous anchor date · case 02

Stub invoices for trials ending early in the month use a 30-day cycle regardless of the real anchor cycle.

Member previewVariant 2 · 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[71002, "2024-04-28"][68712, "2024-04-28"]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 ↗