{"abstract":"The first diminished completion pays full reward.","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":"Shifting the index by one cuts the fifth completion to half.","family":"w2-game-economy-crafting-balance-quest-diminish-full-tier-boundary","id":"FA-86141","implementations":{"attempt":{"sha256":"ffa8975d51cd2a30d3d6d07ced48dd04558486fcbbe44a960e578f847551ba78","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 + 1 < 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 = [[('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('regression full tier boundary #1', [3, 4, 101, 31, 28], [60, 60, 30, 30]),\n  ('regression full tier boundary #2', [3, 6, 99, 59, 64], [99, 99, 49, 49, 49, 49]),\n  ('regression full tier boundary #3', [1, 6, 7, 45, 37], [1, 1, 1, 1, 0, 0]),\n  ('regression full tier boundary #4', [2, 6, 99, 10, 9], [99, 99, 99, 49, 49, 49]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0])],\n [('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('regression full tier boundary #1', [3, 6, 99, 59, 64], [99, 99, 49, 49, 49, 49]),\n  ('regression full tier boundary #2', [1, 6, 7, 45, 37], [1, 1, 1, 1, 0, 0]),\n  ('regression full tier boundary #3', [2, 6, 99, 10, 9], [99, 99, 99, 49, 49, 49]),\n  ('regression full tier boundary #4', [2, 5, 7, 22, 25], [7, 7, 7, 3, 3]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0])],\n [('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('regression full tier boundary #1', [2, 6, 99, 10, 9], [99, 99, 99, 49, 49, 49]),\n  ('regression full tier boundary #2', [2, 5, 7, 22, 25], [7, 7, 7, 3, 3]),\n  ('regression full tier boundary #3', [2, 6, 19, 24, 32], [19, 19, 19, 9, 9, 9]),\n  ('partial repair boundary #1', [3, 2, 1, 60, 66], [1, 1]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0])],\n [('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('regression full tier boundary #1', [2, 6, 19, 24, 32], [19, 19, 19, 9, 9, 9]),\n  ('fault site full tier boundary #1', [5, 4, 99, 57, 56], [49, 49, 49, 49]),\n  ('partial repair boundary #1', [3, 2, 1, 60, 66], [1, 1]),\n  ('regression full tier boundary #2', [4, 6, 1, 4, 9], [1, 0, 0, 0, 0, 0]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [8, 2, 1, 33, 25], [0, 0])],\n [('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('regression full tier boundary #1', [4, 6, 1, 4, 9], [1, 0, 0, 0, 0, 0]),\n  ('regression full tier boundary #2', [2, 4, 7, 16, 12], [4, 4, 4, 2]),\n  ('regression full tier boundary #3', [3, 3, 3, 2, 5], [3, 3, 1]),\n  ('regression full tier boundary #4', [2, 5, 7, 20, 16], [4, 4, 4, 2, 2]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\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":"e7dea85d7b7e400f749af9a7265ff33dca0b4c84d63d9d0481773dcf178c0107","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 = [[('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('regression full tier boundary #1', [3, 4, 101, 31, 28], [60, 60, 30, 30]),\n  ('regression full tier boundary #2', [3, 6, 99, 59, 64], [99, 99, 49, 49, 49, 49]),\n  ('regression full tier boundary #3', [1, 6, 7, 45, 37], [1, 1, 1, 1, 0, 0]),\n  ('regression full tier boundary #4', [2, 6, 99, 10, 9], [99, 99, 99, 49, 49, 49]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0])],\n [('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('regression full tier boundary #1', [3, 6, 99, 59, 64], [99, 99, 49, 49, 49, 49]),\n  ('regression full tier boundary #2', [1, 6, 7, 45, 37], [1, 1, 1, 1, 0, 0]),\n  ('regression full tier boundary #3', [2, 6, 99, 10, 9], [99, 99, 99, 49, 49, 49]),\n  ('regression full tier boundary #4', [2, 5, 7, 22, 25], [7, 7, 7, 3, 3]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0])],\n [('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('regression full tier boundary #1', [2, 6, 99, 10, 9], [99, 99, 99, 49, 49, 49]),\n  ('regression full tier boundary #2', [2, 5, 7, 22, 25], [7, 7, 7, 3, 3]),\n  ('regression full tier boundary #3', [2, 6, 19, 24, 32], [19, 19, 19, 9, 9, 9]),\n  ('partial repair boundary #1', [3, 2, 1, 60, 66], [1, 1]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0])],\n [('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('regression full tier boundary #1', [2, 6, 19, 24, 32], [19, 19, 19, 9, 9, 9]),\n  ('fault site full tier boundary #1', [5, 4, 99, 57, 56], [49, 49, 49, 49]),\n  ('partial repair boundary #1', [3, 2, 1, 60, 66], [1, 1]),\n  ('regression full tier boundary #2', [4, 6, 1, 4, 9], [1, 0, 0, 0, 0, 0]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [8, 2, 1, 33, 25], [0, 0])],\n [('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('regression full tier boundary #1', [4, 6, 1, 4, 9], [1, 0, 0, 0, 0, 0]),\n  ('regression full tier boundary #2', [2, 4, 7, 16, 12], [4, 4, 4, 2]),\n  ('regression full tier boundary #3', [3, 3, 3, 2, 5], [3, 3, 1]),\n  ('regression full tier boundary #4', [2, 5, 7, 20, 16], [4, 4, 4, 2, 2]),\n  ('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\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-full-tier-boundary","generated_at":"2026-09-29T14:50:46.858763+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 full-reward tier comparison is inclusive.","sha256":"1ea2b040b8924e5a4dec2f18834c74677aad4846ae02c437b9594d4e206fdcf6","title":"Repeatable quest rewards: Sixth completion pays full · 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.273,"exit_code":1,"observations":[{"actual":[101,50,50,50],"check":"crossing into half tier #1","expected":[101,101,50,50],"passed":false},{"actual":[60,30,30,30],"check":"regression full tier boundary #1","expected":[60,60,30,30],"passed":false},{"actual":[99,49,49,49,49,49],"check":"regression full tier boundary #2","expected":[99,99,49,49,49,49],"passed":false},{"actual":[1,1,1,0,0,0],"check":"regression full tier boundary #3","expected":[1,1,1,1,0,0],"passed":false},{"actual":[99,99,49,49,49,49],"check":"regression full tier boundary #4","expected":[99,99,99,49,49,49],"passed":false},{"actual":[19,19],"check":"gray quest #1","expected":[19,19],"passed":true},{"actual":[25,25,0],"check":"harder quest no penalty #1","expected":[25,25,0],"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\": \"crossing into half tier #1\", \"actual\": [101, 50, 50, 50], \"expected\": [101, 101, 50, 50], \"passed\": false}, {\"check\": \"regression full tier boundary #1\", \"actual\": [60, 30, 30, 30], \"expected\": [60, 60, 30, 30], \"passed\": false}, {\"check\": \"regression full tier boundary #2\", \"actual\": [99, 49, 49, 49, 49, 49], \"expected\": [99, 99, 49, 49, 49, 49], \"passed\": false}, {\"check\": \"regression full tier boundary #3\", \"actual\": [1, 1, 1, 0, 0, 0], \"expected\": [1, 1, 1, 1, 0, 0], \"passed\": false}, {\"check\": \"regression full tier boundary #4\", \"actual\": [99, 99, 49, 49, 49, 49], \"expected\": [99, 99, 99, 49, 49, 49], \"passed\": false}, {\"check\": \"gray quest #1\", \"actual\": [19, 19], \"expected\": [19, 19], \"passed\": true}, {\"check\": \"harder quest no penalty #1\", \"actual\": [25, 25, 0], \"expected\": [25, 25, 0], \"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.341,"exit_code":1,"observations":[{"actual":[101,101,101,50],"check":"crossing into half tier #1","expected":[101,101,50,50],"passed":false},{"actual":[60,60,60,30],"check":"regression full tier boundary #1","expected":[60,60,30,30],"passed":false},{"actual":[99,99,99,49,49,49],"check":"regression full tier boundary #2","expected":[99,99,49,49,49,49],"passed":false},{"actual":[1,1,1,1,1,0],"check":"regression full tier boundary #3","expected":[1,1,1,1,0,0],"passed":false},{"actual":[99,99,99,99,49,49],"check":"regression full tier boundary #4","expected":[99,99,99,49,49,49],"passed":false},{"actual":[19,19],"check":"gray quest #1","expected":[19,19],"passed":true},{"actual":[25,25,0],"check":"harder quest no penalty #1","expected":[25,25,0],"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\": \"crossing into half tier #1\", \"actual\": [101, 101, 101, 50], \"expected\": [101, 101, 50, 50], \"passed\": false}, {\"check\": \"regression full tier boundary #1\", \"actual\": [60, 60, 60, 30], \"expected\": [60, 60, 30, 30], \"passed\": false}, {\"check\": \"regression full tier boundary #2\", \"actual\": [99, 99, 99, 49, 49, 49], \"expected\": [99, 99, 49, 49, 49, 49], \"passed\": false}, {\"check\": \"regression full tier boundary #3\", \"actual\": [1, 1, 1, 1, 1, 0], \"expected\": [1, 1, 1, 1, 0, 0], \"passed\": false}, {\"check\": \"regression full tier boundary #4\", \"actual\": [99, 99, 99, 99, 49, 49], \"expected\": [99, 99, 99, 49, 49, 49], \"passed\": false}, {\"check\": \"gray quest #1\", \"actual\": [19, 19], \"expected\": [19, 19], \"passed\": true}, {\"check\": \"harder quest no penalty #1\", \"actual\": [25, 25, 0], \"expected\": [25, 25, 0], \"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."}}