{"abstract":"Surge creeps up slowly during a demand spike and collapses instantly afterwards.","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":"Limiting both directions still delays the required immediate rise.","family":"w2-ride-hailing-fare-surge-surge-hysteresis-hysteresis-direction","id":"FA-85361","implementations":{"attempt":{"sha256":"8a67bc5a644612db473a4d0d1e3e1da06875c930946d557a7cee6edab5e9d23e","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 * 10 >= th * drv:\n                    raw = mult\n                    break\n        cur = min(raw, cur + 2) 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: hysteresis direction', [[[2, 10], [1, 10], [22, 7]], 12], [10, 10, 30]),\n  ('partial repair probe: hysteresis direction',\n   [[[23, 7], [5, 5], [14, 5], [19, 7], [30, 10], [20, 10]], 30], [30, 28, 26, 24, 30, 28]),\n  ('second regression', [[[6, 7], [4, 5], [6, 7], [0, 0], [4, 5], [19, 10]], 30], [28, 26, 24, 22, 20, 18]),\n  ('normal control 1', [[[0, 0], [4, 10], [8, 10], [6, 7], [25, 20], [2, 5]], 10], [10, 10, 10, 10, 12, 10]),\n  ('normal control 2', [[[0, 0], [11, 10]], 12], [10, 10]),\n  ('normal control 3', [[[10, 10], [-1, 0]], 10], [10, 10]),\n  ('normal control 4', [[[-1, 0], [7, 7]], 10], [10, 10])],\n [('regression: hysteresis direction', [[[11, 10], [-1, 0], [20, 20], [19, 10], [12, 10], [18, 10]], 10],\n   [10, 10, 10, 15, 13, 15]),\n  ('partial repair probe: hysteresis direction', [[[0, 0], [0, 0], [21, 7], [11, 10], [0, 0], [31, 10]], 10],\n   [10, 10, 30, 28, 26, 30]),\n  ('second regression', [[[4, 5], [8, 20], [38, 20]], 20], [18, 16, 15]),\n  ('normal control 1', [[[9, 10], [7, 5]], 12], [10, 12]),\n  ('normal control 2', [[[10, 20], [6, 7]], 10], [10, 10]),\n  ('normal control 3', [[[10, 10], [3, 7]], 10], [10, 10]),\n  ('normal control 4', [[[5, 10], [6, 5]], 12], [10, 12])],\n [('regression: hysteresis direction', [[[19, 20], [9, 5], [20, 20]], 15], [13, 15, 13]),\n  ('partial repair probe: hysteresis direction', [[[0, 0], [4, 10], [30, 7], [9, 10], [5, 5], [14, 10]], 15],\n   [13, 11, 30, 28, 26, 24]),\n  ('second regression', [[[10, 5], [11, 10], [16, 20], [3, 7], [1, 5]], 20], [20, 18, 16, 14, 12]),\n  ('normal control 1', [[[7, 10], [2, 5]], 12], [10, 10]),\n  ('normal control 2', [[[6, 5], [4, 20], [0, 0]], 12], [12, 10, 10]),\n  ('normal control 3', [[[7, 5], [6, 10]], 12], [12, 10]),\n  ('normal control 4', [[[0, 0], [9, 10]], 12], [10, 10])],\n [('regression: hysteresis direction', [[[0, 0], [24, 0], [1, 10], [6, 20], [5, 10]], 15],\n   [13, 30, 28, 26, 24]),\n  ('partial repair probe: hysteresis direction', [[[31, 7], [27, 0], [9, 20]], 12], [30, 30, 28]),\n  ('second regression', [[[10, 20], [26, 0], [5, 10]], 30], [28, 30, 28]),\n  ('normal control 1', [[[10, 10], [12, 10]], 10], [10, 12]),\n  ('normal control 2', [[[15, 20], [11, 10]], 12], [10, 10]),\n  ('normal control 3', [[[5, 5], [11, 10], [0, 0]], 10], [10, 10, 10]),\n  ('normal control 4', [[[38, 20], [16, 10]], 15], [15, 15])],\n [('regression: hysteresis direction', [[[32, 0], [16, 20]], 15], [30, 28]),\n  ('partial repair probe: hysteresis direction', [[[30, 10], [4, 5]], 12], [30, 28]),\n  ('second regression', [[[20, 5], [14, 7], [15, 10], [1, 7], [24, 20]], 15], [30, 28, 26, 24, 22]),\n  ('normal control 1', [[[2, 5], [0, 0], [24, 20], [10, 10]], 12], [10, 10, 12, 10]),\n  ('normal control 2', [[[5, 5], [10, 10]], 12], [10, 10]),\n  ('normal control 3', [[[24, 20], [10, 7], [8, 10], [5, 10], [0, 0]], 12], [12, 12, 10, 10, 10]),\n  ('normal control 4', [[[5, 10], [-1, 0]], 10], [10, 10])]]\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":"f5649bdda66d2de2ec21a4645dcd28283ebeef977dc806c4fa2bea8c2be9e425","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 * 10 >= th * drv:\n                    raw = mult\n                    break\n        cur = min(raw, cur + 2) if raw >= cur else raw\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: hysteresis direction', [[[2, 10], [1, 10], [22, 7]], 12], [10, 10, 30]),\n  ('partial repair probe: hysteresis direction',\n   [[[23, 7], [5, 5], [14, 5], [19, 7], [30, 10], [20, 10]], 30], [30, 28, 26, 24, 30, 28]),\n  ('second regression', [[[6, 7], [4, 5], [6, 7], [0, 0], [4, 5], [19, 10]], 30], [28, 26, 24, 22, 20, 18]),\n  ('normal control 1', [[[0, 0], [4, 10], [8, 10], [6, 7], [25, 20], [2, 5]], 10], [10, 10, 10, 10, 12, 10]),\n  ('normal control 2', [[[0, 0], [11, 10]], 12], [10, 10]),\n  ('normal control 3', [[[10, 10], [-1, 0]], 10], [10, 10]),\n  ('normal control 4', [[[-1, 0], [7, 7]], 10], [10, 10])],\n [('regression: hysteresis direction', [[[11, 10], [-1, 0], [20, 20], [19, 10], [12, 10], [18, 10]], 10],\n   [10, 10, 10, 15, 13, 15]),\n  ('partial repair probe: hysteresis direction', [[[0, 0], [0, 0], [21, 7], [11, 10], [0, 0], [31, 10]], 10],\n   [10, 10, 30, 28, 26, 30]),\n  ('second regression', [[[4, 5], [8, 20], [38, 20]], 20], [18, 16, 15]),\n  ('normal control 1', [[[9, 10], [7, 5]], 12], [10, 12]),\n  ('normal control 2', [[[10, 20], [6, 7]], 10], [10, 10]),\n  ('normal control 3', [[[10, 10], [3, 7]], 10], [10, 10]),\n  ('normal control 4', [[[5, 10], [6, 5]], 12], [10, 12])],\n [('regression: hysteresis direction', [[[19, 20], [9, 5], [20, 20]], 15], [13, 15, 13]),\n  ('partial repair probe: hysteresis direction', [[[0, 0], [4, 10], [30, 7], [9, 10], [5, 5], [14, 10]], 15],\n   [13, 11, 30, 28, 26, 24]),\n  ('second regression', [[[10, 5], [11, 10], [16, 20], [3, 7], [1, 5]], 20], [20, 18, 16, 14, 12]),\n  ('normal control 1', [[[7, 10], [2, 5]], 12], [10, 10]),\n  ('normal control 2', [[[6, 5], [4, 20], [0, 0]], 12], [12, 10, 10]),\n  ('normal control 3', [[[7, 5], [6, 10]], 12], [12, 10]),\n  ('normal control 4', [[[0, 0], [9, 10]], 12], [10, 10])],\n [('regression: hysteresis direction', [[[0, 0], [24, 0], [1, 10], [6, 20], [5, 10]], 15],\n   [13, 30, 28, 26, 24]),\n  ('partial repair probe: hysteresis direction', [[[31, 7], [27, 0], [9, 20]], 12], [30, 30, 28]),\n  ('second regression', [[[10, 20], [26, 0], [5, 10]], 30], [28, 30, 28]),\n  ('normal control 1', [[[10, 10], [12, 10]], 10], [10, 12]),\n  ('normal control 2', [[[15, 20], [11, 10]], 12], [10, 10]),\n  ('normal control 3', [[[5, 5], [11, 10], [0, 0]], 10], [10, 10, 10]),\n  ('normal control 4', [[[38, 20], [16, 10]], 15], [15, 15])],\n [('regression: hysteresis direction', [[[32, 0], [16, 20]], 15], [30, 28]),\n  ('partial repair probe: hysteresis direction', [[[30, 10], [4, 5]], 12], [30, 28]),\n  ('second regression', [[[20, 5], [14, 7], [15, 10], [1, 7], [24, 20]], 15], [30, 28, 26, 24, 22]),\n  ('normal control 1', [[[2, 5], [0, 0], [24, 20], [10, 10]], 12], [10, 10, 12, 10]),\n  ('normal control 2', [[[5, 5], [10, 10]], 12], [10, 10]),\n  ('normal control 3', [[[24, 20], [10, 7], [8, 10], [5, 10], [0, 0]], 12], [12, 12, 10, 10, 10]),\n  ('normal control 4', [[[5, 10], [-1, 0]], 10], [10, 10])]]\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-hysteresis-direction","generated_at":"2026-09-29T14:50:39.715888+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 rate limiter caps rises and lets drops through unchanged.","sha256":"6d603b90ce6840002e255d747371dab473a7b4fde791f42711c6def59ece3cbe","title":"Surge damping applied to increases instead of decreases · 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.352,"exit_code":1,"observations":[{"actual":[10,10,12],"check":"regression: hysteresis direction","expected":[10,10,30],"passed":false},{"actual":[30,28,26,24,26,24],"check":"partial repair probe: hysteresis direction","expected":[30,28,26,24,30,28],"passed":false},{"actual":[28,26,24,22,20,18],"check":"second regression","expected":[28,26,24,22,20,18],"passed":true},{"actual":[10,10,10,10,12,10],"check":"normal control 1","expected":[10,10,10,10,12,10],"passed":true},{"actual":[10,10],"check":"normal control 2","expected":[10,10],"passed":true},{"actual":[10,10],"check":"normal control 3","expected":[10,10],"passed":true},{"actual":[10,10],"check":"normal control 4","expected":[10,10],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: hysteresis direction\", \"actual\": [10, 10, 12], \"expected\": [10, 10, 30], \"passed\": false}, {\"check\": \"partial repair probe: hysteresis direction\", \"actual\": [30, 28, 26, 24, 26, 24], \"expected\": [30, 28, 26, 24, 30, 28], \"passed\": false}, {\"check\": \"second regression\", \"actual\": [28, 26, 24, 22, 20, 18], \"expected\": [28, 26, 24, 22, 20, 18], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [10, 10, 10, 10, 12, 10], \"expected\": [10, 10, 10, 10, 12, 10], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [10, 10], \"expected\": [10, 10], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [10, 10], \"expected\": [10, 10], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [10, 10], \"expected\": [10, 10], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.768,"exit_code":1,"observations":[{"actual":[10,10,12],"check":"regression: hysteresis direction","expected":[10,10,30],"passed":false},{"actual":[30,10,12,14,16,18],"check":"partial repair probe: hysteresis direction","expected":[30,28,26,24,30,28],"passed":false},{"actual":[10,10,10,10,10,12],"check":"second regression","expected":[28,26,24,22,20,18],"passed":false},{"actual":[10,10,10,10,12,10],"check":"normal control 1","expected":[10,10,10,10,12,10],"passed":true},{"actual":[10,10],"check":"normal control 2","expected":[10,10],"passed":true},{"actual":[10,10],"check":"normal control 3","expected":[10,10],"passed":true},{"actual":[10,10],"check":"normal control 4","expected":[10,10],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: hysteresis direction\", \"actual\": [10, 10, 12], \"expected\": [10, 10, 30], \"passed\": false}, {\"check\": \"partial repair probe: hysteresis direction\", \"actual\": [30, 10, 12, 14, 16, 18], \"expected\": [30, 28, 26, 24, 30, 28], \"passed\": false}, {\"check\": \"second regression\", \"actual\": [10, 10, 10, 10, 10, 12], \"expected\": [28, 26, 24, 22, 20, 18], \"passed\": false}, {\"check\": \"normal control 1\", \"actual\": [10, 10, 10, 10, 12, 10], \"expected\": [10, 10, 10, 10, 12, 10], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [10, 10], \"expected\": [10, 10], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [10, 10], \"expected\": [10, 10], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [10, 10], \"expected\": [10, 10], \"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."}}