{"abstract":"Moving from 3.10 down to 2.90 reports +7 ticks.","category":"Betting odds conversion","checks":9,"contract":"Signed tick distance from price a to price b on the ladder [(101, 200, 1), (200, 300, 2), (300, 400, 5), (400, 600, 10), (600, 1000, 20), (1000, 2000, 50), (2000, 3000, 100), (3000, 5000, 200), (5000, 10000, 500), (10000, 100001, 1000)] (hundredths). Prices must be within 1.01..1000 (\"invalid\") and exactly on a tick (\"off ladder\"). Tick index counts all ticks of lower bands ((hi - lo) / step each) plus (v - lo) / step within the band. Return index(b) - index(a).","contract_signature":"a, b","evaluation_group":"w2-odds-conversion-exchange-tick-distance","failed_approach":"Taking the absolute value discards the direction.","family":"w2-odds-conversion-exchange-tick-distance-distance-sign","id":"FA-84621","implementations":{"attempt":{"sha256":"34a0d1efc1aed197f3b95a4c96ea0b2f75ce70f286621b457e36516224d16aa3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(a, b):\n    BANDS = [(101, 200, 1), (200, 300, 2), (300, 400, 5), (400, 600, 10), (600, 1000, 20), (1000, 2000, 50), (2000, 3000, 100), (3000, 5000, 200), (5000, 10000, 500), (10000, 100001, 1000)]\n    def index(v):\n        n = 0\n        for lo, hi, step in BANDS:\n            if v >= hi:\n                n += (hi - lo) // step\n            else:\n                if (v - lo) % step:\n                    return None\n                return n + (v - lo) // step\n        return None\n    out = []\n    for p in (a, b):\n        c = Fraction(p) * 100\n        if c.denominator != 1 or c < 101 or c > 100000:\n            return 'invalid'\n        i = index(int(c))\n        if i is None:\n            return 'off ladder'\n        out.append(i)\n    return abs(out[1] - out[0])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control within band', ('1.50', '1.60'), 10),\n  ('boundary crossing two', ('1.98', '2.04'), 4),\n  ('control downward move', ('3.10', '2.90'), -7),\n  ('boundary off ladder', ('2.01', '2.50'), 'off ladder'),\n  ('control full ladder', ('1.01', '1000'), 349),\n  ('regression: distance sign', ('2.10', '3.30'), 51),\n  ('regression: distance sign', ('20.00', '4.00'), -60),\n  ('variant scenario 1', ('5.90', '2.36'), -71),\n  ('variant scenario 2', ('70.00', '1.16'), -238)],\n [('control within band', ('1.50', '1.60'), 10),\n  ('boundary crossing two', ('1.98', '2.04'), 4),\n  ('control downward move', ('3.10', '2.90'), -7),\n  ('boundary off ladder', ('2.01', '2.50'), 'off ladder'),\n  ('control full ladder', ('1.01', '1000'), 349),\n  ('regression: distance sign', ('17.50', '2.10'), -120),\n  ('variant scenario 1', ('4.70', '8.00'), 23),\n  ('variant scenario 2', ('42.00', '8.21'), 'off ladder')],\n [('control within band', ('1.50', '1.60'), 10),\n  ('boundary crossing two', ('1.98', '2.04'), 4),\n  ('control downward move', ('3.10', '2.90'), -7),\n  ('boundary off ladder', ('2.01', '2.50'), 'off ladder'),\n  ('control full ladder', ('1.01', '1000'), 349),\n  ('regression: distance sign', ('4.20', '11.00'), 40),\n  ('regression: distance sign', ('5.10', '1.91'), -90),\n  ('variant scenario 1', ('19.01', '11.50'), 'off ladder'),\n  ('variant scenario 2', ('9.20', '560.00'), 100)],\n [('control within band', ('1.50', '1.60'), 10),\n  ('boundary crossing two', ('1.98', '2.04'), 4),\n  ('control downward move', ('3.10', '2.90'), -7),\n  ('boundary off ladder', ('2.01', '2.50'), 'off ladder'),\n  ('control full ladder', ('1.01', '1000'), 349),\n  ('regression: distance sign', ('1.31', '2.88'), 113),\n  ('regression: distance sign', ('8.40', '2.76'), -64),\n  ('variant scenario 1', ('44.00', '95.00'), 12),\n  ('variant scenario 2', ('5.91', '30.00'), 'off ladder')],\n [('control within band', ('1.50', '1.60'), 10),\n  ('boundary crossing two', ('1.98', '2.04'), 4),\n  ('control downward move', ('3.10', '2.90'), -7),\n  ('boundary off ladder', ('2.01', '2.50'), 'off ladder'),\n  ('control full ladder', ('1.01', '1000'), 349),\n  ('regression: distance sign', ('2.38', '4.00'), 51),\n  ('regression: distance sign', ('18.00', '12.50'), -11),\n  ('variant scenario 1', ('2.12', '2.34'), 11),\n  ('variant scenario 2', ('3.90', '5.50'), 17)]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(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":"01c1ac7092044e06be061814b60992e8056ad60706c9071be15d71454490c8bc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(a, b):\n    BANDS = [(101, 200, 1), (200, 300, 2), (300, 400, 5), (400, 600, 10), (600, 1000, 20), (1000, 2000, 50), (2000, 3000, 100), (3000, 5000, 200), (5000, 10000, 500), (10000, 100001, 1000)]\n    def index(v):\n        n = 0\n        for lo, hi, step in BANDS:\n            if v >= hi:\n                n += (hi - lo) // step\n            else:\n                if (v - lo) % step:\n                    return None\n                return n + (v - lo) // step\n        return None\n    out = []\n    for p in (a, b):\n        c = Fraction(p) * 100\n        if c.denominator != 1 or c < 101 or c > 100000:\n            return 'invalid'\n        i = index(int(c))\n        if i is None:\n            return 'off ladder'\n        out.append(i)\n    return out[0] - out[1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control within band', ('1.50', '1.60'), 10),\n  ('boundary crossing two', ('1.98', '2.04'), 4),\n  ('control downward move', ('3.10', '2.90'), -7),\n  ('boundary off ladder', ('2.01', '2.50'), 'off ladder'),\n  ('control full ladder', ('1.01', '1000'), 349),\n  ('regression: distance sign', ('2.10', '3.30'), 51),\n  ('regression: distance sign', ('20.00', '4.00'), -60),\n  ('variant scenario 1', ('5.90', '2.36'), -71),\n  ('variant scenario 2', ('70.00', '1.16'), -238)],\n [('control within band', ('1.50', '1.60'), 10),\n  ('boundary crossing two', ('1.98', '2.04'), 4),\n  ('control downward move', ('3.10', '2.90'), -7),\n  ('boundary off ladder', ('2.01', '2.50'), 'off ladder'),\n  ('control full ladder', ('1.01', '1000'), 349),\n  ('regression: distance sign', ('17.50', '2.10'), -120),\n  ('variant scenario 1', ('4.70', '8.00'), 23),\n  ('variant scenario 2', ('42.00', '8.21'), 'off ladder')],\n [('control within band', ('1.50', '1.60'), 10),\n  ('boundary crossing two', ('1.98', '2.04'), 4),\n  ('control downward move', ('3.10', '2.90'), -7),\n  ('boundary off ladder', ('2.01', '2.50'), 'off ladder'),\n  ('control full ladder', ('1.01', '1000'), 349),\n  ('regression: distance sign', ('4.20', '11.00'), 40),\n  ('regression: distance sign', ('5.10', '1.91'), -90),\n  ('variant scenario 1', ('19.01', '11.50'), 'off ladder'),\n  ('variant scenario 2', ('9.20', '560.00'), 100)],\n [('control within band', ('1.50', '1.60'), 10),\n  ('boundary crossing two', ('1.98', '2.04'), 4),\n  ('control downward move', ('3.10', '2.90'), -7),\n  ('boundary off ladder', ('2.01', '2.50'), 'off ladder'),\n  ('control full ladder', ('1.01', '1000'), 349),\n  ('regression: distance sign', ('1.31', '2.88'), 113),\n  ('regression: distance sign', ('8.40', '2.76'), -64),\n  ('variant scenario 1', ('44.00', '95.00'), 12),\n  ('variant scenario 2', ('5.91', '30.00'), 'off ladder')],\n [('control within band', ('1.50', '1.60'), 10),\n  ('boundary crossing two', ('1.98', '2.04'), 4),\n  ('control downward move', ('3.10', '2.90'), -7),\n  ('boundary off ladder', ('2.01', '2.50'), 'off ladder'),\n  ('control full ladder', ('1.01', '1000'), 349),\n  ('regression: distance sign', ('2.38', '4.00'), 51),\n  ('regression: distance sign', ('18.00', '12.50'), -11),\n  ('variant scenario 1', ('2.12', '2.34'), 11),\n  ('variant scenario 2', ('3.90', '5.50'), 17)]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(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":"Stipulated, bounded toy contract stated in the contract field; not a claim of conformance with any operator, exchange or regulator rule set. 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-odds-conversion-exchange-tick-distance-distance-sign","generated_at":"2026-09-29T14:50:32.607864+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Trading bots express stop-loss and offset orders as tick counts across ladder bands.","root_cause":"The subtraction order is reversed.","sha256":"ffe78400ef8dbe8c45842ec72d0e61b2868d8be0c573c041a9c6fdaa3d88b73b","title":"Tick distance has the wrong sign · 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":47.518,"exit_code":1,"observations":[{"actual":10,"check":"control within band","expected":10,"passed":true},{"actual":4,"check":"boundary crossing two","expected":4,"passed":true},{"actual":7,"check":"control downward move","expected":-7,"passed":false},{"actual":"off ladder","check":"boundary off ladder","expected":"off ladder","passed":true},{"actual":349,"check":"control full ladder","expected":349,"passed":true},{"actual":51,"check":"regression: distance sign","expected":51,"passed":true},{"actual":60,"check":"regression: distance sign","expected":-60,"passed":false},{"actual":71,"check":"variant scenario 1","expected":-71,"passed":false},{"actual":238,"check":"variant scenario 2","expected":-238,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control within band\", \"actual\": 10, \"expected\": 10, \"passed\": true}, {\"check\": \"boundary crossing two\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"control downward move\", \"actual\": 7, \"expected\": -7, \"passed\": false}, {\"check\": \"boundary off ladder\", \"actual\": \"off ladder\", \"expected\": \"off ladder\", \"passed\": true}, {\"check\": \"control full ladder\", \"actual\": 349, \"expected\": 349, \"passed\": true}, {\"check\": \"regression: distance sign\", \"actual\": 51, \"expected\": 51, \"passed\": true}, {\"check\": \"regression: distance sign\", \"actual\": 60, \"expected\": -60, \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": 71, \"expected\": -71, \"passed\": false}, {\"check\": \"variant scenario 2\", \"actual\": 238, \"expected\": -238, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.318,"exit_code":1,"observations":[{"actual":-10,"check":"control within band","expected":10,"passed":false},{"actual":-4,"check":"boundary crossing two","expected":4,"passed":false},{"actual":7,"check":"control downward move","expected":-7,"passed":false},{"actual":"off ladder","check":"boundary off ladder","expected":"off ladder","passed":true},{"actual":-349,"check":"control full ladder","expected":349,"passed":false},{"actual":-51,"check":"regression: distance sign","expected":51,"passed":false},{"actual":60,"check":"regression: distance sign","expected":-60,"passed":false},{"actual":71,"check":"variant scenario 1","expected":-71,"passed":false},{"actual":238,"check":"variant scenario 2","expected":-238,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control within band\", \"actual\": -10, \"expected\": 10, \"passed\": false}, {\"check\": \"boundary crossing two\", \"actual\": -4, \"expected\": 4, \"passed\": false}, {\"check\": \"control downward move\", \"actual\": 7, \"expected\": -7, \"passed\": false}, {\"check\": \"boundary off ladder\", \"actual\": \"off ladder\", \"expected\": \"off ladder\", \"passed\": true}, {\"check\": \"control full ladder\", \"actual\": -349, \"expected\": 349, \"passed\": false}, {\"check\": \"regression: distance sign\", \"actual\": -51, \"expected\": 51, \"passed\": false}, {\"check\": \"regression: distance sign\", \"actual\": 60, \"expected\": -60, \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": 71, \"expected\": -71, \"passed\": false}, {\"check\": \"variant scenario 2\", \"actual\": 238, \"expected\": -238, \"passed\": false}], \"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."}}