{"abstract":"Quests far above the player pay the gray-quest penalty.","category":"Game economy crafting balance","checks":8,"contract":"Completion k (0-based across the day, starting at done_today) pays tier 100% for k < 5, 50% for 5 <= k < 10, 0 after. Gap = player_level - quest_level: >= 5 pays 20%, >= 3 pays 60%, otherwise 100% (higher level quests are never penalized). Each reward = floor(base*tier*gap/10000). Returns the list of the next count rewards.","contract_signature":"done_today, count, base, player_level, quest_level","evaluation_group":"w2-game-economy-crafting-balance-quest-diminish","failed_approach":"A strict comparison misses exactly five levels of gap.","family":"w2-game-economy-crafting-balance-quest-diminish-gray-gap-direction","id":"FA-86151","implementations":{"attempt":{"sha256":"e46873fc240813ef1a2cb8836aa01d643949778e9d2f9e3c0105f15abe0e1fa8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(done_today, count, base, player_level, quest_level):\n    if player_level - quest_level > 5:\n        gap = 20\n    elif player_level - quest_level >= 3:\n        gap = 60\n    else:\n        gap = 100\n    out = []\n    for k in range(done_today, done_today + count):\n        if k < 5:\n            tier = 100\n        elif k < 10:\n            tier = 50\n        else:\n            tier = 0\n        out.append(base * tier * gap // 10000)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site gray gap direction #1', [3, 6, 99, 59, 64], [99, 99, 49, 49, 49, 49]),\n  ('fault site gray gap direction #2', [7, 1, 7, 40, 47], [3]),\n  ('partial repair boundary #1', [9, 5, 101, 15, 10], [10, 0, 0, 0, 0]),\n  ('partial repair boundary #2', [8, 5, 101, 53, 48], [10, 10, 0, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('control #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0])],\n [('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site gray gap direction #1', [7, 1, 7, 40, 47], [3]),\n  ('fault site gray gap direction #2', [8, 6, 99, 11, 18], [49, 49, 0, 0, 0, 0]),\n  ('partial repair boundary #1', [8, 5, 101, 53, 48], [10, 10, 0, 0, 0]),\n  ('partial repair boundary #2', [6, 6, 99, 40, 35], [9, 9, 9, 9, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('control #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0])],\n [('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site gray gap direction #1', [0, 1, 82, 18, 25], [82]),\n  ('fault site gray gap direction #2', [7, 1, 101, 1, 9], [50]),\n  ('partial repair boundary #1', [4, 3, 101, 36, 31], [20, 10, 10]),\n  ('partial repair boundary #2', [2, 5, 3, 43, 38], [0, 0, 0, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('control #1', [3, 4, 101, 31, 28], [60, 60, 30, 30])],\n [('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site gray gap direction #1', [2, 1, 3, 7, 12], [3]),\n  ('fault site gray gap direction #2', [2, 6, 19, 24, 32], [19, 19, 19, 9, 9, 9]),\n  ('partial repair boundary #1', [9, 6, 415, 6, 1], [41, 0, 0, 0, 0, 0]),\n  ('partial repair boundary #2', [8, 4, 7, 23, 18], [0, 0, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('control #1', [8, 2, 1, 33, 25], [0, 0])],\n [('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site gray gap direction #1', [3, 2, 1, 60, 66], [1, 1]),\n  ('fault site gray gap direction #2', [4, 6, 1, 4, 9], [1, 0, 0, 0, 0, 0]),\n  ('partial repair boundary #1', [8, 5, 99, 34, 29], [9, 9, 0, 0, 0]),\n  ('partial repair boundary #2', [3, 4, 99, 20, 15], [19, 19, 9, 9]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('control #1', [9, 4, 3, 24, 23], [1, 0, 0, 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":"dba1890e009c5e8dd3bce248ba71aac42988788d6d4c6b2a22fc86043d91c0f4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(done_today, count, base, player_level, quest_level):\n    if abs(player_level - quest_level) >= 5:\n        gap = 20\n    elif player_level - quest_level >= 3:\n        gap = 60\n    else:\n        gap = 100\n    out = []\n    for k in range(done_today, done_today + count):\n        if k < 5:\n            tier = 100\n        elif k < 10:\n            tier = 50\n        else:\n            tier = 0\n        out.append(base * tier * gap // 10000)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site gray gap direction #1', [3, 6, 99, 59, 64], [99, 99, 49, 49, 49, 49]),\n  ('fault site gray gap direction #2', [7, 1, 7, 40, 47], [3]),\n  ('partial repair boundary #1', [9, 5, 101, 15, 10], [10, 0, 0, 0, 0]),\n  ('partial repair boundary #2', [8, 5, 101, 53, 48], [10, 10, 0, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('control #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0])],\n [('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site gray gap direction #1', [7, 1, 7, 40, 47], [3]),\n  ('fault site gray gap direction #2', [8, 6, 99, 11, 18], [49, 49, 0, 0, 0, 0]),\n  ('partial repair boundary #1', [8, 5, 101, 53, 48], [10, 10, 0, 0, 0]),\n  ('partial repair boundary #2', [6, 6, 99, 40, 35], [9, 9, 9, 9, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('control #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0])],\n [('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site gray gap direction #1', [0, 1, 82, 18, 25], [82]),\n  ('fault site gray gap direction #2', [7, 1, 101, 1, 9], [50]),\n  ('partial repair boundary #1', [4, 3, 101, 36, 31], [20, 10, 10]),\n  ('partial repair boundary #2', [2, 5, 3, 43, 38], [0, 0, 0, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('control #1', [3, 4, 101, 31, 28], [60, 60, 30, 30])],\n [('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site gray gap direction #1', [2, 1, 3, 7, 12], [3]),\n  ('fault site gray gap direction #2', [2, 6, 19, 24, 32], [19, 19, 19, 9, 9, 9]),\n  ('partial repair boundary #1', [9, 6, 415, 6, 1], [41, 0, 0, 0, 0, 0]),\n  ('partial repair boundary #2', [8, 4, 7, 23, 18], [0, 0, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('control #1', [8, 2, 1, 33, 25], [0, 0])],\n [('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site gray gap direction #1', [3, 2, 1, 60, 66], [1, 1]),\n  ('fault site gray gap direction #2', [4, 6, 1, 4, 9], [1, 0, 0, 0, 0, 0]),\n  ('partial repair boundary #1', [8, 5, 99, 34, 29], [9, 9, 0, 0, 0]),\n  ('partial repair boundary #2', [3, 4, 99, 20, 15], [19, 19, 9, 9]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('control #1', [9, 4, 3, 24, 23], [1, 0, 0, 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-quest-diminish-gray-gap-direction","generated_at":"2026-09-29T14:50:46.947980+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 gap uses an absolute difference, penalizing quests above the player.","sha256":"90939ce6b87730e6001d630463788db75b70bfdce1bb2baaa0cdbcfda179e6a4","title":"Repeatable quest rewards: Harder quests are treated as gray · 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":40.243,"exit_code":1,"observations":[{"actual":[25,25,0],"check":"harder quest no penalty #1","expected":[25,25,0],"passed":true},{"actual":[59,59],"check":"gray quest #1","expected":[19,19],"passed":false},{"actual":[99,99,49,49,49,49],"check":"fault site gray gap direction #1","expected":[99,99,49,49,49,49],"passed":true},{"actual":[3],"check":"fault site gray gap direction #2","expected":[3],"passed":true},{"actual":[30,0,0,0,0],"check":"partial repair boundary #1","expected":[10,0,0,0,0],"passed":false},{"actual":[30,30,0,0,0],"check":"partial repair boundary #2","expected":[10,10,0,0,0],"passed":false},{"actual":[101,101,50,50],"check":"crossing into half tier #1","expected":[101,101,50,50],"passed":true},{"actual":[107,107,107,107,0,0],"check":"control #1","expected":[107,107,107,107,0,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"harder quest no penalty #1\", \"actual\": [25, 25, 0], \"expected\": [25, 25, 0], \"passed\": true}, {\"check\": \"gray quest #1\", \"actual\": [59, 59], \"expected\": [19, 19], \"passed\": false}, {\"check\": \"fault site gray gap direction #1\", \"actual\": [99, 99, 49, 49, 49, 49], \"expected\": [99, 99, 49, 49, 49, 49], \"passed\": true}, {\"check\": \"fault site gray gap direction #2\", \"actual\": [3], \"expected\": [3], \"passed\": true}, {\"check\": \"partial repair boundary #1\", \"actual\": [30, 0, 0, 0, 0], \"expected\": [10, 0, 0, 0, 0], \"passed\": false}, {\"check\": \"partial repair boundary #2\", \"actual\": [30, 30, 0, 0, 0], \"expected\": [10, 10, 0, 0, 0], \"passed\": false}, {\"check\": \"crossing into half tier #1\", \"actual\": [101, 101, 50, 50], \"expected\": [101, 101, 50, 50], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [107, 107, 107, 107, 0, 0], \"expected\": [107, 107, 107, 107, 0, 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.517,"exit_code":1,"observations":[{"actual":[5,5,0],"check":"harder quest no penalty #1","expected":[25,25,0],"passed":false},{"actual":[19,19],"check":"gray quest #1","expected":[19,19],"passed":true},{"actual":[19,19,9,9,9,9],"check":"fault site gray gap direction #1","expected":[99,99,49,49,49,49],"passed":false},{"actual":[0],"check":"fault site gray gap direction #2","expected":[3],"passed":false},{"actual":[10,0,0,0,0],"check":"partial repair boundary #1","expected":[10,0,0,0,0],"passed":true},{"actual":[10,10,0,0,0],"check":"partial repair boundary #2","expected":[10,10,0,0,0],"passed":true},{"actual":[101,101,50,50],"check":"crossing into half tier #1","expected":[101,101,50,50],"passed":true},{"actual":[107,107,107,107,0,0],"check":"control #1","expected":[107,107,107,107,0,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"harder quest no penalty #1\", \"actual\": [5, 5, 0], \"expected\": [25, 25, 0], \"passed\": false}, {\"check\": \"gray quest #1\", \"actual\": [19, 19], \"expected\": [19, 19], \"passed\": true}, {\"check\": \"fault site gray gap direction #1\", \"actual\": [19, 19, 9, 9, 9, 9], \"expected\": [99, 99, 49, 49, 49, 49], \"passed\": false}, {\"check\": \"fault site gray gap direction #2\", \"actual\": [0], \"expected\": [3], \"passed\": false}, {\"check\": \"partial repair boundary #1\", \"actual\": [10, 0, 0, 0, 0], \"expected\": [10, 0, 0, 0, 0], \"passed\": true}, {\"check\": \"partial repair boundary #2\", \"actual\": [10, 10, 0, 0, 0], \"expected\": [10, 10, 0, 0, 0], \"passed\": true}, {\"check\": \"crossing into half tier #1\", \"actual\": [101, 101, 50, 50], \"expected\": [101, 101, 50, 50], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [107, 107, 107, 107, 0, 0], \"expected\": [107, 107, 107, 107, 0, 0], \"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."}}