FAILURE MAP
← Case archive

FA-85886 / Game economy crafting balance / Open access

Salvage component return: Indestructible items salvage as scrap · case 01

Relics without durability are treated as broken and return only scrap.

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

ROOT CAUSE

The indestructible branch sets condition to zero instead of full.

VERIFIED REPAIR

Restore `if mx == 0: d, mx = 1, 1` at the indestructible condition step.

Unsuccessful approach: Only fixing the divisor keeps the raw durability field, which is meaningless for indestructible items.

Case contract

Return rate: common 50%, rare 70%, epic 90%. Condition d/mx with d clamped to mx; max_durability 0 means indestructible (full condition). Durability <= 0 yields {"scrap": 1}. Each component amount = floor(count*pct*d/(100*mx)) computed once; rare and epic items return at least 1 of each component; zero amounts are omitted.

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(item, components):
    pct = {'common': 50, 'rare': 70, 'epic': 90}[item['rarity']]
    mx = item['max_durability']
    if mx == 0:
        d, mx = 0, 1
    else:
        d = min(item['durability'], mx)
    if d <= 0:
        return {'scrap': 1}
    out = {}
    for name, count in components.items():
        amt = count * pct * d // (100 * mx)
        if item['rarity'] != 'common' and amt < 1:
            amt = 1
        if amt:
            out[name] = amt
    return dict(sorted(out.items()))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('fault site indestructible condition #1',
   [{'rarity': 'rare', 'durability': 1, 'max_durability': 0}, {'cloth': 5, 'ingot': 4, 'shard': 1}],
   {'cloth': 3, 'ingot': 2, 'shard': 1}),
  ('fault site indestructible condition #2',
   [{'rarity': 'common', 'durability': 1, 'max_durability': 0}, {'shard': 2, 'ingot': 2, 'thread': 6}],
   {'ingot': 1, 'shard': 1, 'thread': 3}),
  ('regression indestructible condition #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'thread': 6, 'shard': 4}],
   {'shard': 2, 'thread': 3}),
  ('regression indestructible condition #2',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'cloth': 6}],
   {'cloth': 3}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1',
   [{'rarity': 'common', 'durability': 3, 'max_durability': 10}, {'thread': 4, 'cloth': 5}],
   {})],
 [('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('fault site indestructible condition #1',
   [{'rarity': 'common', 'durability': 1, 'max_durability': 0}, {'shard': 2, 'ingot': 2, 'thread': 6}],
   {'ingot': 1, 'shard': 1, 'thread': 3}),
  ('fault site indestructible condition #2',
   [{'rarity': 'common', 'durability': 1, 'max_durability': 0}, {'cloth': 6, 'ingot': 2}],
   {'cloth': 3, 'ingot': 1}),
  ('regression indestructible condition #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'cloth': 6}],
   {'cloth': 3}),
  ('regression indestructible condition #2',
   [{'rarity': 'rare', 'durability': 5, 'max_durability': 0}, {'cloth': 3, 'ingot': 6, 'shard': 3}],
   {'cloth': 2, 'ingot': 4, 'shard': 2}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1',
   [{'rarity': 'common', 'durability': 3, 'max_durability': 10}, {'thread': 4, 'cloth': 5}],
   {})],
 [('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('regression indestructible condition #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'thread': 6, 'shard': 4}],
   {'shard': 2, 'thread': 3}),
  ('fault site indestructible condition #1',
   [{'rarity': 'common', 'durability': 1, 'max_durability': 0}, {'cloth': 6, 'ingot': 6}],
   {'cloth': 3, 'ingot': 3}),
  ('regression indestructible condition #2',
   [{'rarity': 'rare', 'durability': 5, 'max_durability': 0}, {'thread': 6, 'cloth': 1, 'shard': 3}],
   {'cloth': 1, 'shard': 2, 'thread': 4}),
  ('regression indestructible condition #3',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5, 'cloth': 5, 'thread': 3}],
   {'cloth': 4, 'shard': 4, 'thread': 2}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1',
   [{'rarity': 'common', 'durability': 3, 'max_durability': 10}, {'thread': 4, 'cloth': 5}],
   {})],
 [('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('fault site indestructible condition #1',
   [{'rarity': 'epic', 'durability': 1, 'max_durability': 0}, {'shard': 3, 'ingot': 4}],
   {'ingot': 3, 'shard': 2}),
  ('regression indestructible condition #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'cloth': 6}],
   {'cloth': 3}),
  ('regression indestructible condition #2',
   [{'rarity': 'common', 'durability': 3, 'max_durability': 0}, {'thread': 5, 'ingot': 6}],
   {'ingot': 3, 'thread': 2}),
  ('regression indestructible condition #3',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 0}, {'shard': 2, 'ingot': 5}],
   {'ingot': 3, 'shard': 1}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1', [{'rarity': 'rare', 'durability': 0, 'max_durability': 100}, {'shard': 5}], {'scrap': 1})],
 [('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('regression indestructible condition #1',
   [{'rarity': 'rare', 'durability': 5, 'max_durability': 0}, {'cloth': 3, 'ingot': 6, 'shard': 3}],
   {'cloth': 2, 'ingot': 4, 'shard': 2}),
  ('regression indestructible condition #2',
   [{'rarity': 'rare', 'durability': 5, 'max_durability': 0}, {'thread': 6, 'cloth': 1, 'shard': 3}],
   {'cloth': 1, 'shard': 2, 'thread': 4}),
  ('regression indestructible condition #3',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'cloth': 6, 'thread': 4, 'ingot': 5}],
   {'cloth': 5, 'ingot': 4, 'thread': 3}),
  ('regression indestructible condition #4',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 0}, {'thread': 4}],
   {'thread': 2}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 100}, {'cloth': 6, 'thread': 1}],
   {'scrap': 1})]]
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
indestructible relic #1{'scrap': 1}{'shard': 4}Failed
fault site indestructible condition #1{'scrap': 1}{'cloth': 3, 'ingot': 2, 'shard': 1}Failed
fault site indestructible condition #2{'scrap': 1}{'ingot': 1, 'shard': 1, 'thread': 3}Failed
regression indestructible condition #1{'scrap': 1}{'shard': 2, 'thread': 3}Failed
regression indestructible condition #2{'scrap': 1}{'cloth': 3}Failed
over-repaired common #1{'cloth': 1, 'ingot': 2}{'cloth': 1, 'ingot': 2}Passed
broken rare #1{'scrap': 1}{'scrap': 1}Passed
control #1{}{}Passed

