FAILURE MAP
← Case archive

FA-86190 / Game economy crafting balance / Member archive

Inventory stack insertion: New stacks exceed stack limit · case 05

A single empty slot swallows any quantity.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

slots = list of None or [name, count]; names are case sensitive. First top up partial stacks (count < max_stack) of the same item in slot order, then fill empty slots in order with new stacks of at most max_stack. Reserved placeholders [name, 0] count as partial stacks. Legacy stacks above max_stack are left untouched. Returns {slots, leftover}.

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.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression new stack size #1{"leftover": 0, "slots": [["Potion", 45], ["arrow", 19]]}{"leftover": 40, "slots": [["Potion", 5], ["arrow", 19]]}Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