{"abstract":"Repeated tips on one trip exceed the cap.","category":"Ride-hailing fare and surge pricing","checks":7,"contract":"Tips can be added from trip end through 72 hours later inclusive (259200 s). Total tips per trip are capped at the larger of twice the fare or 50.00; a new tip is truncated to the remaining room, and rejected with \"cap\" when no room is left. Return [accepted cents, reason].","evaluation_group":"w2-ride-hailing-fare-surge-post-trip-tips","failed_approach":"Accepting the full amount once any room exists still overshoots the cap.","family":"w2-ride-hailing-fare-surge-post-trip-tips-prior-tips-room","id":"FA-85836","implementations":{"attempt":{"sha256":"5caed3b8d4e58bbeddcfec891d73645b9394f39c397d1950112c8033372e0a78","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(trip_end, tip_t, amount, fare, prior_tips):\n    elapsed = tip_t - trip_end\n    if elapsed < 0 or elapsed > 259200:\n        return [0, 'window']\n    cap = max(fare * 2, 5000)\n    room = cap - prior_tips\n    if room <= 0:\n        return [0, 'cap']\n    return [amount, 'ok']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: prior tips room', [0, 259199, 500, 2400, 4800], [200, 'ok']),\n  ('partial repair probe: prior tips room', [0, 259199, 6000, 1200, 1000], [4000, 'ok']),\n  ('second regression', [0, 0, 6000, 2400, 1000], [4000, 'ok']),\n  ('normal control 1', [0, 0, 500, 1200, 1000], [500, 'ok']),\n  ('normal control 2', [0, -1, 6000, 1200, 1000], [0, 'window']),\n  ('normal control 3', [0, 259199, 2000, 4000, 4800], [2000, 'ok']),\n  ('normal control 4', [0, -1, 6000, 2400, 4800], [0, 'window'])],\n [('regression: prior tips room', [0, 259199, 6000, 4000, 4800], [3200, 'ok']),\n  ('partial repair probe: prior tips room', [0, 259200, 6000, 2400, 0], [5000, 'ok']),\n  ('second regression', [0, 3600, 6000, 1200, 0], [5000, 'ok']),\n  ('normal control 1', [0, 3600, 2000, 4000, 1000], [2000, 'ok']),\n  ('normal control 2', [0, 259201, 500, 4000, 0], [0, 'window']),\n  ('normal control 3', [0, -1, 6000, 4000, 1000], [0, 'window']),\n  ('normal control 4', [0, 0, 500, 2400, 0], [500, 'ok'])],\n [('regression: prior tips room', [0, 259200, 6000, 2400, 8000], [0, 'cap']),\n  ('partial repair probe: prior tips room', [0, 0, 6000, 2400, 0], [5000, 'ok']),\n  ('second regression', [0, 0, 2000, 2400, 4800], [200, 'ok']),\n  ('normal control 1', [0, 0, 2000, 1200, 0], [2000, 'ok']),\n  ('normal control 2', [0, 3600, 6000, 4000, 1000], [6000, 'ok']),\n  ('normal control 3', [0, -1, 500, 2400, 0], [0, 'window']),\n  ('normal control 4', [0, -1, 500, 2400, 8000], [0, 'window'])],\n [('regression: prior tips room', [0, 259200, 2000, 1200, 4800], [200, 'ok']),\n  ('partial repair probe: prior tips room', [0, 259200, 500, 1200, 4800], [200, 'ok']),\n  ('second regression', [0, 3600, 6000, 2400, 0], [5000, 'ok']),\n  ('normal control 1', [0, 0, 6000, 4000, 1000], [6000, 'ok']),\n  ('normal control 2', [0, 3600, 6000, 4000, 0], [6000, 'ok']),\n  ('normal control 3', [0, 259201, 6000, 1200, 0], [0, 'window']),\n  ('normal control 4', [0, 259199, 2000, 1200, 1000], [2000, 'ok'])],\n [('regression: prior tips room', [0, 259200, 500, 4000, 8000], [0, 'cap']),\n  ('partial repair probe: prior tips room', [0, 259199, 6000, 1200, 0], [5000, 'ok']),\n  ('second regression', [0, 0, 2000, 1200, 8000], [0, 'cap']),\n  ('normal control 1', [0, 0, 6000, 4000, 0], [6000, 'ok']),\n  ('normal control 2', [0, -1, 500, 1200, 0], [0, 'window']),\n  ('normal control 3', [0, 0, 500, 2400, 1000], [500, 'ok']),\n  ('normal control 4', [0, 259199, 6000, 4000, 1000], [6000, 'ok'])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"d7c8e6487b90c0084cbdb353a70a4278c3937fda43938c1b181e32a2b94c2b98","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(trip_end, tip_t, amount, fare, prior_tips):\n    elapsed = tip_t - trip_end\n    if elapsed < 0 or elapsed > 259200:\n        return [0, 'window']\n    cap = max(fare * 2, 5000)\n    room = cap\n    if room <= 0:\n        return [0, 'cap']\n    return [min(amount, room), 'ok']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: prior tips room', [0, 259199, 500, 2400, 4800], [200, 'ok']),\n  ('partial repair probe: prior tips room', [0, 259199, 6000, 1200, 1000], [4000, 'ok']),\n  ('second regression', [0, 0, 6000, 2400, 1000], [4000, 'ok']),\n  ('normal control 1', [0, 0, 500, 1200, 1000], [500, 'ok']),\n  ('normal control 2', [0, -1, 6000, 1200, 1000], [0, 'window']),\n  ('normal control 3', [0, 259199, 2000, 4000, 4800], [2000, 'ok']),\n  ('normal control 4', [0, -1, 6000, 2400, 4800], [0, 'window'])],\n [('regression: prior tips room', [0, 259199, 6000, 4000, 4800], [3200, 'ok']),\n  ('partial repair probe: prior tips room', [0, 259200, 6000, 2400, 0], [5000, 'ok']),\n  ('second regression', [0, 3600, 6000, 1200, 0], [5000, 'ok']),\n  ('normal control 1', [0, 3600, 2000, 4000, 1000], [2000, 'ok']),\n  ('normal control 2', [0, 259201, 500, 4000, 0], [0, 'window']),\n  ('normal control 3', [0, -1, 6000, 4000, 1000], [0, 'window']),\n  ('normal control 4', [0, 0, 500, 2400, 0], [500, 'ok'])],\n [('regression: prior tips room', [0, 259200, 6000, 2400, 8000], [0, 'cap']),\n  ('partial repair probe: prior tips room', [0, 0, 6000, 2400, 0], [5000, 'ok']),\n  ('second regression', [0, 0, 2000, 2400, 4800], [200, 'ok']),\n  ('normal control 1', [0, 0, 2000, 1200, 0], [2000, 'ok']),\n  ('normal control 2', [0, 3600, 6000, 4000, 1000], [6000, 'ok']),\n  ('normal control 3', [0, -1, 500, 2400, 0], [0, 'window']),\n  ('normal control 4', [0, -1, 500, 2400, 8000], [0, 'window'])],\n [('regression: prior tips room', [0, 259200, 2000, 1200, 4800], [200, 'ok']),\n  ('partial repair probe: prior tips room', [0, 259200, 500, 1200, 4800], [200, 'ok']),\n  ('second regression', [0, 3600, 6000, 2400, 0], [5000, 'ok']),\n  ('normal control 1', [0, 0, 6000, 4000, 1000], [6000, 'ok']),\n  ('normal control 2', [0, 3600, 6000, 4000, 0], [6000, 'ok']),\n  ('normal control 3', [0, 259201, 6000, 1200, 0], [0, 'window']),\n  ('normal control 4', [0, 259199, 2000, 1200, 1000], [2000, 'ok'])],\n [('regression: prior tips room', [0, 259200, 500, 4000, 8000], [0, 'cap']),\n  ('partial repair probe: prior tips room', [0, 259199, 6000, 1200, 0], [5000, 'ok']),\n  ('second regression', [0, 0, 2000, 1200, 8000], [0, 'cap']),\n  ('normal control 1', [0, 0, 6000, 4000, 0], [6000, 'ok']),\n  ('normal control 2', [0, -1, 500, 1200, 0], [0, 'window']),\n  ('normal control 3', [0, 0, 500, 2400, 1000], [500, 'ok']),\n  ('normal control 4', [0, 259199, 6000, 4000, 1000], [6000, 'ok'])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"82b1f0b24f880ed9c1b939fdc9aa253a7f70829e0efd8a102edd4bc201efc748","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(trip_end, tip_t, amount, fare, prior_tips):\n    elapsed = tip_t - trip_end\n    if elapsed < 0 or elapsed > 259200:\n        return [0, 'window']\n    cap = max(fare * 2, 5000)\n    room = cap - prior_tips\n    if room <= 0:\n        return [0, 'cap']\n    return [min(amount, room), 'ok']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: prior tips room', [0, 259199, 500, 2400, 4800], [200, 'ok']),\n  ('partial repair probe: prior tips room', [0, 259199, 6000, 1200, 1000], [4000, 'ok']),\n  ('second regression', [0, 0, 6000, 2400, 1000], [4000, 'ok']),\n  ('normal control 1', [0, 0, 500, 1200, 1000], [500, 'ok']),\n  ('normal control 2', [0, -1, 6000, 1200, 1000], [0, 'window']),\n  ('normal control 3', [0, 259199, 2000, 4000, 4800], [2000, 'ok']),\n  ('normal control 4', [0, -1, 6000, 2400, 4800], [0, 'window'])],\n [('regression: prior tips room', [0, 259199, 6000, 4000, 4800], [3200, 'ok']),\n  ('partial repair probe: prior tips room', [0, 259200, 6000, 2400, 0], [5000, 'ok']),\n  ('second regression', [0, 3600, 6000, 1200, 0], [5000, 'ok']),\n  ('normal control 1', [0, 3600, 2000, 4000, 1000], [2000, 'ok']),\n  ('normal control 2', [0, 259201, 500, 4000, 0], [0, 'window']),\n  ('normal control 3', [0, -1, 6000, 4000, 1000], [0, 'window']),\n  ('normal control 4', [0, 0, 500, 2400, 0], [500, 'ok'])],\n [('regression: prior tips room', [0, 259200, 6000, 2400, 8000], [0, 'cap']),\n  ('partial repair probe: prior tips room', [0, 0, 6000, 2400, 0], [5000, 'ok']),\n  ('second regression', [0, 0, 2000, 2400, 4800], [200, 'ok']),\n  ('normal control 1', [0, 0, 2000, 1200, 0], [2000, 'ok']),\n  ('normal control 2', [0, 3600, 6000, 4000, 1000], [6000, 'ok']),\n  ('normal control 3', [0, -1, 500, 2400, 0], [0, 'window']),\n  ('normal control 4', [0, -1, 500, 2400, 8000], [0, 'window'])],\n [('regression: prior tips room', [0, 259200, 2000, 1200, 4800], [200, 'ok']),\n  ('partial repair probe: prior tips room', [0, 259200, 500, 1200, 4800], [200, 'ok']),\n  ('second regression', [0, 3600, 6000, 2400, 0], [5000, 'ok']),\n  ('normal control 1', [0, 0, 6000, 4000, 1000], [6000, 'ok']),\n  ('normal control 2', [0, 3600, 6000, 4000, 0], [6000, 'ok']),\n  ('normal control 3', [0, 259201, 6000, 1200, 0], [0, 'window']),\n  ('normal control 4', [0, 259199, 2000, 1200, 1000], [2000, 'ok'])],\n [('regression: prior tips room', [0, 259200, 500, 4000, 8000], [0, 'cap']),\n  ('partial repair probe: prior tips room', [0, 259199, 6000, 1200, 0], [5000, 'ok']),\n  ('second regression', [0, 0, 2000, 1200, 8000], [0, 'cap']),\n  ('normal control 1', [0, 0, 6000, 4000, 0], [6000, 'ok']),\n  ('normal control 2', [0, -1, 500, 1200, 0], [0, 'window']),\n  ('normal control 3', [0, 0, 500, 2400, 1000], [500, 'ok']),\n  ('normal control 4', [0, 259199, 6000, 4000, 1000], [6000, 'ok'])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic toy pricing contract stipulated for this example; it does not reproduce the pricing of any real ride-hailing operator or regulator. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-ride-hailing-fare-surge-post-trip-tips-prior-tips-room","generated_at":"2026-09-29T14:50:44.133781+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Ride-hailing prices are computed per trip at scale; ordering, unit and boundary slips become systematic over- or under-charging.","repair":"Subtract prior tips from the cap and truncate the new tip to the room.","root_cause":"Remaining room ignores tips already given.","sha256":"d1e3a71369ed698082ac6ddab863b134b779165da5c36ec200efd2295cf36b37","title":"Earlier tips not counted toward the cap · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.69,"exit_code":1,"observations":[{"actual":[500,"ok"],"check":"regression: prior tips room","expected":[200,"ok"],"passed":false},{"actual":[6000,"ok"],"check":"partial repair probe: prior tips room","expected":[4000,"ok"],"passed":false},{"actual":[6000,"ok"],"check":"second regression","expected":[4000,"ok"],"passed":false},{"actual":[500,"ok"],"check":"normal control 1","expected":[500,"ok"],"passed":true},{"actual":[0,"window"],"check":"normal control 2","expected":[0,"window"],"passed":true},{"actual":[2000,"ok"],"check":"normal control 3","expected":[2000,"ok"],"passed":true},{"actual":[0,"window"],"check":"normal control 4","expected":[0,"window"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: prior tips room\", \"actual\": [500, \"ok\"], \"expected\": [200, \"ok\"], \"passed\": false}, {\"check\": \"partial repair probe: prior tips room\", \"actual\": [6000, \"ok\"], \"expected\": [4000, \"ok\"], \"passed\": false}, {\"check\": \"second regression\", \"actual\": [6000, \"ok\"], \"expected\": [4000, \"ok\"], \"passed\": false}, {\"check\": \"normal control 1\", \"actual\": [500, \"ok\"], \"expected\": [500, \"ok\"], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [0, \"window\"], \"expected\": [0, \"window\"], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [2000, \"ok\"], \"expected\": [2000, \"ok\"], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [0, \"window\"], \"expected\": [0, \"window\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.337,"exit_code":1,"observations":[{"actual":[500,"ok"],"check":"regression: prior tips room","expected":[200,"ok"],"passed":false},{"actual":[5000,"ok"],"check":"partial repair probe: prior tips room","expected":[4000,"ok"],"passed":false},{"actual":[5000,"ok"],"check":"second regression","expected":[4000,"ok"],"passed":false},{"actual":[500,"ok"],"check":"normal control 1","expected":[500,"ok"],"passed":true},{"actual":[0,"window"],"check":"normal control 2","expected":[0,"window"],"passed":true},{"actual":[2000,"ok"],"check":"normal control 3","expected":[2000,"ok"],"passed":true},{"actual":[0,"window"],"check":"normal control 4","expected":[0,"window"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: prior tips room\", \"actual\": [500, \"ok\"], \"expected\": [200, \"ok\"], \"passed\": false}, {\"check\": \"partial repair probe: prior tips room\", \"actual\": [5000, \"ok\"], \"expected\": [4000, \"ok\"], \"passed\": false}, {\"check\": \"second regression\", \"actual\": [5000, \"ok\"], \"expected\": [4000, \"ok\"], \"passed\": false}, {\"check\": \"normal control 1\", \"actual\": [500, \"ok\"], \"expected\": [500, \"ok\"], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [0, \"window\"], \"expected\": [0, \"window\"], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [2000, \"ok\"], \"expected\": [2000, \"ok\"], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [0, \"window\"], \"expected\": [0, \"window\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.62,"exit_code":0,"observations":[{"actual":[200,"ok"],"check":"regression: prior tips room","expected":[200,"ok"],"passed":true},{"actual":[4000,"ok"],"check":"partial repair probe: prior tips room","expected":[4000,"ok"],"passed":true},{"actual":[4000,"ok"],"check":"second regression","expected":[4000,"ok"],"passed":true},{"actual":[500,"ok"],"check":"normal control 1","expected":[500,"ok"],"passed":true},{"actual":[0,"window"],"check":"normal control 2","expected":[0,"window"],"passed":true},{"actual":[2000,"ok"],"check":"normal control 3","expected":[2000,"ok"],"passed":true},{"actual":[0,"window"],"check":"normal control 4","expected":[0,"window"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: prior tips room\", \"actual\": [200, \"ok\"], \"expected\": [200, \"ok\"], \"passed\": true}, {\"check\": \"partial repair probe: prior tips room\", \"actual\": [4000, \"ok\"], \"expected\": [4000, \"ok\"], \"passed\": true}, {\"check\": \"second regression\", \"actual\": [4000, \"ok\"], \"expected\": [4000, \"ok\"], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [500, \"ok\"], \"expected\": [500, \"ok\"], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [0, \"window\"], \"expected\": [0, \"window\"], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [2000, \"ok\"], \"expected\": [2000, \"ok\"], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [0, \"window\"], \"expected\": [0, \"window\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}