FAILURE MAP
← Case archive

FA-86036 / Game economy crafting balance / Open access

Enchantment upgrade ladder: Protection is consumed when none remain · case 01

Items are protected by a phantom scroll and protection count goes negative.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The protection check admits zero remaining scrolls.

VERIFIED REPAIR

Restore `if protections > 0:` at the protection availability step.

Unsuccessful approach: Requiring two scrolls wastes the last scroll and lets the item degrade.

Case 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.

Why this case matters

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.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(level, rolls, protections):
    chance = [100, 100, 100, 90, 80, 70, 60, 50, 40, 30]
    used = 0
    broken = False
    for r in rolls:
        if level >= 10 or broken:
            break
        used += 1
        if r < chance[level]:
            level += 1
        elif level >= 6:
            if protections >= 0:
                protections -= 1
            elif level >= 8:
                broken = True
            else:
                level -= 1
    return {'level': level, 'broken': broken, 'protections': protections, 'used': used}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),
  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('regression protection availability #1',
   [9, [39, 30, 99, 29, 59, 99, 0], 1],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 2}),
  ('fault site protection availability #1',
   [9, [99, 30], 0],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),
  ('regression protection availability #2',
   [8, [49, 40, 59], 2],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),
  ('regression protection availability #3',
   [8, [89, 89], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 2}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1', [10, [90, 49, 29], 0], {'level': 10, 'broken': False, 'protections': 0, 'used': 0})],
 [('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('regression protection availability #1',
   [9, [39, 30, 99, 29, 59, 99, 0], 1],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 2}),
  ('fault site protection availability #1',
   [9, [99, 30], 0],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),
  ('regression protection availability #2',
   [8, [49, 40, 59], 2],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),
  ('regression protection availability #3',
   [8, [89, 89], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 2}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1',
   [0, [0, 30, 89, 99, 60, 0, 59, 59], 2],
   {'level': 7, 'broken': False, 'protections': 2, 'used': 8}),
  ('control #2',
   [10, [34, 29, 90, 63, 0, 60, 59], 0],
   {'level': 10, 'broken': False, 'protections': 0, 'used': 0})],
 [('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),
  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('fault site protection availability #1',
   [9, [50, 40, 50, 0, 40, 29, 0], 0],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),
  ('regression protection availability #1',
   [8, [49, 40, 59], 2],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),
  ('regression protection availability #2',
   [6, [40, 99, 50, 50, 29, 60], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 6}),
  ('regression protection availability #3',
   [8, [49, 29, 59, 0], 1],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 3}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1',
   [0, [0, 30, 89, 99, 60, 0, 59, 59], 2],
   {'level': 7, 'broken': False, 'protections': 2, 'used': 8})],
 [('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('regression protection availability #1',
   [8, [89, 89], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 2}),
  ('fault site protection availability #1',
   [6, [59, 50, 99, 50], 0],
   {'level': 6, 'broken': False, 'protections': 0, 'used': 4}),
  ('regression protection availability #2',
   [9, [89, 89, 89, 60, 0, 30, 40, 90], 1],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 2}),
  ('regression protection availability #3',
   [6, [47, 29, 60, 59, 39, 49, 59, 30], 2],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 6}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1', [0, [39, 49, 29, 0, 89], 0], {'level': 4, 'broken': False, 'protections': 0, 'used': 5}),
  ('control #2', [10, [29], 2], {'level': 10, 'broken': False, 'protections': 2, 'used': 0})],
 [('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),
  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('regression protection availability #1',
   [6, [40, 99, 50, 50, 29, 60], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 6}),
  ('fault site protection availability #1',
   [9, [30, 90, 40], 0],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),
  ('partial repair boundary #1',
   [8, [90, 90, 29, 29, 50, 99, 60, 60], 2],
   {'level': 10, 'broken': False, 'protections': 0, 'used': 4}),
  ('regression protection availability #2',
   [8, [49, 89, 60, 90, 39, 0, 89, 90], 2],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1', [8, [0, 0, 99, 40, 89], 0], {'level': 10, 'broken': False, 'protections': 0, 'used': 2})]]
for label, args, expected in cases[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
break at eight #1{'broken': False, 'level': 9, 'protections': -1, 'used': 2}{'broken': True, 'level': 8, 'protections': 0, 'used': 1}Failed
protected downgrade #1{'broken': False, 'level': 6, 'protections': -1, 'used': 2}{'broken': False, 'level': 5, 'protections': 0, 'used': 2}Failed
regression protection availability #1{'broken': True, 'level': 9, 'protections': -1, 'used': 3}{'broken': True, 'level': 9, 'protections': 0, 'used': 2}Failed
fault site protection availability #1{'broken': True, 'level': 9, 'protections': -1, 'used': 2}{'broken': True, 'level': 9, 'protections': 0, 'used': 1}Failed
regression protection availability #2{'broken': False, 'level': 8, 'protections': -1, 'used': 3}{'broken': True, 'level': 8, 'protections': 0, 'used': 3}Failed
regression protection availability #3{'broken': False, 'level': 8, 'protections': -1, 'used': 2}{'broken': True, 'level': 8, 'protections': 0, 'used': 2}Failed
boundary roll equals chance #1{'broken': False, 'level': 4, 'protections': 0, 'used': 1}{'broken': False, 'level': 4, 'protections': 0, 'used': 1}Passed
control #1{'broken': False, 'level': 10, 'protections': 0, 'used': 0}{'broken': False, 'level': 10, 'protections': 0, 'used': 0}Passed

SHA-256 / 4aece093236962100f5df31dacb994c3a821fe7b4dc815e5a13602e48ea6e0fd

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(level, rolls, protections):
    chance = [100, 100, 100, 90, 80, 70, 60, 50, 40, 30]
    used = 0
    broken = False
    for r in rolls:
        if level >= 10 or broken:
            break
        used += 1
        if r < chance[level]:
            level += 1
        elif level >= 6:
            if protections > 1:
                protections -= 1
            elif level >= 8:
                broken = True
            else:
                level -= 1
    return {'level': level, 'broken': broken, 'protections': protections, 'used': used}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),
  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('regression protection availability #1',
   [9, [39, 30, 99, 29, 59, 99, 0], 1],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 2}),
  ('fault site protection availability #1',
   [9, [99, 30], 0],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),
  ('regression protection availability #2',
   [8, [49, 40, 59], 2],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),
  ('regression protection availability #3',
   [8, [89, 89], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 2}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1', [10, [90, 49, 29], 0], {'level': 10, 'broken': False, 'protections': 0, 'used': 0})],
 [('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('regression protection availability #1',
   [9, [39, 30, 99, 29, 59, 99, 0], 1],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 2}),
  ('fault site protection availability #1',
   [9, [99, 30], 0],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),
  ('regression protection availability #2',
   [8, [49, 40, 59], 2],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),
  ('regression protection availability #3',
   [8, [89, 89], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 2}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1',
   [0, [0, 30, 89, 99, 60, 0, 59, 59], 2],
   {'level': 7, 'broken': False, 'protections': 2, 'used': 8}),
  ('control #2',
   [10, [34, 29, 90, 63, 0, 60, 59], 0],
   {'level': 10, 'broken': False, 'protections': 0, 'used': 0})],
 [('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),
  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('fault site protection availability #1',
   [9, [50, 40, 50, 0, 40, 29, 0], 0],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),
  ('regression protection availability #1',
   [8, [49, 40, 59], 2],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),
  ('regression protection availability #2',
   [6, [40, 99, 50, 50, 29, 60], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 6}),
  ('regression protection availability #3',
   [8, [49, 29, 59, 0], 1],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 3}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1',
   [0, [0, 30, 89, 99, 60, 0, 59, 59], 2],
   {'level': 7, 'broken': False, 'protections': 2, 'used': 8})],
 [('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('regression protection availability #1',
   [8, [89, 89], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 2}),
  ('fault site protection availability #1',
   [6, [59, 50, 99, 50], 0],
   {'level': 6, 'broken': False, 'protections': 0, 'used': 4}),
  ('regression protection availability #2',
   [9, [89, 89, 89, 60, 0, 30, 40, 90], 1],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 2}),
  ('regression protection availability #3',
   [6, [47, 29, 60, 59, 39, 49, 59, 30], 2],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 6}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1', [0, [39, 49, 29, 0, 89], 0], {'level': 4, 'broken': False, 'protections': 0, 'used': 5}),
  ('control #2', [10, [29], 2], {'level': 10, 'broken': False, 'protections': 2, 'used': 0})],
 [('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),
  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('regression protection availability #1',
   [6, [40, 99, 50, 50, 29, 60], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 6}),
  ('fault site protection availability #1',
   [9, [30, 90, 40], 0],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),
  ('partial repair boundary #1',
   [8, [90, 90, 29, 29, 50, 99, 60, 60], 2],
   {'level': 10, 'broken': False, 'protections': 0, 'used': 4}),
  ('regression protection availability #2',
   [8, [49, 89, 60, 90, 39, 0, 89, 90], 2],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1', [8, [0, 0, 99, 40, 89], 0], {'level': 10, 'broken': False, 'protections': 0, 'used': 2})]]
for label, args, expected in cases[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
break at eight #1{'broken': True, 'level': 8, 'protections': 0, 'used': 1}{'broken': True, 'level': 8, 'protections': 0, 'used': 1}Passed
protected downgrade #1{'broken': False, 'level': 5, 'protections': 1, 'used': 2}{'broken': False, 'level': 5, 'protections': 0, 'used': 2}Failed
regression protection availability #1{'broken': True, 'level': 9, 'protections': 1, 'used': 1}{'broken': True, 'level': 9, 'protections': 0, 'used': 2}Failed
fault site protection availability #1{'broken': True, 'level': 9, 'protections': 0, 'used': 1}{'broken': True, 'level': 9, 'protections': 0, 'used': 1}Passed
regression protection availability #2{'broken': True, 'level': 8, 'protections': 1, 'used': 2}{'broken': True, 'level': 8, 'protections': 0, 'used': 3}Failed
regression protection availability #3{'broken': True, 'level': 8, 'protections': 1, 'used': 1}{'broken': True, 'level': 8, 'protections': 0, 'used': 2}Failed
boundary roll equals chance #1{'broken': False, 'level': 4, 'protections': 0, 'used': 1}{'broken': False, 'level': 4, 'protections': 0, 'used': 1}Passed
control #1{'broken': False, 'level': 10, 'protections': 0, 'used': 0}{'broken': False, 'level': 10, 'protections': 0, 'used': 0}Passed

SHA-256 / fb8c2680d7d0bee35e48dd623a52c7a3c6055caee138b3f2759bd2651538b981

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(level, rolls, protections):
    chance = [100, 100, 100, 90, 80, 70, 60, 50, 40, 30]
    used = 0
    broken = False
    for r in rolls:
        if level >= 10 or broken:
            break
        used += 1
        if r < chance[level]:
            level += 1
        elif level >= 6:
            if protections > 0:
                protections -= 1
            elif level >= 8:
                broken = True
            else:
                level -= 1
    return {'level': level, 'broken': broken, 'protections': protections, 'used': used}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),
  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('regression protection availability #1',
   [9, [39, 30, 99, 29, 59, 99, 0], 1],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 2}),
  ('fault site protection availability #1',
   [9, [99, 30], 0],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),
  ('regression protection availability #2',
   [8, [49, 40, 59], 2],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),
  ('regression protection availability #3',
   [8, [89, 89], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 2}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1', [10, [90, 49, 29], 0], {'level': 10, 'broken': False, 'protections': 0, 'used': 0})],
 [('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('regression protection availability #1',
   [9, [39, 30, 99, 29, 59, 99, 0], 1],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 2}),
  ('fault site protection availability #1',
   [9, [99, 30], 0],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),
  ('regression protection availability #2',
   [8, [49, 40, 59], 2],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),
  ('regression protection availability #3',
   [8, [89, 89], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 2}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1',
   [0, [0, 30, 89, 99, 60, 0, 59, 59], 2],
   {'level': 7, 'broken': False, 'protections': 2, 'used': 8}),
  ('control #2',
   [10, [34, 29, 90, 63, 0, 60, 59], 0],
   {'level': 10, 'broken': False, 'protections': 0, 'used': 0})],
 [('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),
  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('fault site protection availability #1',
   [9, [50, 40, 50, 0, 40, 29, 0], 0],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),
  ('regression protection availability #1',
   [8, [49, 40, 59], 2],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),
  ('regression protection availability #2',
   [6, [40, 99, 50, 50, 29, 60], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 6}),
  ('regression protection availability #3',
   [8, [49, 29, 59, 0], 1],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 3}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1',
   [0, [0, 30, 89, 99, 60, 0, 59, 59], 2],
   {'level': 7, 'broken': False, 'protections': 2, 'used': 8})],
 [('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('regression protection availability #1',
   [8, [89, 89], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 2}),
  ('fault site protection availability #1',
   [6, [59, 50, 99, 50], 0],
   {'level': 6, 'broken': False, 'protections': 0, 'used': 4}),
  ('regression protection availability #2',
   [9, [89, 89, 89, 60, 0, 30, 40, 90], 1],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 2}),
  ('regression protection availability #3',
   [6, [47, 29, 60, 59, 39, 49, 59, 30], 2],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 6}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1', [0, [39, 49, 29, 0, 89], 0], {'level': 4, 'broken': False, 'protections': 0, 'used': 5}),
  ('control #2', [10, [29], 2], {'level': 10, 'broken': False, 'protections': 2, 'used': 0})],
 [('break at eight #1', [8, [95, 0], 0], {'level': 8, 'broken': True, 'protections': 0, 'used': 1}),
  ('protected downgrade #1', [6, [70, 70], 1], {'level': 5, 'broken': False, 'protections': 0, 'used': 2}),
  ('regression protection availability #1',
   [6, [40, 99, 50, 50, 29, 60], 1],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 6}),
  ('fault site protection availability #1',
   [9, [30, 90, 40], 0],
   {'level': 9, 'broken': True, 'protections': 0, 'used': 1}),
  ('partial repair boundary #1',
   [8, [90, 90, 29, 29, 50, 99, 60, 60], 2],
   {'level': 10, 'broken': False, 'protections': 0, 'used': 4}),
  ('regression protection availability #2',
   [8, [49, 89, 60, 90, 39, 0, 89, 90], 2],
   {'level': 8, 'broken': True, 'protections': 0, 'used': 3}),
  ('boundary roll equals chance #1',
   [4, [80], 0],
   {'level': 4, 'broken': False, 'protections': 0, 'used': 1}),
  ('control #1', [8, [0, 0, 99, 40, 89], 0], {'level': 10, 'broken': False, 'protections': 0, 'used': 2})]]
