FA-84974 / Fantasy sports scoring / Member archive
Swaps applied in arrival order instead of time order · case 04
A delayed earlier-timestamped swap overrides a later one.
Case contract
Apply lineup swaps [time, slot, incoming player] in time order (submission order on equal times). A swap is rejected if either the outgoing or incoming player's game has kicked off at or before the swap time, or if the incoming player already occupies another slot. Return the final lineup, the sorted indices of rejected swaps and the lineup's total points.
Why this case matters
Game-time lineup locks decide whether late swaps count; wrong lock semantics let users bench players after they score.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: same-time submission order | {"final": {"S1": "p0", "S2": "p3", "S3": "p2"}, "rejected": [0, 1, 3], "total": 28} | {"final": {"S1": "p3", "S2": "p1", "S3": "p2"}, "rejected": [0, 1, 2], "total": 46} | 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 ↗