FA-94112 / Shift rostering labor rules / Member archive
Given-away shift kept on the requester after the swap · case 02
Swaps fail on overlap or hours cap caused by the shift being handed over.
Case contract
roster maps worker to shifts [id, start, end, skill]; req = [a, b, a_gives, b_gives or None]. After the swap a holds its shifts minus a_gives plus b's shift, b holds its shifts minus b_gives plus a's shift. Checks in order: receiver qualified for each received shift (a then b), then for a then b sorted by start: overlap, then rest below the minimum, then total minutes above cap. Return the first failure [reason, worker] or ["ok", None].
Why this case matters
Self-service shift swaps must be revalidated against labor rules for both parties after the exchange.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: giver shift removed 1 | ["cap", "a"] | ["ok", 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 ↗