{"abstract":"Riders get refunds for routes only slightly longer than optimal.","category":"Ride-hailing fare and surge pricing","checks":7,"contract":"Refund for inefficient routes: only when actual distance is more than 20% longer than optimal (actual*5 > optimal*6). Refund the whole extra distance at per_km (half up); refunds under 200 cents are not issued; the refund never takes the charge below the minimum fare. Return refund cents.","contract_signature":"charged, actual_m, optimal_m, per_km, minimum","evaluation_group":"w2-ride-hailing-fare-surge-route-inefficiency-refund","failed_approach":"A strict comparison refunds routes exactly 20% longer.","family":"w2-ride-hailing-fare-surge-route-inefficiency-refund-inefficiency-threshold","id":"FA-85751","implementations":{"attempt":{"sha256":"fc238a59d15c173cc11bf0c73a6734f03a3a1ffaef405b579454cd970fd8af50","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(charged, actual_m, optimal_m, per_km, minimum):\n    if actual_m * 5 < optimal_m * 6:\n        return 0\n    refund = ((actual_m - optimal_m) * per_km * 2 + 1000) // 2000\n    if refund < 200:\n        return 0\n    return max(0, min(refund, charged - minimum))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: inefficiency threshold', [2500, 14401, 12001, 100, 700], 0),\n  ('partial repair probe: inefficiency threshold', [2500, 12000, 10000, 150, 700], 0),\n  ('second regression', [2500, 9600, 8000, 150, 700], 0),\n  ('normal control 1', [1200, 12001, 10000, 100, 700], 200),\n  ('normal control 2', [700, 6000, 5000, 150, 700], 0),\n  ('normal control 3', [1200, 7500, 5000, 100, 700], 250),\n  ('normal control 4', [2500, 7500, 5000, 100, 700], 250)],\n [('regression: inefficiency threshold', [4000, 14401, 12001, 100, 700], 0),\n  ('partial repair probe: inefficiency threshold', [4000, 12000, 10000, 100, 700], 0),\n  ('second regression', [4000, 9600, 8000, 150, 700], 0),\n  ('normal control 1', [1200, 18001, 12001, 150, 700], 500),\n  ('normal control 2', [1200, 5100, 5000, 150, 700], 0),\n  ('normal control 3', [2500, 8100, 8000, 100, 700], 0),\n  ('normal control 4', [2500, 8000, 8000, 100, 700], 0)],\n [('regression: inefficiency threshold', [4000, 9600, 8000, 150, 700], 0),\n  ('partial repair probe: inefficiency threshold', [2500, 12000, 10000, 100, 700], 0),\n  ('second regression', [2500, 14401, 12001, 150, 700], 0),\n  ('normal control 1', [700, 5000, 5000, 100, 700], 0),\n  ('normal control 2', [700, 10000, 10000, 150, 700], 0),\n  ('normal control 3', [1200, 6001, 5000, 150, 700], 0),\n  ('normal control 4', [700, 10000, 5000, 100, 700], 0)],\n [('regression: inefficiency threshold', [2500, 14401, 12001, 100, 700], 0),\n  ('partial repair probe: inefficiency threshold', [1200, 9600, 8000, 150, 700], 0),\n  ('second regression', [4000, 12000, 10000, 100, 700], 0),\n  ('normal control 1', [1200, 20000, 10000, 100, 700], 500),\n  ('normal control 2', [1200, 8100, 8000, 150, 700], 0),\n  ('normal control 3', [2500, 5100, 5000, 150, 700], 0),\n  ('normal control 4', [1200, 10000, 10000, 150, 700], 0)],\n [('regression: inefficiency threshold', [2500, 9600, 8000, 150, 700], 0),\n  ('partial repair probe: inefficiency threshold', [2500, 12000, 10000, 100, 700], 0),\n  ('second regression', [1200, 9600, 8000, 150, 700], 0),\n  ('normal control 1', [4000, 12001, 10000, 100, 700], 200),\n  ('normal control 2', [700, 9601, 8000, 150, 700], 0), ('normal control 3', [2500, 6000, 5000, 100, 700], 0),\n  ('normal control 4', [2500, 10000, 5000, 150, 700], 750)]]\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":"b0d14fc249cdc0ab3302807e2091dcf39322a1517dbfe7e62781c11e367074fb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(charged, actual_m, optimal_m, per_km, minimum):\n    if actual_m <= optimal_m:\n        return 0\n    refund = ((actual_m - optimal_m) * per_km * 2 + 1000) // 2000\n    if refund < 200:\n        return 0\n    return max(0, min(refund, charged - minimum))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: inefficiency threshold', [2500, 14401, 12001, 100, 700], 0),\n  ('partial repair probe: inefficiency threshold', [2500, 12000, 10000, 150, 700], 0),\n  ('second regression', [2500, 9600, 8000, 150, 700], 0),\n  ('normal control 1', [1200, 12001, 10000, 100, 700], 200),\n  ('normal control 2', [700, 6000, 5000, 150, 700], 0),\n  ('normal control 3', [1200, 7500, 5000, 100, 700], 250),\n  ('normal control 4', [2500, 7500, 5000, 100, 700], 250)],\n [('regression: inefficiency threshold', [4000, 14401, 12001, 100, 700], 0),\n  ('partial repair probe: inefficiency threshold', [4000, 12000, 10000, 100, 700], 0),\n  ('second regression', [4000, 9600, 8000, 150, 700], 0),\n  ('normal control 1', [1200, 18001, 12001, 150, 700], 500),\n  ('normal control 2', [1200, 5100, 5000, 150, 700], 0),\n  ('normal control 3', [2500, 8100, 8000, 100, 700], 0),\n  ('normal control 4', [2500, 8000, 8000, 100, 700], 0)],\n [('regression: inefficiency threshold', [4000, 9600, 8000, 150, 700], 0),\n  ('partial repair probe: inefficiency threshold', [2500, 12000, 10000, 100, 700], 0),\n  ('second regression', [2500, 14401, 12001, 150, 700], 0),\n  ('normal control 1', [700, 5000, 5000, 100, 700], 0),\n  ('normal control 2', [700, 10000, 10000, 150, 700], 0),\n  ('normal control 3', [1200, 6001, 5000, 150, 700], 0),\n  ('normal control 4', [700, 10000, 5000, 100, 700], 0)],\n [('regression: inefficiency threshold', [2500, 14401, 12001, 100, 700], 0),\n  ('partial repair probe: inefficiency threshold', [1200, 9600, 8000, 150, 700], 0),\n  ('second regression', [4000, 12000, 10000, 100, 700], 0),\n  ('normal control 1', [1200, 20000, 10000, 100, 700], 500),\n  ('normal control 2', [1200, 8100, 8000, 150, 700], 0),\n  ('normal control 3', [2500, 5100, 5000, 150, 700], 0),\n  ('normal control 4', [1200, 10000, 10000, 150, 700], 0)],\n [('regression: inefficiency threshold', [2500, 9600, 8000, 150, 700], 0),\n  ('partial repair probe: inefficiency threshold', [2500, 12000, 10000, 100, 700], 0),\n  ('second regression', [1200, 9600, 8000, 150, 700], 0),\n  ('normal control 1', [4000, 12001, 10000, 100, 700], 200),\n  ('normal control 2', [700, 9601, 8000, 150, 700], 0), ('normal control 3', [2500, 6000, 5000, 100, 700], 0),\n  ('normal control 4', [2500, 10000, 5000, 150, 700], 750)]]\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-route-inefficiency-refund-inefficiency-threshold","generated_at":"2026-09-29T14:50:43.214179+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.","root_cause":"The tolerance of 20% is missing from the eligibility check.","sha256":"ff858d64b00d710ee4fdf26abf63efcd1643f58ad4819b9faa39055720aa2b96","title":"Any detour triggers a refund · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":41.996,"exit_code":1,"observations":[{"actual":0,"check":"regression: inefficiency threshold","expected":0,"passed":true},{"actual":300,"check":"partial repair probe: inefficiency threshold","expected":0,"passed":false},{"actual":240,"check":"second regression","expected":0,"passed":false},{"actual":200,"check":"normal control 1","expected":200,"passed":true},{"actual":0,"check":"normal control 2","expected":0,"passed":true},{"actual":250,"check":"normal control 3","expected":250,"passed":true},{"actual":250,"check":"normal control 4","expected":250,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: inefficiency threshold\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"partial repair probe: inefficiency threshold\", \"actual\": 300, \"expected\": 0, \"passed\": false}, {\"check\": \"second regression\", \"actual\": 240, \"expected\": 0, \"passed\": false}, {\"check\": \"normal control 1\", \"actual\": 200, \"expected\": 200, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": 250, \"expected\": 250, \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": 250, \"expected\": 250, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.481,"exit_code":1,"observations":[{"actual":240,"check":"regression: inefficiency threshold","expected":0,"passed":false},{"actual":300,"check":"partial repair probe: inefficiency threshold","expected":0,"passed":false},{"actual":240,"check":"second regression","expected":0,"passed":false},{"actual":200,"check":"normal control 1","expected":200,"passed":true},{"actual":0,"check":"normal control 2","expected":0,"passed":true},{"actual":250,"check":"normal control 3","expected":250,"passed":true},{"actual":250,"check":"normal control 4","expected":250,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: inefficiency threshold\", \"actual\": 240, \"expected\": 0, \"passed\": false}, {\"check\": \"partial repair probe: inefficiency threshold\", \"actual\": 300, \"expected\": 0, \"passed\": false}, {\"check\": \"second regression\", \"actual\": 240, \"expected\": 0, \"passed\": false}, {\"check\": \"normal control 1\", \"actual\": 200, \"expected\": 200, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": 250, \"expected\": 250, \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": 250, \"expected\": 250, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}