{"abstract":"Upgrades succeed one percentage point more often than published.","category":"Game economy crafting balance","checks":8,"contract":"Success chance (percent) from level L: [100,100,100,90,80,70,60,50,40,30][L]; max level 10. A roll r (0..99) succeeds when r < chance. Failure at L <= 5 keeps the level; at L >= 6 consumes a protection if one is left (level kept); otherwise L 6..7 downgrades by one and L >= 8 breaks the item. Rolls stop being consumed once the item is at max level or broken; used counts consumed rolls.","contract_signature":"level, rolls, protections","evaluation_group":"w2-game-economy-crafting-balance-enchant-ladder","failed_approach":"Reading the next level chance applies the wrong row of the table.","family":"w2-game-economy-crafting-balance-enchant-ladder-success-comparison","id":"FA-86026","implementations":{"attempt":{"sha256":"367ad49f2cb2a95cc37050d865c7f6ead2c4ccd762a19942821984f5b3145b5d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(level, rolls, protections):\n    chance = [100, 100, 100, 90, 80, 70, 60, 50, 40, 30]\n    used = 0\n    broken = False\n    for r in rolls:\n        if level >= 10 or broken:\n            break\n        used += 1\n        if r < chance[min(level + 1, 9)]:\n            level += 1\n        elif level >= 6:\n            if protections > 0:\n                protections -= 1\n            elif level >= 8:\n                broken = True\n            else:\n                level -= 1\n    return {'level': level, 'broken': broken, 'protections': protections, 'used': used}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('boundary roll equals chance #1',\n   [4, [80], 0],\n   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),\n  ('fault site success comparison #1',\n   [9, [39, 30, 99, 29, 59, 99, 0], 1],\n   {'level': 9, 'broken': True, 'protections': 0, 'used': 2}),\n  ('fault site success comparison #2',\n   [8, [49, 40, 59], 2],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),\n  ('partial repair boundary #1',\n   [0, [0, 30, 89, 99, 60, 0, 59, 59], 2],\n   {'level': 7, 'broken': False, 'protections': 2, 'used': 8}),\n  ('regression success comparison #1',\n   [6, [40, 99, 50, 50, 29, 60], 1],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 6}),\n  ('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),\n  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),\n  ('control #1', [9, [99, 30], 0], {'level': 9, 'broken': True, 'protections': 0, 'used': 1})],\n [('boundary roll equals chance #1',\n   [4, [80], 0],\n   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),\n  ('fault site success comparison #1',\n   [8, [49, 40, 59], 2],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),\n  ('fault site success comparison #2',\n   [6, [59, 50, 99, 50], 0],\n   {'level': 6, 'broken': False, 'protections': 0, 'used': 4}),\n  ('partial repair boundary #1',\n   [0, [29, 91, 60, 89, 60, 39, 49], 0],\n   {'level': 7, 'broken': False, 'protections': 0, 'used': 7}),\n  ('regression success comparison #1',\n   [7, [50, 39, 49, 90], 0],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 4}),\n  ('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),\n  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),\n  ('control #1', [9, [99, 30], 0], {'level': 9, 'broken': True, 'protections': 0, 'used': 1})],\n [('boundary roll equals chance #1',\n   [4, [80], 0],\n   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),\n  ('regression success comparison #1',\n   [6, [40, 99, 50, 50, 29, 60], 1],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 6}),\n  ('fault site success comparison #1',\n   [9, [30, 90, 40], 0],\n   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),\n  ('partial repair boundary #1',\n   [6, [47, 29, 60, 59, 39, 49, 59, 30], 2],\n   {'level': 9, 'broken': True, 'protections': 0, 'used': 6}),\n  ('partial repair boundary #2',\n   [3, [90, 89], 0],\n   {'level': 4, 'broken': False, 'protections': 0, 'used': 2}),\n  ('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),\n  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),\n  ('control #1', [9, [99, 30], 0], {'level': 9, 'broken': True, 'protections': 0, 'used': 1})],\n [('boundary roll equals chance #1',\n   [4, [80], 0],\n   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),\n  ('fault site success comparison #1',\n   [3, [49, 0, 0, 99, 50, 60], 0],\n   {'level': 5, 'broken': False, 'protections': 0, 'used': 6}),\n  ('regression success comparison #1',\n   [7, [50, 39, 49, 90], 0],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 4}),\n  ('partial repair boundary #1',\n   [0, [90, 29, 59, 30, 59, 39, 50], 1],\n   {'level': 7, 'broken': False, 'protections': 1, 'used': 7}),\n  ('partial repair boundary #2',\n   [6, [50, 90, 30, 89], 1],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 4}),\n  ('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),\n  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),\n  ('control #1',\n   [9, [50, 40, 50, 0, 40, 29, 0], 0],\n   {'level': 9, 'broken': True, 'protections': 0, 'used': 1})],\n [('boundary roll equals chance #1',\n   [4, [80], 0],\n   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),\n  ('regression success comparison #1',\n   [6, [29, 50, 99, 60, 0, 50, 29, 99], 1],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 8}),\n  ('fault site success comparison #1',\n   [3, [90], 1],\n   {'level': 3, 'broken': False, 'protections': 1, 'used': 1}),\n  ('partial repair boundary #1',\n   [3, [89, 89, 0], 0],\n   {'level': 5, 'broken': False, 'protections': 0, 'used': 3}),\n  ('partial repair boundary #2',\n   [6, [90, 59, 30, 90, 29, 40, 29, 40], 0],\n   {'level': 9, 'broken': True, 'protections': 0, 'used': 8}),\n  ('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),\n  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),\n  ('control #1', [10, [90, 49, 29], 0], {'level': 10, 'broken': False, 'protections': 0, 'used': 0})]]\nfor label, args, expected in cases[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":"099aaa591a775e8d897ebb66f866a8d3aff9b198872a70e42432fb9a1adff731","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(level, rolls, protections):\n    chance = [100, 100, 100, 90, 80, 70, 60, 50, 40, 30]\n    used = 0\n    broken = False\n    for r in rolls:\n        if level >= 10 or broken:\n            break\n        used += 1\n        if r <= chance[level]:\n            level += 1\n        elif level >= 6:\n            if protections > 0:\n                protections -= 1\n            elif level >= 8:\n                broken = True\n            else:\n                level -= 1\n    return {'level': level, 'broken': broken, 'protections': protections, 'used': used}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('boundary roll equals chance #1',\n   [4, [80], 0],\n   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),\n  ('fault site success comparison #1',\n   [9, [39, 30, 99, 29, 59, 99, 0], 1],\n   {'level': 9, 'broken': True, 'protections': 0, 'used': 2}),\n  ('fault site success comparison #2',\n   [8, [49, 40, 59], 2],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),\n  ('partial repair boundary #1',\n   [0, [0, 30, 89, 99, 60, 0, 59, 59], 2],\n   {'level': 7, 'broken': False, 'protections': 2, 'used': 8}),\n  ('regression success comparison #1',\n   [6, [40, 99, 50, 50, 29, 60], 1],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 6}),\n  ('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),\n  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),\n  ('control #1', [9, [99, 30], 0], {'level': 9, 'broken': True, 'protections': 0, 'used': 1})],\n [('boundary roll equals chance #1',\n   [4, [80], 0],\n   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),\n  ('fault site success comparison #1',\n   [8, [49, 40, 59], 2],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),\n  ('fault site success comparison #2',\n   [6, [59, 50, 99, 50], 0],\n   {'level': 6, 'broken': False, 'protections': 0, 'used': 4}),\n  ('partial repair boundary #1',\n   [0, [29, 91, 60, 89, 60, 39, 49], 0],\n   {'level': 7, 'broken': False, 'protections': 0, 'used': 7}),\n  ('regression success comparison #1',\n   [7, [50, 39, 49, 90], 0],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 4}),\n  ('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),\n  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),\n  ('control #1', [9, [99, 30], 0], {'level': 9, 'broken': True, 'protections': 0, 'used': 1})],\n [('boundary roll equals chance #1',\n   [4, [80], 0],\n   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),\n  ('regression success comparison #1',\n   [6, [40, 99, 50, 50, 29, 60], 1],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 6}),\n  ('fault site success comparison #1',\n   [9, [30, 90, 40], 0],\n   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),\n  ('partial repair boundary #1',\n   [6, [47, 29, 60, 59, 39, 49, 59, 30], 2],\n   {'level': 9, 'broken': True, 'protections': 0, 'used': 6}),\n  ('partial repair boundary #2',\n   [3, [90, 89], 0],\n   {'level': 4, 'broken': False, 'protections': 0, 'used': 2}),\n  ('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),\n  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),\n  ('control #1', [9, [99, 30], 0], {'level': 9, 'broken': True, 'protections': 0, 'used': 1})],\n [('boundary roll equals chance #1',\n   [4, [80], 0],\n   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),\n  ('fault site success comparison #1',\n   [3, [49, 0, 0, 99, 50, 60], 0],\n   {'level': 5, 'broken': False, 'protections': 0, 'used': 6}),\n  ('regression success comparison #1',\n   [7, [50, 39, 49, 90], 0],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 4}),\n  ('partial repair boundary #1',\n   [0, [90, 29, 59, 30, 59, 39, 50], 1],\n   {'level': 7, 'broken': False, 'protections': 1, 'used': 7}),\n  ('partial repair boundary #2',\n   [6, [50, 90, 30, 89], 1],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 4}),\n  ('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),\n  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),\n  ('control #1',\n   [9, [50, 40, 50, 0, 40, 29, 0], 0],\n   {'level': 9, 'broken': True, 'protections': 0, 'used': 1})],\n [('boundary roll equals chance #1',\n   [4, [80], 0],\n   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),\n  ('regression success comparison #1',\n   [6, [29, 50, 99, 60, 0, 50, 29, 99], 1],\n   {'level': 8, 'broken': True, 'protections': 0, 'used': 8}),\n  ('fault site success comparison #1',\n   [3, [90], 1],\n   {'level': 3, 'broken': False, 'protections': 1, 'used': 1}),\n  ('partial repair boundary #1',\n   [3, [89, 89, 0], 0],\n   {'level': 5, 'broken': False, 'protections': 0, 'used': 3}),\n  ('partial repair boundary #2',\n   [6, [90, 59, 30, 90, 29, 40, 29, 40], 0],\n   {'level': 9, 'broken': True, 'protections': 0, 'used': 8}),\n  ('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),\n  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),\n  ('control #1', [10, [90, 49, 29], 0], {'level': 10, 'broken': False, 'protections': 0, 'used': 0})]]\nfor label, args, expected in cases[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":"Deterministic toy contract stipulated for this model; integer or exact arithmetic only, not a reproduction of any specific game engine. 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-game-economy-crafting-balance-enchant-ladder-success-comparison","generated_at":"2026-09-29T14:50:45.707310+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Game economies leak or destroy currency when one crafting or pricing rule is off by one boundary, rounding stage or state update; the defect is observable in exact integer outcomes.","root_cause":"The roll comparison is inclusive of the chance value.","sha256":"c97306921ffdab073f2a6dba853e7e965f6785421db3823eab9bc8b75b6ee189","title":"Enchantment upgrade ladder: Roll equal to chance succeeds · 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.556,"exit_code":1,"observations":[{"actual":{"broken":false,"level":4,"protections":0,"used":1},"check":"boundary roll equals chance #1","expected":{"broken":false,"level":4,"protections":0,"used":1},"passed":true},{"actual":{"broken":true,"level":9,"protections":0,"used":2},"check":"fault site success comparison #1","expected":{"broken":true,"level":9,"protections":0,"used":2},"passed":true},{"actual":{"broken":true,"level":8,"protections":0,"used":3},"check":"fault site success comparison #2","expected":{"broken":true,"level":8,"protections":0,"used":3},"passed":true},{"actual":{"broken":false,"level":6,"protections":1,"used":8},"check":"partial repair boundary #1","expected":{"broken":false,"level":7,"protections":2,"used":8},"passed":false},{"actual":{"broken":false,"level":5,"protections":0,"used":6},"check":"regression success comparison #1","expected":{"broken":true,"level":8,"protections":0,"used":6},"passed":false},{"actual":{"broken":true,"level":8,"protections":0,"used":1},"check":"break at eight #1","expected":{"broken":true,"level":8,"protections":0,"used":1},"passed":true},{"actual":{"broken":false,"level":5,"protections":0,"used":2},"check":"protected downgrade #1","expected":{"broken":false,"level":5,"protections":0,"used":2},"passed":true},{"actual":{"broken":true,"level":9,"protections":0,"used":1},"check":"control #1","expected":{"broken":true,"level":9,"protections":0,"used":1},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary roll equals chance #1\", \"actual\": {\"level\": 4, \"broken\": false, \"protections\": 0, \"used\": 1}, \"expected\": {\"level\": 4, \"broken\": false, \"protections\": 0, \"used\": 1}, \"passed\": true}, {\"check\": \"fault site success comparison #1\", \"actual\": {\"level\": 9, \"broken\": true, \"protections\": 0, \"used\": 2}, \"expected\": {\"level\": 9, \"broken\": true, \"protections\": 0, \"used\": 2}, \"passed\": true}, {\"check\": \"fault site success comparison #2\", \"actual\": {\"level\": 8, \"broken\": true, \"protections\": 0, \"used\": 3}, \"expected\": {\"level\": 8, \"broken\": true, \"protections\": 0, \"used\": 3}, \"passed\": true}, {\"check\": \"partial repair boundary #1\", \"actual\": {\"level\": 6, \"broken\": false, \"protections\": 1, \"used\": 8}, \"expected\": {\"level\": 7, \"broken\": false, \"protections\": 2, \"used\": 8}, \"passed\": false}, {\"check\": \"regression success comparison #1\", \"actual\": {\"level\": 5, \"broken\": false, \"protections\": 0, \"used\": 6}, \"expected\": {\"level\": 8, \"broken\": true, \"protections\": 0, \"used\": 6}, \"passed\": false}, {\"check\": \"break at eight #1\", \"actual\": {\"level\": 8, \"broken\": true, \"protections\": 0, \"used\": 1}, \"expected\": {\"level\": 8, \"broken\": true, \"protections\": 0, \"used\": 1}, \"passed\": true}, {\"check\": \"protected downgrade #1\", \"actual\": {\"level\": 5, \"broken\": false, \"protections\": 0, \"used\": 2}, \"expected\": {\"level\": 5, \"broken\": false, \"protections\": 0, \"used\": 2}, \"passed\": true}, {\"check\": \"control #1\", \"actual\": {\"level\": 9, \"broken\": true, \"protections\": 0, \"used\": 1}, \"expected\": {\"level\": 9, \"broken\": true, \"protections\": 0, \"used\": 1}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.154,"exit_code":1,"observations":[{"actual":{"broken":false,"level":5,"protections":0,"used":1},"check":"boundary roll equals chance #1","expected":{"broken":false,"level":4,"protections":0,"used":1},"passed":false},{"actual":{"broken":false,"level":10,"protections":0,"used":2},"check":"fault site success comparison #1","expected":{"broken":true,"level":9,"protections":0,"used":2},"passed":false},{"actual":{"broken":false,"level":9,"protections":0,"used":3},"check":"fault site success comparison #2","expected":{"broken":true,"level":8,"protections":0,"used":3},"passed":false},{"actual":{"broken":false,"level":7,"protections":2,"used":8},"check":"partial repair boundary #1","expected":{"broken":false,"level":7,"protections":2,"used":8},"passed":true},{"actual":{"broken":true,"level":8,"protections":0,"used":4},"check":"regression success comparison #1","expected":{"broken":true,"level":8,"protections":0,"used":6},"passed":false},{"actual":{"broken":true,"level":8,"protections":0,"used":1},"check":"break at eight #1","expected":{"broken":true,"level":8,"protections":0,"used":1},"passed":true},{"actual":{"broken":false,"level":5,"protections":0,"used":2},"check":"protected downgrade #1","expected":{"broken":false,"level":5,"protections":0,"used":2},"passed":true},{"actual":{"broken":true,"level":9,"protections":0,"used":1},"check":"control #1","expected":{"broken":true,"level":9,"protections":0,"used":1},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary roll equals chance #1\", \"actual\": {\"level\": 5, \"broken\": false, \"protections\": 0, \"used\": 1}, \"expected\": {\"level\": 4, \"broken\": false, \"protections\": 0, \"used\": 1}, \"passed\": false}, {\"check\": \"fault site success comparison #1\", \"actual\": {\"level\": 10, \"broken\": false, \"protections\": 0, \"used\": 2}, \"expected\": {\"level\": 9, \"broken\": true, \"protections\": 0, \"used\": 2}, \"passed\": false}, {\"check\": \"fault site success comparison #2\", \"actual\": {\"level\": 9, \"broken\": false, \"protections\": 0, \"used\": 3}, \"expected\": {\"level\": 8, \"broken\": true, \"protections\": 0, \"used\": 3}, \"passed\": false}, {\"check\": \"partial repair boundary #1\", \"actual\": {\"level\": 7, \"broken\": false, \"protections\": 2, \"used\": 8}, \"expected\": {\"level\": 7, \"broken\": false, \"protections\": 2, \"used\": 8}, \"passed\": true}, {\"check\": \"regression success comparison #1\", \"actual\": {\"level\": 8, \"broken\": true, \"protections\": 0, \"used\": 4}, \"expected\": {\"level\": 8, \"broken\": true, \"protections\": 0, \"used\": 6}, \"passed\": false}, {\"check\": \"break at eight #1\", \"actual\": {\"level\": 8, \"broken\": true, \"protections\": 0, \"used\": 1}, \"expected\": {\"level\": 8, \"broken\": true, \"protections\": 0, \"used\": 1}, \"passed\": true}, {\"check\": \"protected downgrade #1\", \"actual\": {\"level\": 5, \"broken\": false, \"protections\": 0, \"used\": 2}, \"expected\": {\"level\": 5, \"broken\": false, \"protections\": 0, \"used\": 2}, \"passed\": true}, {\"check\": \"control #1\", \"actual\": {\"level\": 9, \"broken\": true, \"protections\": 0, \"used\": 1}, \"expected\": {\"level\": 9, \"broken\": true, \"protections\": 0, \"used\": 1}, \"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."}}