FA-59674 / Subscription proration billing / Member archive
Immediate upgrades and scheduled downgrades: upgrade clears schedule · case 04
Customers who upgrade are later silently downgraded by an old scheduled change.
Case contract
Input {cur, new, left, period, pending scheduled price|None}. Upgrade (new > cur): charge (new-cur)*left/period half-up now, switch immediately and clear any scheduled change. Downgrade: no charge, keep cur, schedule new (replacing any pending). Same price: no charge and clear the schedule. Return [charge, active_price, scheduled].
Why this case matters
Asymmetric upgrade/downgrade policies must not let a stale scheduled downgrade override an upgrade.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [2065, 5000, 2000] | [2065, 5000, null] | 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 ↗