SHA-256 / 5ce142e0853807917122e21dbd9556177744fdd3ab43d8e5a1fe5518b1d6e6f0

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(item, components):
    pct = {'common': 50, 'rare': 70, 'epic': 90}[item['rarity']]
    mx = item['max_durability']
    if mx == 0:
        d, mx = item['durability'], 1
    else:
        d = min(item['durability'], mx)
    if d <= 0:
        return {'scrap': 1}
    out = {}
    for name, count in components.items():
        amt = count * pct * d // (100 * mx)
        if item['rarity'] != 'common' and amt < 1:
            amt = 1
        if amt:
            out[name] = amt
    return dict(sorted(out.items()))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('fault site indestructible condition #1',
   [{'rarity': 'rare', 'durability': 1, 'max_durability': 0}, {'cloth': 5, 'ingot': 4, 'shard': 1}],
   {'cloth': 3, 'ingot': 2, 'shard': 1}),
  ('fault site indestructible condition #2',
   [{'rarity': 'common', 'durability': 1, 'max_durability': 0}, {'shard': 2, 'ingot': 2, 'thread': 6}],
   {'ingot': 1, 'shard': 1, 'thread': 3}),
  ('regression indestructible condition #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'thread': 6, 'shard': 4}],
   {'shard': 2, 'thread': 3}),
  ('regression indestructible condition #2',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'cloth': 6}],
   {'cloth': 3}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1',
   [{'rarity': 'common', 'durability': 3, 'max_durability': 10}, {'thread': 4, 'cloth': 5}],
   {})],
 [('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('fault site indestructible condition #1',
   [{'rarity': 'common', 'durability': 1, 'max_durability': 0}, {'shard': 2, 'ingot': 2, 'thread': 6}],
   {'ingot': 1, 'shard': 1, 'thread': 3}),
  ('fault site indestructible condition #2',
   [{'rarity': 'common', 'durability': 1, 'max_durability': 0}, {'cloth': 6, 'ingot': 2}],
   {'cloth': 3, 'ingot': 1}),
  ('regression indestructible condition #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'cloth': 6}],
   {'cloth': 3}),
  ('regression indestructible condition #2',
   [{'rarity': 'rare', 'durability': 5, 'max_durability': 0}, {'cloth': 3, 'ingot': 6, 'shard': 3}],
   {'cloth': 2, 'ingot': 4, 'shard': 2}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1',
   [{'rarity': 'common', 'durability': 3, 'max_durability': 10}, {'thread': 4, 'cloth': 5}],
   {})],
 [('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('regression indestructible condition #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'thread': 6, 'shard': 4}],
   {'shard': 2, 'thread': 3}),
  ('fault site indestructible condition #1',
   [{'rarity': 'common', 'durability': 1, 'max_durability': 0}, {'cloth': 6, 'ingot': 6}],
   {'cloth': 3, 'ingot': 3}),
  ('regression indestructible condition #2',
   [{'rarity': 'rare', 'durability': 5, 'max_durability': 0}, {'thread': 6, 'cloth': 1, 'shard': 3}],
   {'cloth': 1, 'shard': 2, 'thread': 4}),
  ('regression indestructible condition #3',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5, 'cloth': 5, 'thread': 3}],
   {'cloth': 4, 'shard': 4, 'thread': 2}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1',
   [{'rarity': 'common', 'durability': 3, 'max_durability': 10}, {'thread': 4, 'cloth': 5}],
   {})],
 [('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('fault site indestructible condition #1',
   [{'rarity': 'epic', 'durability': 1, 'max_durability': 0}, {'shard': 3, 'ingot': 4}],
   {'ingot': 3, 'shard': 2}),
  ('regression indestructible condition #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'cloth': 6}],
   {'cloth': 3}),
  ('regression indestructible condition #2',
   [{'rarity': 'common', 'durability': 3, 'max_durability': 0}, {'thread': 5, 'ingot': 6}],
   {'ingot': 3, 'thread': 2}),
  ('regression indestructible condition #3',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 0}, {'shard': 2, 'ingot': 5}],
   {'ingot': 3, 'shard': 1}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1', [{'rarity': 'rare', 'durability': 0, 'max_durability': 100}, {'shard': 5}], {'scrap': 1})],
 [('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('regression indestructible condition #1',
   [{'rarity': 'rare', 'durability': 5, 'max_durability': 0}, {'cloth': 3, 'ingot': 6, 'shard': 3}],
   {'cloth': 2, 'ingot': 4, 'shard': 2}),
  ('regression indestructible condition #2',
   [{'rarity': 'rare', 'durability': 5, 'max_durability': 0}, {'thread': 6, 'cloth': 1, 'shard': 3}],
   {'cloth': 1, 'shard': 2, 'thread': 4}),
  ('regression indestructible condition #3',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'cloth': 6, 'thread': 4, 'ingot': 5}],
   {'cloth': 5, 'ingot': 4, 'thread': 3}),
  ('regression indestructible condition #4',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 0}, {'thread': 4}],
   {'thread': 2}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 100}, {'cloth': 6, 'thread': 1}],
   {'scrap': 1})]]
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
indestructible relic #1{'scrap': 1}{'shard': 4}Failed
fault site indestructible condition #1{'cloth': 3, 'ingot': 2, 'shard': 1}{'cloth': 3, 'ingot': 2, 'shard': 1}Passed
fault site indestructible condition #2{'ingot': 1, 'shard': 1, 'thread': 3}{'ingot': 1, 'shard': 1, 'thread': 3}Passed
regression indestructible condition #1{'scrap': 1}{'shard': 2, 'thread': 3}Failed
regression indestructible condition #2{'scrap': 1}{'cloth': 3}Failed
over-repaired common #1{'cloth': 1, 'ingot': 2}{'cloth': 1, 'ingot': 2}Passed
broken rare #1{'scrap': 1}{'scrap': 1}Passed
control #1{}{}Passed

