FA-66477 / Airline fare rule evaluation / Member archive
Downgrade fare difference reduces the amount collected · case 02
Downgrades report a collection below the fee, sometimes negative.
Case contract
Input {'paid','new_fare','fee','fee_pct','fee_rule' FLAT|HIGHER,'residual' CREDIT|FORFEIT,'waiver_h','hours_since_ticket'}. Fee waived when hours_since_ticket <= waiver_h; FLAT fee = fee; HIGHER = max(fee, fee_pct% of the original paid fare). Collect = max(0, new-paid) + fee; residual credit = max(0, paid-new) only when residual is CREDIT (the fee is never netted against credit). Return [collect, credit] rounded 2.
Why this case matters
Voluntary change pricing combines a fare difference, a penalty with a higher-of rule, a free-change window and residual value handling.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| downgrade with credit | [-75.0, 150.0] | [75.0, 150.0] | 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 ↗