{"abstract":"A 1.9 ratio is treated as 1.0 and no surge is published.","category":"Ride-hailing fare and surge pricing","checks":7,"contract":"Each interval gives [open requests, idle drivers]. The raw multiplier (tenths) is 30 when the exact ratio requests/drivers >= 3, 20 when >= 2, 15 when >= 1.5, 12 when >= 1.2, else 10; with zero drivers it is 30 if any request is open, else 10. The published multiplier rises immediately to the raw value but falls by at most 2 tenths per interval, starting from prev. Return the published multiplier per interval.","contract_signature":"obs, prev","evaluation_group":"w2-ride-hailing-fare-surge-surge-hysteresis","failed_approach":"Rounding the ratio to one decimal promotes ratios just below a threshold.","family":"w2-ride-hailing-fare-surge-surge-hysteresis-integer-ratio","id":"FA-85376","implementations":{"attempt":{"sha256":"b68de87d0ecb064814021a13ccb78863d5bfa30e48ca102ee2fcc502e69a3fbc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(obs, prev):\n    tiers = [(30, 30), (20, 20), (15, 15), (12, 12)]\n    cur = prev\n    out = []\n    for req, drv in obs:\n        raw = 10\n        if drv == 0:\n            raw = 30 if req > 0 else 10\n        else:\n            for th, mult in tiers:\n                if round(req / drv, 1) * 10 >= th:\n                    raw = mult\n                    break\n        cur = raw if raw >= cur else max(raw, cur - 2)\n        out.append(cur)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: integer ratio', [[[12, 20], [18, 10], [24, 20], [5, 5], [24, 20]], 12], [10, 15, 13, 11, 12]),\n  ('partial repair probe: integer ratio', [[[59, 20], [0, 0], [33, 0], [3, 7], [25, 10], [38, 20]], 12],\n   [20, 18, 30, 28, 26, 24]),\n  ('second regression', [[[17, 10], [38, 20], [8, 0], [34, 20], [34, 20]], 12], [15, 15, 30, 28, 26]),\n  ('normal control 1', [[[0, 0], [2, 10], [1, 7], [26, 5], [30, 20]], 15], [13, 11, 10, 30, 28]),\n  ('normal control 2', [[[39, 10], [0, 0], [5, 5]], 12], [30, 28, 26]),\n  ('normal control 3', [[[22, 20], [7, 7], [7, 7], [-1, 0], [37, 10], [23, 10]], 20],\n   [18, 16, 14, 12, 30, 28]),\n  ('normal control 4', [[[26, 10], [7, 10]], 12], [20, 18])],\n [('regression: integer ratio', [[[0, 10], [19, 10], [34, 0], [10, 7], [19, 10]], 15], [13, 15, 30, 28, 26]),\n  ('partial repair probe: integer ratio', [[[0, 0], [0, 0], [10, 20], [59, 20], [23, 20], [1, 7]], 12],\n   [10, 10, 10, 20, 18, 16]),\n  ('second regression', [[[38, 20], [5, 10], [0, 0], [37, 7], [28, 10]], 10], [15, 13, 11, 30, 28]),\n  ('normal control 1', [[[5, 5], [28, 20]], 20], [18, 16]),\n  ('normal control 2', [[[0, 0], [19, 10], [10, 10]], 20], [18, 16, 14]),\n  ('normal control 3', [[[23, 20], [7, 7], [19, 5]], 10], [10, 10, 30]),\n  ('normal control 4', [[[0, 0], [32, 10], [19, 10], [23, 10], [0, 0]], 20], [18, 30, 28, 26, 24])],\n [('regression: integer ratio', [[[10, 20], [-1, 0], [29, 20]], 10], [10, 10, 12]),\n  ('partial repair probe: integer ratio', [[[32, 10], [24, 10], [19, 10], [14, 10], [9, 5], [59, 20]], 10],\n   [30, 28, 26, 24, 22, 20]),\n  ('second regression', [[[20, 7], [24, 20], [6, 7], [12, 10], [7, 7], [7, 5]], 12],\n   [20, 18, 16, 14, 12, 12]),\n  ('normal control 1', [[[22, 10], [1, 5], [27, 5], [0, 0]], 15], [20, 18, 30, 28]),\n  ('normal control 2', [[[1, 7], [35, 10], [25, 5]], 15], [13, 30, 30]),\n  ('normal control 3', [[[4, 10], [38, 0]], 15], [13, 30]),\n  ('normal control 4', [[[22, 20], [39, 10]], 20], [18, 30])],\n [('regression: integer ratio', [[[9, 7], [32, 20], [0, 7], [23, 20], [38, 20]], 12], [12, 15, 13, 11, 15]),\n  ('partial repair probe: integer ratio', [[[59, 20], [5, 10]], 10], [20, 18]),\n  ('second regression', [[[-1, 0], [38, 20], [7, 5], [60, 20]], 10], [10, 15, 13, 30]),\n  ('normal control 1', [[[14, 0], [10, 10], [1, 5], [-1, 0], [15, 10], [0, 0]], 30],\n   [30, 28, 26, 24, 22, 20]),\n  ('normal control 2', [[[10, 10], [8, 7], [10, 0], [20, 7]], 30], [28, 26, 30, 28]),\n  ('normal control 3', [[[17, 7], [5, 10]], 30], [28, 26]),\n  ('normal control 4', [[[7, 7], [10, 10]], 30], [28, 26])],\n [('regression: integer ratio', [[[40, 20], [5, 5], [4, 7], [30, 20], [10, 20], [9, 10]], 15],\n   [20, 18, 16, 15, 13, 11]),\n  ('partial repair probe: integer ratio', [[[22, 5], [25, 5], [8, 10], [59, 20]], 15], [30, 30, 28, 26]),\n  ('second regression', [[[5, 5], [6, 5]], 12], [10, 12]),\n  ('normal control 1', [[[18, 5], [9, 10], [33, 10], [4, 10]], 30], [30, 28, 30, 28]),\n  ('normal control 2', [[[7, 7], [34, 10], [0, 0]], 12], [10, 30, 28]),\n  ('normal control 3', [[[-1, 0], [12, 7], [5, 20]], 30], [28, 26, 24]),\n  ('normal control 4', [[[10, 0], [-1, 0], [0, 0], [24, 10], [7, 7]], 20], [30, 28, 26, 24, 22])]]\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":"d4629aa73f2d584924135c5a9b4adb3eb08eb77fc8b623b9fbec3b7dd9e2d2bd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(obs, prev):\n    tiers = [(30, 30), (20, 20), (15, 15), (12, 12)]\n    cur = prev\n    out = []\n    for req, drv in obs:\n        raw = 10\n        if drv == 0:\n            raw = 30 if req > 0 else 10\n        else:\n            for th, mult in tiers:\n                if req // drv * 10 >= th:\n                    raw = mult\n                    break\n        cur = raw if raw >= cur else max(raw, cur - 2)\n        out.append(cur)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: integer ratio', [[[12, 20], [18, 10], [24, 20], [5, 5], [24, 20]], 12], [10, 15, 13, 11, 12]),\n  ('partial repair probe: integer ratio', [[[59, 20], [0, 0], [33, 0], [3, 7], [25, 10], [38, 20]], 12],\n   [20, 18, 30, 28, 26, 24]),\n  ('second regression', [[[17, 10], [38, 20], [8, 0], [34, 20], [34, 20]], 12], [15, 15, 30, 28, 26]),\n  ('normal control 1', [[[0, 0], [2, 10], [1, 7], [26, 5], [30, 20]], 15], [13, 11, 10, 30, 28]),\n  ('normal control 2', [[[39, 10], [0, 0], [5, 5]], 12], [30, 28, 26]),\n  ('normal control 3', [[[22, 20], [7, 7], [7, 7], [-1, 0], [37, 10], [23, 10]], 20],\n   [18, 16, 14, 12, 30, 28]),\n  ('normal control 4', [[[26, 10], [7, 10]], 12], [20, 18])],\n [('regression: integer ratio', [[[0, 10], [19, 10], [34, 0], [10, 7], [19, 10]], 15], [13, 15, 30, 28, 26]),\n  ('partial repair probe: integer ratio', [[[0, 0], [0, 0], [10, 20], [59, 20], [23, 20], [1, 7]], 12],\n   [10, 10, 10, 20, 18, 16]),\n  ('second regression', [[[38, 20], [5, 10], [0, 0], [37, 7], [28, 10]], 10], [15, 13, 11, 30, 28]),\n  ('normal control 1', [[[5, 5], [28, 20]], 20], [18, 16]),\n  ('normal control 2', [[[0, 0], [19, 10], [10, 10]], 20], [18, 16, 14]),\n  ('normal control 3', [[[23, 20], [7, 7], [19, 5]], 10], [10, 10, 30]),\n  ('normal control 4', [[[0, 0], [32, 10], [19, 10], [23, 10], [0, 0]], 20], [18, 30, 28, 26, 24])],\n [('regression: integer ratio', [[[10, 20], [-1, 0], [29, 20]], 10], [10, 10, 12]),\n  ('partial repair probe: integer ratio', [[[32, 10], [24, 10], [19, 10], [14, 10], [9, 5], [59, 20]], 10],\n   [30, 28, 26, 24, 22, 20]),\n  ('second regression', [[[20, 7], [24, 20], [6, 7], [12, 10], [7, 7], [7, 5]], 12],\n   [20, 18, 16, 14, 12, 12]),\n  ('normal control 1', [[[22, 10], [1, 5], [27, 5], [0, 0]], 15], [20, 18, 30, 28]),\n  ('normal control 2', [[[1, 7], [35, 10], [25, 5]], 15], [13, 30, 30]),\n  ('normal control 3', [[[4, 10], [38, 0]], 15], [13, 30]),\n  ('normal control 4', [[[22, 20], [39, 10]], 20], [18, 30])],\n [('regression: integer ratio', [[[9, 7], [32, 20], [0, 7], [23, 20], [38, 20]], 12], [12, 15, 13, 11, 15]),\n  ('partial repair probe: integer ratio', [[[59, 20], [5, 10]], 10], [20, 18]),\n  ('second regression', [[[-1, 0], [38, 20], [7, 5], [60, 20]], 10], [10, 15, 13, 30]),\n  ('normal control 1', [[[14, 0], [10, 10], [1, 5], [-1, 0], [15, 10], [0, 0]], 30],\n   [30, 28, 26, 24, 22, 20]),\n  ('normal control 2', [[[10, 10], [8, 7], [10, 0], [20, 7]], 30], [28, 26, 30, 28]),\n  ('normal control 3', [[[17, 7], [5, 10]], 30], [28, 26]),\n  ('normal control 4', [[[7, 7], [10, 10]], 30], [28, 26])],\n [('regression: integer ratio', [[[40, 20], [5, 5], [4, 7], [30, 20], [10, 20], [9, 10]], 15],\n   [20, 18, 16, 15, 13, 11]),\n  ('partial repair probe: integer ratio', [[[22, 5], [25, 5], [8, 10], [59, 20]], 15], [30, 30, 28, 26]),\n  ('second regression', [[[5, 5], [6, 5]], 12], [10, 12]),\n  ('normal control 1', [[[18, 5], [9, 10], [33, 10], [4, 10]], 30], [30, 28, 30, 28]),\n  ('normal control 2', [[[7, 7], [34, 10], [0, 0]], 12], [10, 30, 28]),\n  ('normal control 3', [[[-1, 0], [12, 7], [5, 20]], 30], [28, 26, 24]),\n  ('normal control 4', [[[10, 0], [-1, 0], [0, 0], [24, 10], [7, 7]], 20], [30, 28, 26, 24, 22])]]\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-surge-hysteresis-integer-ratio","generated_at":"2026-09-29T14:50:39.846313+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 ratio uses integer division before comparison.","sha256":"fc681148cdcb8bd2e8acef3445fbc04cbe277a48dc6ab65be07809db6c724e4f","title":"Demand ratio truncated to a whole number · 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":42.092,"exit_code":1,"observations":[{"actual":[10,15,13,11,12],"check":"regression: integer ratio","expected":[10,15,13,11,12],"passed":true},{"actual":[30,28,30,28,26,24],"check":"partial repair probe: integer ratio","expected":[20,18,30,28,26,24],"passed":false},{"actual":[15,15,30,28,26],"check":"second regression","expected":[15,15,30,28,26],"passed":true},{"actual":[13,11,10,30,28],"check":"normal control 1","expected":[13,11,10,30,28],"passed":true},{"actual":[30,28,26],"check":"normal control 2","expected":[30,28,26],"passed":true},{"actual":[18,16,14,12,30,28],"check":"normal control 3","expected":[18,16,14,12,30,28],"passed":true},{"actual":[20,18],"check":"normal control 4","expected":[20,18],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: integer ratio\", \"actual\": [10, 15, 13, 11, 12], \"expected\": [10, 15, 13, 11, 12], \"passed\": true}, {\"check\": \"partial repair probe: integer ratio\", \"actual\": [30, 28, 30, 28, 26, 24], \"expected\": [20, 18, 30, 28, 26, 24], \"passed\": false}, {\"check\": \"second regression\", \"actual\": [15, 15, 30, 28, 26], \"expected\": [15, 15, 30, 28, 26], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [13, 11, 10, 30, 28], \"expected\": [13, 11, 10, 30, 28], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [30, 28, 26], \"expected\": [30, 28, 26], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [18, 16, 14, 12, 30, 28], \"expected\": [18, 16, 14, 12, 30, 28], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [20, 18], \"expected\": [20, 18], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.71,"exit_code":1,"observations":[{"actual":[10,10,10,10,10],"check":"regression: integer ratio","expected":[10,15,13,11,12],"passed":false},{"actual":[20,18,30,28,26,24],"check":"partial repair probe: integer ratio","expected":[20,18,30,28,26,24],"passed":true},{"actual":[10,10,30,28,26],"check":"second regression","expected":[15,15,30,28,26],"passed":false},{"actual":[13,11,10,30,28],"check":"normal control 1","expected":[13,11,10,30,28],"passed":true},{"actual":[30,28,26],"check":"normal control 2","expected":[30,28,26],"passed":true},{"actual":[18,16,14,12,30,28],"check":"normal control 3","expected":[18,16,14,12,30,28],"passed":true},{"actual":[20,18],"check":"normal control 4","expected":[20,18],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: integer ratio\", \"actual\": [10, 10, 10, 10, 10], \"expected\": [10, 15, 13, 11, 12], \"passed\": false}, {\"check\": \"partial repair probe: integer ratio\", \"actual\": [20, 18, 30, 28, 26, 24], \"expected\": [20, 18, 30, 28, 26, 24], \"passed\": true}, {\"check\": \"second regression\", \"actual\": [10, 10, 30, 28, 26], \"expected\": [15, 15, 30, 28, 26], \"passed\": false}, {\"check\": \"normal control 1\", \"actual\": [13, 11, 10, 30, 28], \"expected\": [13, 11, 10, 30, 28], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [30, 28, 26], \"expected\": [30, 28, 26], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [18, 16, 14, 12, 30, 28], \"expected\": [18, 16, 14, 12, 30, 28], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [20, 18], \"expected\": [20, 18], \"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."}}