SHA-256 / eed2961e6fb382fe8c2e9acea25a8bc452c32c8cc7f3c8176178de7e4d483a89

3 / The verified repair

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

N = 1
observations = []
def solve(item, components):
    pct = {'common': 50, 'rare': 70, 'epic': 90}[item['rarity']]
    mx = item['max_durability']
    if mx == 0:
        d, mx = 1, 1
    else:
        d = min(item['durability'], mx)
    if d <= 0:
        return {'scrap': 1}
    out = {}
    for name, count in components.items():
        amt = count * pct * d // (100 * mx)
        if item['rarity'] != 'common' and amt < 1:
            amt = 1
        if amt:
            out[name] = amt
    return dict(sorted(out.items()))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('fault site indestructible condition #1',
   [{'rarity': 'rare', 'durability': 1, 'max_durability': 0}, {'cloth': 5, 'ingot': 4, 'shard': 1}],
   {'cloth': 3, 'ingot': 2, 'shard': 1}),
  ('fault site indestructible condition #2',
   [{'rarity': 'common', 'durability': 1, 'max_durability': 0}, {'shard': 2, 'ingot': 2, 'thread': 6}],
   {'ingot': 1, 'shard': 1, 'thread': 3}),
  ('regression indestructible condition #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'thread': 6, 'shard': 4}],
   {'shard': 2, 'thread': 3}),
  ('regression indestructible condition #2',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'cloth': 6}],
   {'cloth': 3}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1',
   [{'rarity': 'common', 'durability': 3, 'max_durability': 10}, {'thread': 4, 'cloth': 5}],
   {})],
 [('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('fault site indestructible condition #1',
   [{'rarity': 'common', 'durability': 1, 'max_durability': 0}, {'shard': 2, 'ingot': 2, 'thread': 6}],
   {'ingot': 1, 'shard': 1, 'thread': 3}),
  ('fault site indestructible condition #2',
   [{'rarity': 'common', 'durability': 1, 'max_durability': 0}, {'cloth': 6, 'ingot': 2}],
   {'cloth': 3, 'ingot': 1}),
  ('regression indestructible condition #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'cloth': 6}],
   {'cloth': 3}),
  ('regression indestructible condition #2',
   [{'rarity': 'rare', 'durability': 5, 'max_durability': 0}, {'cloth': 3, 'ingot': 6, 'shard': 3}],
   {'cloth': 2, 'ingot': 4, 'shard': 2}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1',
   [{'rarity': 'common', 'durability': 3, 'max_durability': 10}, {'thread': 4, 'cloth': 5}],
   {})],
 [('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('regression indestructible condition #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'thread': 6, 'shard': 4}],
   {'shard': 2, 'thread': 3}),
  ('fault site indestructible condition #1',
   [{'rarity': 'common', 'durability': 1, 'max_durability': 0}, {'cloth': 6, 'ingot': 6}],
   {'cloth': 3, 'ingot': 3}),
  ('regression indestructible condition #2',
   [{'rarity': 'rare', 'durability': 5, 'max_durability': 0}, {'thread': 6, 'cloth': 1, 'shard': 3}],
   {'cloth': 1, 'shard': 2, 'thread': 4}),
  ('regression indestructible condition #3',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5, 'cloth': 5, 'thread': 3}],
   {'cloth': 4, 'shard': 4, 'thread': 2}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1',
   [{'rarity': 'common', 'durability': 3, 'max_durability': 10}, {'thread': 4, 'cloth': 5}],
   {})],
 [('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('fault site indestructible condition #1',
   [{'rarity': 'epic', 'durability': 1, 'max_durability': 0}, {'shard': 3, 'ingot': 4}],
   {'ingot': 3, 'shard': 2}),
  ('regression indestructible condition #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 0}, {'cloth': 6}],
   {'cloth': 3}),
  ('regression indestructible condition #2',
   [{'rarity': 'common', 'durability': 3, 'max_durability': 0}, {'thread': 5, 'ingot': 6}],
   {'ingot': 3, 'thread': 2}),
  ('regression indestructible condition #3',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 0}, {'shard': 2, 'ingot': 5}],
   {'ingot': 3, 'shard': 1}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1', [{'rarity': 'rare', 'durability': 0, 'max_durability': 100}, {'shard': 5}], {'scrap': 1})],
 [('indestructible relic #1',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'shard': 5}],
   {'shard': 4}),
  ('regression indestructible condition #1',
   [{'rarity': 'rare', 'durability': 5, 'max_durability': 0}, {'cloth': 3, 'ingot': 6, 'shard': 3}],
   {'cloth': 2, 'ingot': 4, 'shard': 2}),
  ('regression indestructible condition #2',
   [{'rarity': 'rare', 'durability': 5, 'max_durability': 0}, {'thread': 6, 'cloth': 1, 'shard': 3}],
   {'cloth': 1, 'shard': 2, 'thread': 4}),
  ('regression indestructible condition #3',
   [{'rarity': 'epic', 'durability': 0, 'max_durability': 0}, {'cloth': 6, 'thread': 4, 'ingot': 5}],
   {'cloth': 5, 'ingot': 4, 'thread': 3}),
  ('regression indestructible condition #4',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 0}, {'thread': 4}],
   {'thread': 2}),
  ('over-repaired common #1',
   [{'rarity': 'common', 'durability': 30, 'max_durability': 20}, {'ingot': 4, 'cloth': 3}],
   {'cloth': 1, 'ingot': 2}),
  ('broken rare #1',
   [{'rarity': 'rare', 'durability': 0, 'max_durability': 40}, {'thread': 2}],
   {'scrap': 1}),
  ('control #1',
   [{'rarity': 'common', 'durability': 0, 'max_durability': 100}, {'cloth': 6, 'thread': 1}],
   {'scrap': 1})]]
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
indestructible relic #1{'shard': 4}{'shard': 4}Passed
fault site indestructible condition #1{'cloth': 3, 'ingot': 2, 'shard': 1}{'cloth': 3, 'ingot': 2, 'shard': 1}Passed
fault site indestructible condition #2{'ingot': 1, 'shard': 1, 'thread': 3}{'ingot': 1, 'shard': 1, 'thread': 3}Passed
regression indestructible condition #1{'shard': 2, 'thread': 3}{'shard': 2, 'thread': 3}Passed
regression indestructible condition #2{'cloth': 3}{'cloth': 3}Passed
over-repaired common #1{'cloth': 1, 'ingot': 2}{'cloth': 1, 'ingot': 2}Passed
broken rare #1{'scrap': 1}{'scrap': 1}Passed
control #1{}{}Passed

SHA-256 / f8c9bdc79b6f2d976e3c61317dd71c71f1b78725cc09cebc75711f19d25b8e0a

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:44.440378+00:00.

Case digest / a6e88cb2be44dbb7978dcd105f3e781176488e178d6f7ef14822ad336070259e