for label, args, expected in cases[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
break at eight #1{'broken': True, 'level': 8, 'protections': 0, 'used': 1}{'broken': True, 'level': 8, 'protections': 0, 'used': 1}Passed
protected downgrade #1{'broken': False, 'level': 5, 'protections': 0, 'used': 2}{'broken': False, 'level': 5, 'protections': 0, 'used': 2}Passed
regression protection availability #1{'broken': True, 'level': 9, 'protections': 0, 'used': 2}{'broken': True, 'level': 9, 'protections': 0, 'used': 2}Passed
fault site protection availability #1{'broken': True, 'level': 9, 'protections': 0, 'used': 1}{'broken': True, 'level': 9, 'protections': 0, 'used': 1}Passed
regression protection availability #2{'broken': True, 'level': 8, 'protections': 0, 'used': 3}{'broken': True, 'level': 8, 'protections': 0, 'used': 3}Passed
regression protection availability #3{'broken': True, 'level': 8, 'protections': 0, 'used': 2}{'broken': True, 'level': 8, 'protections': 0, 'used': 2}Passed
boundary roll equals chance #1{'broken': False, 'level': 4, 'protections': 0, 'used': 1}{'broken': False, 'level': 4, 'protections': 0, 'used': 1}Passed
control #1{'broken': False, 'level': 10, 'protections': 0, 'used': 0}{'broken': False, 'level': 10, 'protections': 0, 'used': 0}Passed

SHA-256 / 0e1e6c32a16a702686fa1e022e5ed6b3c25cf61cbddbe120322ca8b940436302

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-29T14:50:45.792895+00:00.

Case digest / a813647e65d49d420932194a2425aa22ca59c2c51b28bea4b36653945d13c562