FAILURE MAP
← Case archive

FA-64198 / Medication dosing calculations / Member archive

Patient-controlled analgesia lockout and hourly limit: bounce chain previous press update · case 03

A long chain of bounces produces a spurious lockout denial.

Member previewVariant 3 · 3 implementations · 7 checks per implementation

Case contract

Input {presses (ascending seconds), dose_mg, lockout_min, hour_limit_mg}. A press less than 2 s after the previous press (delivered or not) is a switch bounce and ignored entirely. Otherwise it is denied for lockout when less than lockout_min*60 s have passed since the last DELIVERED dose, denied for limit when (deliveries in the preceding 3600 s + 1)*dose exceeds hour_limit_mg, else delivered. Return {delivered, denied_lockout, denied_limit, total_mg}.

Why this case matters

PCA pumps enforce lockout and rolling-hour limits on a stream of button presses; reference points and window edges are distinct defects.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
switch bounce chain{"delivered": [0, 703], "denied_limit": 0, "denied_lockout": 2, "total_mg": 2.0}{"delivered": [0, 703], "denied_limit": 0, "denied_lockout": 0, "total_mg": 2.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 ↗