FAILURE MAP
← Case archive

FA-94114 / Shift rostering labor rules / Member archive

Given-away shift kept on the requester after the swap · case 04

Swaps fail on overlap or hours cap caused by the shift being handed over.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: giver shift removed 1["rest", "a"]["overlap", "b"]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 ↗