FA-86281 / Game economy crafting balance / Open access
Crafting station queue: Fast crafters finish instantly · case 01
Short jobs take zero time at high speed.
ROOT CAUSE
The one-second minimum duration is missing.
THE FAILURE
The one-second minimum duration is missing.
Unsuccessful approach: Subtracting speed as seconds ignores that speed is a percentage.
Case contract
jobs = [[name, duration], ...] in queue order. Effective duration = max(1, floor(duration*(100-speed)/100)). Each job starts on the station that frees earliest (lowest index on ties) at that station free time. Return names of jobs finished by now (finish <= now) ordered by finish time then queue position.
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(jobs, stations, speed, now):
free = [0] * stations
done = []
for idx, (name, dur) in enumerate(jobs):
d = dur * (100 - speed) // 100
s = min(range(stations), key=lambda k: (free[k], k))
start = free[s]
free[s] = start + d
done.append((free[s], idx, name))
return [name for fin, idx, name in sorted(done) if fin <= now]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('fault site duration floor #1',
[[['flask', 1], ['cape', 60], ['ember', 1], ['bow', 1], ['anvil', 2], ['dagger', 33]], 2, 25, 1],
['flask']),
('fault site duration floor #2', [[['anvil', 2], ['dagger', 2], ['flask', 5]], 1, 90, 1], ['anvil']),
('partial repair boundary #1',
[[['flask', 2], ['bow', 10], ['cape', 1], ['dagger', 2], ['anvil', 10], ['ember', 10]], 2, 10, 5],
['flask', 'cape', 'dagger']),
('partial repair boundary #2', [[['flask', 10], ['bow', 60]], 1, 90, 5], ['flask']),
('two stations tie #1', [[['a', 10], ['b', 10], ['c', 5]], 2, 0, 15], ['a', 'b', 'c']),
('speed floor #1', [[['x', 1], ['y', 1]], 1, 90, 2], ['x', 'y']),
('finish exactly now #1', [[['a', 30]], 1, 0, 30], ['a']),
('control #1',
[[['anvil', 2], ['flask', 2], ['cape', 1], ['dagger', 103], ['ember', 5]], 2, 10, 60],
['anvil', 'flask', 'cape', 'ember'])],
[('fault site duration floor #1', [[['anvil', 5], ['dagger', 10], ['cape', 1]], 1, 90, 1], ['anvil']),
('fault site duration floor #2', [[['dagger', 60], ['cape', 5], ['flask', 1]], 3, 25, 0], []),
('partial repair boundary #1',
[[['anvil', 10], ['bow', 1], ['dagger', 10], ['cape', 60]], 2, 25, 1],
['bow']),
('partial repair boundary #2',
[[['flask', 5], ['bow', 10], ['anvil', 1], ['dagger', 2], ['cape', 78]], 2, 50, 208],
['flask', 'anvil', 'dagger', 'bow', 'cape']),
('finish exactly now #1', [[['a', 30]], 1, 0, 30], ['a']),
('two stations tie #1', [[['a', 10], ['b', 10], ['c', 5]], 2, 0, 15], ['a', 'b', 'c']),
('control #1',
[[['anvil', 2], ['flask', 2], ['cape', 1], ['dagger', 103], ['ember', 5]], 2, 10, 60],
['anvil', 'flask', 'cape', 'ember']),
('control #2',
[[['dagger', 10], ['bow', 119], ['cape', 1], ['flask', 2], ['ember', 60], ['anvil', 5]], 1, 0, 60],
['dagger'])],
[('fault site duration floor #1', [[['anvil', 1], ['flask', 5], ['ember', 5]], 2, 90, 0], []),
('fault site duration floor #2',
[[['dagger', 2], ['anvil', 1], ['bow', 5], ['ember', 75], ['cape', 60], ['flask', 59]], 2, 50, 0],
[]),
('partial repair boundary #1',
[[['ember', 60], ['anvil', 1], ['dagger', 1], ['cape', 1], ['bow', 1], ['flask', 2]], 2, 90, 60],
['anvil', 'dagger', 'cape', 'bow', 'flask', 'ember']),
('partial repair boundary #2',
[[['bow', 5], ['flask', 60], ['dagger', 1], ['anvil', 10]], 1, 50, 30],
['bow']),
('speed floor #1', [[['x', 1], ['y', 1]], 1, 90, 2], ['x', 'y']),
('finish exactly now #1', [[['a', 30]], 1, 0, 30], ['a']),
('control #1',
[[['dagger', 10], ['bow', 119], ['cape', 1], ['flask', 2], ['ember', 60], ['anvil', 5]], 1, 0, 60],
['dagger']),
('control #2', [[['dagger', 1], ['bow', 5]], 1, 99, 161], ['dagger', 'bow'])],
[('fault site duration floor #1',
[[['anvil', 5], ['ember', 5], ['bow', 1], ['cape', 10], ['dagger', 2], ['flask', 2]], 1, 99, 0],
[]),
('fault site duration floor #2', [[['anvil', 1], ['ember', 2]], 3, 50, 0], []),
('partial repair boundary #1',
[[['ember', 11], ['bow', 60], ['dagger', 5]], 3, 10, 30],
['dagger', 'ember']),
('partial repair boundary #2',
[[['anvil', 10], ['dagger', 19], ['flask', 2], ['cape', 60], ['ember', 90], ['bow', 5]], 3, 25, 60],
['flask', 'anvil', 'dagger', 'bow', 'cape']),
('two stations tie #1', [[['a', 10], ['b', 10], ['c', 5]], 2, 0, 15], ['a', 'b', 'c']),
('speed floor #1', [[['x', 1], ['y', 1]], 1, 90, 2], ['x', 'y']),
('control #1',
[[['dagger', 60], ['flask', 1], ['anvil', 60], ['cape', 1], ['ember', 5], ['bow', 33]], 1, 99, 154],
['dagger', 'flask', 'anvil', 'cape', 'ember', 'bow']),
('control #2', [[['anvil', 2]], 3, 90, 1], ['anvil'])],
[('fault site duration floor #1', [[['dagger', 1], ['anvil', 60]], 2, 25, 0], []),
('fault site duration floor #2', [[['flask', 2], ['cape', 10], ['bow', 81]], 2, 99, 1], ['flask', 'cape']),
('partial repair boundary #1',
[[['cape', 2], ['anvil', 10], ['ember', 2], ['bow', 2], ['flask', 1]], 1, 50, 5],
['cape']),
('partial repair boundary #2', [[['dagger', 5], ['flask', 10], ['anvil', 1], ['ember', 60]], 2, 10, 1], []),
('finish exactly now #1', [[['a', 30]], 1, 0, 30], ['a']),
('two stations tie #1', [[['a', 10], ['b', 10], ['c', 5]], 2, 0, 15], ['a', 'b', 'c']),
('control #1', [[['flask', 60]], 1, 25, 30], []),
('control #2',
[[['anvil', 105], ['dagger', 10], ['ember', 1], ['flask', 5], ['cape', 5], ['bow', 5]], 1, 99, 0],
[])]]
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 |
|---|---|---|---|
| fault site duration floor #1 | ['flask', 'ember', 'bow', 'anvil'] | ['flask'] | Failed |
| fault site duration floor #2 | ['anvil', 'dagger', 'flask'] | ['anvil'] | Failed |
| partial repair boundary #1 | ['flask', 'cape', 'dagger'] | ['flask', 'cape', 'dagger'] | Passed |
| partial repair boundary #2 | ['flask'] | ['flask'] | Passed |
| two stations tie #1 | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| speed floor #1 | ['x', 'y'] | ['x', 'y'] | Passed |
| finish exactly now #1 | ['a'] | ['a'] | Passed |
| control #1 | ['anvil', 'flask', 'cape', 'ember'] | ['anvil', 'flask', 'cape', 'ember'] | Passed |
SHA-256 / f4d5db3588d73ed8fe5eb0d8a0dd0fffa04c89f274dc6f28ed56670edea24d51
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(jobs, stations, speed, now):
free = [0] * stations
done = []
for idx, (name, dur) in enumerate(jobs):
d = max(1, dur - speed)
s = min(range(stations), key=lambda k: (free[k], k))
start = free[s]
free[s] = start + d
done.append((free[s], idx, name))
return [name for fin, idx, name in sorted(done) if fin <= now]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('fault site duration floor #1',
[[['flask', 1], ['cape', 60], ['ember', 1], ['bow', 1], ['anvil', 2], ['dagger', 33]], 2, 25, 1],
['flask']),
('fault site duration floor #2', [[['anvil', 2], ['dagger', 2], ['flask', 5]], 1, 90, 1], ['anvil']),
('partial repair boundary #1',
[[['flask', 2], ['bow', 10], ['cape', 1], ['dagger', 2], ['anvil', 10], ['ember', 10]], 2, 10, 5],
['flask', 'cape', 'dagger']),
('partial repair boundary #2', [[['flask', 10], ['bow', 60]], 1, 90, 5], ['flask']),
('two stations tie #1', [[['a', 10], ['b', 10], ['c', 5]], 2, 0, 15], ['a', 'b', 'c']),
('speed floor #1', [[['x', 1], ['y', 1]], 1, 90, 2], ['x', 'y']),
('finish exactly now #1', [[['a', 30]], 1, 0, 30], ['a']),
('control #1',
[[['anvil', 2], ['flask', 2], ['cape', 1], ['dagger', 103], ['ember', 5]], 2, 10, 60],
['anvil', 'flask', 'cape', 'ember'])],
[('fault site duration floor #1', [[['anvil', 5], ['dagger', 10], ['cape', 1]], 1, 90, 1], ['anvil']),
('fault site duration floor #2', [[['dagger', 60], ['cape', 5], ['flask', 1]], 3, 25, 0], []),
('partial repair boundary #1',
[[['anvil', 10], ['bow', 1], ['dagger', 10], ['cape', 60]], 2, 25, 1],
['bow']),
('partial repair boundary #2',
[[['flask', 5], ['bow', 10], ['anvil', 1], ['dagger', 2], ['cape', 78]], 2, 50, 208],
['flask', 'anvil', 'dagger', 'bow', 'cape']),
('finish exactly now #1', [[['a', 30]], 1, 0, 30], ['a']),
('two stations tie #1', [[['a', 10], ['b', 10], ['c', 5]], 2, 0, 15], ['a', 'b', 'c']),
('control #1',
[[['anvil', 2], ['flask', 2], ['cape', 1], ['dagger', 103], ['ember', 5]], 2, 10, 60],
['anvil', 'flask', 'cape', 'ember']),
('control #2',
[[['dagger', 10], ['bow', 119], ['cape', 1], ['flask', 2], ['ember', 60], ['anvil', 5]], 1, 0, 60],
['dagger'])],
[('fault site duration floor #1', [[['anvil', 1], ['flask', 5], ['ember', 5]], 2, 90, 0], []),
('fault site duration floor #2',
[[['dagger', 2], ['anvil', 1], ['bow', 5], ['ember', 75], ['cape', 60], ['flask', 59]], 2, 50, 0],
[]),
('partial repair boundary #1',
[[['ember', 60], ['anvil', 1], ['dagger', 1], ['cape', 1], ['bow', 1], ['flask', 2]], 2, 90, 60],
['anvil', 'dagger', 'cape', 'bow', 'flask', 'ember']),
('partial repair boundary #2',
[[['bow', 5], ['flask', 60], ['dagger', 1], ['anvil', 10]], 1, 50, 30],
['bow']),
('speed floor #1', [[['x', 1], ['y', 1]], 1, 90, 2], ['x', 'y']),
('finish exactly now #1', [[['a', 30]], 1, 0, 30], ['a']),
('control #1',
[[['dagger', 10], ['bow', 119], ['cape', 1], ['flask', 2], ['ember', 60], ['anvil', 5]], 1, 0, 60],
['dagger']),
('control #2', [[['dagger', 1], ['bow', 5]], 1, 99, 161], ['dagger', 'bow'])],
[('fault site duration floor #1',
[[['anvil', 5], ['ember', 5], ['bow', 1], ['cape', 10], ['dagger', 2], ['flask', 2]], 1, 99, 0],
[]),
('fault site duration floor #2', [[['anvil', 1], ['ember', 2]], 3, 50, 0], []),
('partial repair boundary #1',
[[['ember', 11], ['bow', 60], ['dagger', 5]], 3, 10, 30],
['dagger', 'ember']),
('partial repair boundary #2',
[[['anvil', 10], ['dagger', 19], ['flask', 2], ['cape', 60], ['ember', 90], ['bow', 5]], 3, 25, 60],
['flask', 'anvil', 'dagger', 'bow', 'cape']),
('two stations tie #1', [[['a', 10], ['b', 10], ['c', 5]], 2, 0, 15], ['a', 'b', 'c']),
('speed floor #1', [[['x', 1], ['y', 1]], 1, 90, 2], ['x', 'y']),
('control #1',
[[['dagger', 60], ['flask', 1], ['anvil', 60], ['cape', 1], ['ember', 5], ['bow', 33]], 1, 99, 154],
['dagger', 'flask', 'anvil', 'cape', 'ember', 'bow']),
('control #2', [[['anvil', 2]], 3, 90, 1], ['anvil'])],
[('fault site duration floor #1', [[['dagger', 1], ['anvil', 60]], 2, 25, 0], []),
('fault site duration floor #2', [[['flask', 2], ['cape', 10], ['bow', 81]], 2, 99, 1], ['flask', 'cape']),
('partial repair boundary #1',
[[['cape', 2], ['anvil', 10], ['ember', 2], ['bow', 2], ['flask', 1]], 1, 50, 5],
['cape']),
('partial repair boundary #2', [[['dagger', 5], ['flask', 10], ['anvil', 1], ['ember', 60]], 2, 10, 1], []),
('finish exactly now #1', [[['a', 30]], 1, 0, 30], ['a']),
('two stations tie #1', [[['a', 10], ['b', 10], ['c', 5]], 2, 0, 15], ['a', 'b', 'c']),
('control #1', [[['flask', 60]], 1, 25, 30], []),
('control #2',
[[['anvil', 105], ['dagger', 10], ['ember', 1], ['flask', 5], ['cape', 5], ['bow', 5]], 1, 99, 0],
[])]]
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 |
|---|---|---|---|
| fault site duration floor #1 | ['flask'] | ['flask'] | Passed |
| fault site duration floor #2 | ['anvil'] | ['anvil'] | Passed |
| partial repair boundary #1 | ['flask', 'bow', 'cape', 'dagger', 'anvil', 'ember'] | ['flask', 'cape', 'dagger'] | Failed |
| partial repair boundary #2 | ['flask', 'bow'] | ['flask'] | Failed |
| two stations tie #1 | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| speed floor #1 | ['x', 'y'] | ['x', 'y'] | Passed |
| finish exactly now #1 | ['a'] | ['a'] | Passed |
| control #1 | ['anvil', 'flask', 'cape', 'ember'] | ['anvil', 'flask', 'cape', 'ember'] | Passed |
SHA-256 / 538e1361e2fa0f744cf063be6dcb03bca45e019b6965a146fae15f0b41435c5e
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:48.141797+00:00.
Case digest / 7532fbda0ed1d87a49a9e3bfc484639856a97e7fbf76797f719a1816fa945339