FA-86246 / Game economy crafting balance / Open access
Profession skill-up colors: Gray recipes still grant skill · case 01
Trivial recipes keep leveling the profession.
ROOT CAUSE
The gray branch is missing and gray recipes keep the green chance.
THE FAILURE
The gray branch is missing and gray recipes keep the green chance.
Unsuccessful approach: Including the gray threshold keeps one gray level green.
Case contract
recipe_levels = [learn, yellow, green, gray]. Skill below learn cannot craft (error "too low"). Per roll (0..99), while skill < 300: chance 100 below yellow (orange), 75 below green, 25 below gray, else 0; the skill goes up when roll < chance and the color is re-evaluated each craft.
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(skill, recipe_levels, rolls):
learn, yellow, green, gray = recipe_levels
if skill < learn:
return {'skill': skill, 'ups': 0, 'error': 'too low'}
ups = 0
for r in rolls:
if skill >= 300:
break
if skill < yellow:
chance = 100
elif skill < green:
chance = 75
else:
chance = 25
if r < chance:
skill += 1
ups += 1
return {'skill': skill, 'ups': ups}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('gray recipe roll zero #1', [90, [50, 60, 70, 80], [0, 0]], {'skill': 90, 'ups': 0}),
('regression gray cutoff #1',
[84, [64, 70, 80, 85], [0, 99, 75, 25, 25, 99, 75, 0]],
{'skill': 85, 'ups': 1}),
('fault site gray cutoff #1', [299, [55, 58, 59, 62], [9]], {'skill': 299, 'ups': 0}),
('regression gray cutoff #2', [212, [198, 209, 212, 213], [0, 74, 99, 0]], {'skill': 213, 'ups': 1}),
('regression gray cutoff #3',
[178, [157, 164, 168, 179], [24, 69, 99, 74, 75, 74, 33, 0]],
{'skill': 179, 'ups': 1}),
('exactly at learn level #1', [50, [50, 60, 70, 80], [0]], {'skill': 51, 'ups': 1}),
('at cap #1', [299, [200, 250, 275, 320], [0, 0]], {'skill': 300, 'ups': 1}),
('control #1', [23, [8, 14, 23, 38], [75]], {'skill': 23, 'ups': 0})],
[('gray recipe roll zero #1', [90, [50, 60, 70, 80], [0, 0]], {'skill': 90, 'ups': 0}),
('fault site gray cutoff #1', [299, [55, 58, 59, 62], [9]], {'skill': 299, 'ups': 0}),
('regression gray cutoff #1', [212, [198, 209, 212, 213], [0, 74, 99, 0]], {'skill': 213, 'ups': 1}),
('regression gray cutoff #2',
[178, [157, 164, 168, 179], [24, 69, 99, 74, 75, 74, 33, 0]],
{'skill': 179, 'ups': 1}),
('regression gray cutoff #3',
[266, [252, 263, 265, 266], [9, 0, 0, 74, 0, 25, 75, 24]],
{'skill': 266, 'ups': 0}),
('exactly at learn level #1', [50, [50, 60, 70, 80], [0]], {'skill': 51, 'ups': 1}),
('at cap #1', [299, [200, 250, 275, 320], [0, 0]], {'skill': 300, 'ups': 1}),
('control #1', [23, [8, 14, 23, 38], [75]], {'skill': 23, 'ups': 0})],
[('gray recipe roll zero #1', [90, [50, 60, 70, 80], [0, 0]], {'skill': 90, 'ups': 0}),
('fault site gray cutoff #1', [299, [242, 253, 255, 270], [25, 25, 24, 24]], {'skill': 299, 'ups': 0}),
('regression gray cutoff #1',
[178, [157, 164, 168, 179], [24, 69, 99, 74, 75, 74, 33, 0]],
{'skill': 179, 'ups': 1}),
('regression gray cutoff #2', [39, [5, 20, 32, 40], [0, 92, 24]], {'skill': 40, 'ups': 1}),
('regression gray cutoff #3',
[294, [271, 275, 290, 294], [76, 25, 0, 74, 74, 99]],
{'skill': 294, 'ups': 0}),
('exactly at learn level #1', [50, [50, 60, 70, 80], [0]], {'skill': 51, 'ups': 1}),
('at cap #1', [299, [200, 250, 275, 320], [0, 0]], {'skill': 300, 'ups': 1}),
('control #1', [23, [8, 14, 23, 38], [75]], {'skill': 23, 'ups': 0})],
[('gray recipe roll zero #1', [90, [50, 60, 70, 80], [0, 0]], {'skill': 90, 'ups': 0}),
('regression gray cutoff #1',
[266, [252, 263, 265, 266], [9, 0, 0, 74, 0, 25, 75, 24]],
{'skill': 266, 'ups': 0}),
('fault site gray cutoff #1', [299, [70, 74, 83, 98], [0, 24, 99]], {'skill': 299, 'ups': 0}),
('regression gray cutoff #2',
[78, [55, 67, 76, 79], [0, 99, 0, 56, 99, 24, 99, 74]],
{'skill': 79, 'ups': 1}),
('regression gray cutoff #3',
[172, [139, 152, 164, 172], [24, 99, 25, 74, 24, 79, 96]],
{'skill': 172, 'ups': 0}),
('exactly at learn level #1', [50, [50, 60, 70, 80], [0]], {'skill': 51, 'ups': 1}),
('at cap #1', [299, [200, 250, 275, 320], [0, 0]], {'skill': 300, 'ups': 1}),
('control #1', [289, [288, 314, 330, 340], [50, 0, 50, 0, 0]], {'skill': 294, 'ups': 5})],
[('gray recipe roll zero #1', [90, [50, 60, 70, 80], [0, 0]], {'skill': 90, 'ups': 0}),
('regression gray cutoff #1', [39, [5, 20, 32, 40], [0, 92, 24]], {'skill': 40, 'ups': 1}),
('fault site gray cutoff #1',
[299, [75, 85, 89, 103], [52, 99, 25, 79, 0, 8, 66]],
{'skill': 299, 'ups': 0}),
('regression gray cutoff #2', [131, [105, 116, 125, 131], [0]], {'skill': 131, 'ups': 0}),
('regression gray cutoff #3', [138, [110, 117, 128, 138], [0, 99, 99, 53]], {'skill': 138, 'ups': 0}),
('exactly at learn level #1', [50, [50, 60, 70, 80], [0]], {'skill': 51, 'ups': 1}),
('at cap #1', [299, [200, 250, 275, 320], [0, 0]], {'skill': 300, 'ups': 1}),
('control #1', [142, [114, 127, 141, 154], [0, 25, 0, 52, 99, 0, 24, 75]], {'skill': 146, 'ups': 4})]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| gray recipe roll zero #1 | {'skill': 92, 'ups': 2} | {'skill': 90, 'ups': 0} | Failed |
| regression gray cutoff #1 | {'skill': 86, 'ups': 2} | {'skill': 85, 'ups': 1} | Failed |
| fault site gray cutoff #1 | {'skill': 300, 'ups': 1} | {'skill': 299, 'ups': 0} | Failed |
| regression gray cutoff #2 | {'skill': 214, 'ups': 2} | {'skill': 213, 'ups': 1} | Failed |
| regression gray cutoff #3 | {'skill': 180, 'ups': 2} | {'skill': 179, 'ups': 1} | Failed |
| exactly at learn level #1 | {'skill': 51, 'ups': 1} | {'skill': 51, 'ups': 1} | Passed |
| at cap #1 | {'skill': 300, 'ups': 1} | {'skill': 300, 'ups': 1} | Passed |
| control #1 | {'skill': 23, 'ups': 0} | {'skill': 23, 'ups': 0} | Passed |
SHA-256 / 27f9f0eab675f2752efc4796a6508f31d6779a99a92127d8262c960ef163e935
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(skill, recipe_levels, rolls):
learn, yellow, green, gray = recipe_levels
if skill < learn:
return {'skill': skill, 'ups': 0, 'error': 'too low'}
ups = 0
for r in rolls:
if skill >= 300:
break
if skill < yellow:
chance = 100
elif skill < green:
chance = 75
elif skill <= gray:
chance = 25
else:
chance = 0
if r < chance:
skill += 1
ups += 1
return {'skill': skill, 'ups': ups}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('gray recipe roll zero #1', [90, [50, 60, 70, 80], [0, 0]], {'skill': 90, 'ups': 0}),
('regression gray cutoff #1',
[84, [64, 70, 80, 85], [0, 99, 75, 25, 25, 99, 75, 0]],
{'skill': 85, 'ups': 1}),
('fault site gray cutoff #1', [299, [55, 58, 59, 62], [9]], {'skill': 299, 'ups': 0}),
('regression gray cutoff #2', [212, [198, 209, 212, 213], [0, 74, 99, 0]], {'skill': 213, 'ups': 1}),
('regression gray cutoff #3',
[178, [157, 164, 168, 179], [24, 69, 99, 74, 75, 74, 33, 0]],
{'skill': 179, 'ups': 1}),
('exactly at learn level #1', [50, [50, 60, 70, 80], [0]], {'skill': 51, 'ups': 1}),
('at cap #1', [299, [200, 250, 275, 320], [0, 0]], {'skill': 300, 'ups': 1}),
('control #1', [23, [8, 14, 23, 38], [75]], {'skill': 23, 'ups': 0})],
[('gray recipe roll zero #1', [90, [50, 60, 70, 80], [0, 0]], {'skill': 90, 'ups': 0}),
('fault site gray cutoff #1', [299, [55, 58, 59, 62], [9]], {'skill': 299, 'ups': 0}),
('regression gray cutoff #1', [212, [198, 209, 212, 213], [0, 74, 99, 0]], {'skill': 213, 'ups': 1}),
('regression gray cutoff #2',
[178, [157, 164, 168, 179], [24, 69, 99, 74, 75, 74, 33, 0]],
{'skill': 179, 'ups': 1}),
('regression gray cutoff #3',
[266, [252, 263, 265, 266], [9, 0, 0, 74, 0, 25, 75, 24]],
{'skill': 266, 'ups': 0}),
('exactly at learn level #1', [50, [50, 60, 70, 80], [0]], {'skill': 51, 'ups': 1}),
('at cap #1', [299, [200, 250, 275, 320], [0, 0]], {'skill': 300, 'ups': 1}),
('control #1', [23, [8, 14, 23, 38], [75]], {'skill': 23, 'ups': 0})],
[('gray recipe roll zero #1', [90, [50, 60, 70, 80], [0, 0]], {'skill': 90, 'ups': 0}),
('fault site gray cutoff #1', [299, [242, 253, 255, 270], [25, 25, 24, 24]], {'skill': 299, 'ups': 0}),
('regression gray cutoff #1',
[178, [157, 164, 168, 179], [24, 69, 99, 74, 75, 74, 33, 0]],
{'skill': 179, 'ups': 1}),
('regression gray cutoff #2', [39, [5, 20, 32, 40], [0, 92, 24]], {'skill': 40, 'ups': 1}),
('regression gray cutoff #3',
[294, [271, 275, 290, 294], [76, 25, 0, 74, 74, 99]],
{'skill': 294, 'ups': 0}),
('exactly at learn level #1', [50, [50, 60, 70, 80], [0]], {'skill': 51, 'ups': 1}),
('at cap #1', [299, [200, 250, 275, 320], [0, 0]], {'skill': 300, 'ups': 1}),
('control #1', [23, [8, 14, 23, 38], [75]], {'skill': 23, 'ups': 0})],
[('gray recipe roll zero #1', [90, [50, 60, 70, 80], [0, 0]], {'skill': 90, 'ups': 0}),
('regression gray cutoff #1',
[266, [252, 263, 265, 266], [9, 0, 0, 74, 0, 25, 75, 24]],
{'skill': 266, 'ups': 0}),
('fault site gray cutoff #1', [299, [70, 74, 83, 98], [0, 24, 99]], {'skill': 299, 'ups': 0}),
('regression gray cutoff #2',
[78, [55, 67, 76, 79], [0, 99, 0, 56, 99, 24, 99, 74]],
{'skill': 79, 'ups': 1}),
('regression gray cutoff #3',
[172, [139, 152, 164, 172], [24, 99, 25, 74, 24, 79, 96]],
{'skill': 172, 'ups': 0}),
('exactly at learn level #1', [50, [50, 60, 70, 80], [0]], {'skill': 51, 'ups': 1}),
('at cap #1', [299, [200, 250, 275, 320], [0, 0]], {'skill': 300, 'ups': 1}),
('control #1', [289, [288, 314, 330, 340], [50, 0, 50, 0, 0]], {'skill': 294, 'ups': 5})],
[('gray recipe roll zero #1', [90, [50, 60, 70, 80], [0, 0]], {'skill': 90, 'ups': 0}),
('regression gray cutoff #1', [39, [5, 20, 32, 40], [0, 92, 24]], {'skill': 40, 'ups': 1}),
('fault site gray cutoff #1',
[299, [75, 85, 89, 103], [52, 99, 25, 79, 0, 8, 66]],
{'skill': 299, 'ups': 0}),
('regression gray cutoff #2', [131, [105, 116, 125, 131], [0]], {'skill': 131, 'ups': 0}),
('regression gray cutoff #3', [138, [110, 117, 128, 138], [0, 99, 99, 53]], {'skill': 138, 'ups': 0}),
('exactly at learn level #1', [50, [50, 60, 70, 80], [0]], {'skill': 51, 'ups': 1}),
('at cap #1', [299, [200, 250, 275, 320], [0, 0]], {'skill': 300, 'ups': 1}),
('control #1', [142, [114, 127, 141, 154], [0, 25, 0, 52, 99, 0, 24, 75]], {'skill': 146, 'ups': 4})]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| gray recipe roll zero #1 | {'skill': 90, 'ups': 0} | {'skill': 90, 'ups': 0} | Passed |
| regression gray cutoff #1 | {'skill': 86, 'ups': 2} | {'skill': 85, 'ups': 1} | Failed |
| fault site gray cutoff #1 | {'skill': 299, 'ups': 0} | {'skill': 299, 'ups': 0} | Passed |
| regression gray cutoff #2 | {'skill': 214, 'ups': 2} | {'skill': 213, 'ups': 1} | Failed |
| regression gray cutoff #3 | {'skill': 180, 'ups': 2} | {'skill': 179, 'ups': 1} | Failed |
| exactly at learn level #1 | {'skill': 51, 'ups': 1} | {'skill': 51, 'ups': 1} | Passed |
| at cap #1 | {'skill': 300, 'ups': 1} | {'skill': 300, 'ups': 1} | Passed |
| control #1 | {'skill': 23, 'ups': 0} | {'skill': 23, 'ups': 0} | Passed |
SHA-256 / 8e7657b230d6f17497df4007d0653d878c27bfbfd50aeb42a10de094d9fbb453
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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:47.716471+00:00.
Case digest / 903f6924c44100f697ac61a10e3e14a367a3119c9d76c5f36c1147411d9f6cf7