{"abstract":"A pallet already moved whole in pass 1 is allocated a second time in pass 2.","category":"Warehouse slotting and bin packing","checks":8,"contract":"pallets [[license_plate, received_day, qty]]; need units. Order pallets by received_day then plate. Pass 1 takes whole pallets (qty > 0) whose qty fits the remaining need, oldest first, skipping ones that are too large. Pass 2 takes partial quantity from remaining pallets oldest first. Return [[[plate, qty] in pick order], shortfall].","contract_signature":"pallets, need","evaluation_group":"w2-warehouse-slotting-reserve-allocation","failed_approach":"Excluding pallets by matching quantity skips untouched pallets that happen to have the same quantity.","family":"w2-warehouse-slotting-reserve-allocation-taken-identity","id":"FA-95116","implementations":{"attempt":{"sha256":"6e5d8e97b5a7bd2615c97adbe10c7625f13e39b7a869f2f5c603669accb75358","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(pallets, need):\n    order = sorted(pallets, key=lambda p: (p[1], p[0]))\n    rem = need\n    alloc = []\n    taken = set()\n    for lp, day, q in order:\n        if 0 < q <= rem:\n            alloc.append([lp, q])\n            taken.add(lp)\n            rem -= q\n    for lp, day, q in order:\n        if rem == 0:\n            break\n        if q in [a[1] for a in alloc]:\n            continue\n        t = min(q, rem)\n        if t > 0:\n            alloc.append([lp, t])\n            rem -= t\n    return [alloc, rem]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['shortfall', [[['A', 1, 10]], 25], [[['A', 10]], 15]], ['generated mix 30', [[['P0', 1, 20], ['P1', 5, 40], ['P2', 3, 48], ['P3', 2, 10], ['P4', 1, 48], ['P5', 2, 20]], 90], [[['P0', 20], ['P4', 48], ['P3', 10], ['P5', 12]], 0]], ['clean-out skip big', [[['A', 1, 50], ['B', 2, 20], ['C', 3, 10]], 30], [[['B', 20], ['C', 10]], 0]], ['partial oldest', [[['A', 1, 50], ['B', 2, 60]], 30], [[['A', 30]], 0]], ['zero need', [[['A', 1, 10]], 0], [[], 0]], ['exact whole', [[['A', 1, 30]], 30], [[['A', 30]], 0]], ['equal qty pallets', [[['A', 1, 20], ['B', 2, 20], ['C', 3, 40]], 50], [[['A', 20], ['B', 20], ['C', 10]], 0]], ['generated mix 8', [[['P0', 3, 10], ['P1', 3, 48], ['P2', 2, 20], ['P3', 5, 48]], 50], [[['P2', 20], ['P0', 10], ['P1', 20]], 0]]], [['generated mix 18', [[['P0', 3, 0], ['P1', 3, 40]], 90], [[['P1', 40]], 50]], ['generated mix 45', [[['P0', 3, 10], ['P1', 8, 0], ['P2', 3, 30], ['P3', 3, 48], ['P4', 1, 48], ['P5', 3, 30]], 90], [[['P4', 48], ['P0', 10], ['P2', 30], ['P3', 2]], 0]], ['shortfall', [[['A', 1, 10]], 25], [[['A', 10]], 15]], ['zero need', [[['A', 1, 10]], 0], [[], 0]], ['exact whole', [[['A', 1, 30]], 30], [[['A', 30]], 0]], ['generated mix 9', [[['P0', 1, 20], ['P1', 2, 48], ['P2', 2, 20]], 20], [[['P0', 20]], 0]], ['generated mix 17', [[['P0', 3, 0]], 50], [[], 50]], ['generated mix 26', [[['P0', 1, 40], ['P1', 8, 20]], 0], [[], 0]]], [['generated mix 37', [[['P0', 2, 48], ['P1', 3, 10], ['P2', 3, 30], ['P3', 3, 20], ['P4', 5, 48], ['P5', 2, 20]], 90], [[['P0', 48], ['P5', 20], ['P1', 10], ['P2', 12]], 0]], ['generated mix 60', [[['P0', 3, 20], ['P1', 5, 20], ['P2', 3, 20], ['P3', 3, 30]], 30], [[['P0', 20], ['P2', 10]], 0]], ['clean-out skip big', [[['A', 1, 50], ['B', 2, 20], ['C', 3, 10]], 30], [[['B', 20], ['C', 10]], 0]], ['partial oldest', [[['A', 1, 50], ['B', 2, 60]], 30], [[['A', 30]], 0]], ['equal qty pallets', [[['A', 1, 20], ['B', 2, 20], ['C', 3, 40]], 50], [[['A', 20], ['B', 20], ['C', 10]], 0]], ['generated mix 20', [[['P0', 2, 0], ['P1', 3, 48], ['P2', 2, 30]], 60], [[['P2', 30], ['P1', 30]], 0]], ['generated mix 28', [[['P0', 3, 40]], 90], [[['P0', 40]], 50]], ['generated mix 36', [[['P0', 5, 40], ['P1', 2, 10], ['P2', 1, 40], ['P3', 8, 10]], 90], [[['P2', 40], ['P1', 10], ['P0', 40]], 0]]], [['generated mix 60', [[['P0', 3, 20], ['P1', 5, 20], ['P2', 3, 20], ['P3', 3, 30]], 30], [[['P0', 20], ['P2', 10]], 0]], ['generated mix 10', [[['P0', 3, 10], ['P1', 2, 10], ['P2', 1, 30], ['P3', 3, 30]], 60], [[['P2', 30], ['P1', 10], ['P0', 10], ['P3', 10]], 0]], ['shortfall', [[['A', 1, 10]], 25], [[['A', 10]], 15]], ['zero need', [[['A', 1, 10]], 0], [[], 0]], ['exact whole', [[['A', 1, 30]], 30], [[['A', 30]], 0]], ['generated mix 32', [[['P0', 8, 40], ['P1', 2, 48]], 200], [[['P1', 48], ['P0', 40]], 112]], ['generated mix 40', [[['P0', 5, 0], ['P1', 3, 48], ['P2', 2, 40], ['P3', 3, 20], ['P4', 5, 40], ['P5', 3, 30]], 20], [[['P3', 20]], 0]], ['generated mix 48', [[['P0', 5, 0]], 20], [[], 20]]], [['generated mix 70', [[['P0', 1, 48], ['P1', 8, 0]], 60], [[['P0', 48]], 12]], ['generated mix 30', [[['P0', 1, 20], ['P1', 5, 40], ['P2', 3, 48], ['P3', 2, 10], ['P4', 1, 48], ['P5', 2, 20]], 90], [[['P0', 20], ['P4', 48], ['P3', 10], ['P5', 12]], 0]], ['clean-out skip big', [[['A', 1, 50], ['B', 2, 20], ['C', 3, 10]], 30], [[['B', 20], ['C', 10]], 0]], ['partial oldest', [[['A', 1, 50], ['B', 2, 60]], 30], [[['A', 30]], 0]], ['equal qty pallets', [[['A', 1, 20], ['B', 2, 20], ['C', 3, 40]], 50], [[['A', 20], ['B', 20], ['C', 10]], 0]], ['generated mix 43', [[['P0', 8, 10]], 25], [[['P0', 10]], 15]], ['generated mix 51', [[['P0', 5, 30], ['P1', 1, 40], ['P2', 2, 48], ['P3', 3, 10]], 10], [[['P3', 10]], 0]], ['generated mix 59', [[['P0', 3, 20], ['P1', 2, 40], ['P2', 3, 0], ['P3', 3, 20], ['P4', 5, 40]], 10], [[['P1', 10]], 0]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"10cea7647f03f55c69c3cc61dda862eb3ae2311a74ac61df95e9bb17dd5f1882","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(pallets, need):\n    order = sorted(pallets, key=lambda p: (p[1], p[0]))\n    rem = need\n    alloc = []\n    taken = set()\n    for lp, day, q in order:\n        if 0 < q <= rem:\n            alloc.append([lp, q])\n            taken.add(lp)\n            rem -= q\n    for lp, day, q in order:\n        if rem == 0:\n            break\n        t = min(q, rem)\n        if t > 0:\n            alloc.append([lp, t])\n            rem -= t\n    return [alloc, rem]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['shortfall', [[['A', 1, 10]], 25], [[['A', 10]], 15]], ['generated mix 30', [[['P0', 1, 20], ['P1', 5, 40], ['P2', 3, 48], ['P3', 2, 10], ['P4', 1, 48], ['P5', 2, 20]], 90], [[['P0', 20], ['P4', 48], ['P3', 10], ['P5', 12]], 0]], ['clean-out skip big', [[['A', 1, 50], ['B', 2, 20], ['C', 3, 10]], 30], [[['B', 20], ['C', 10]], 0]], ['partial oldest', [[['A', 1, 50], ['B', 2, 60]], 30], [[['A', 30]], 0]], ['zero need', [[['A', 1, 10]], 0], [[], 0]], ['exact whole', [[['A', 1, 30]], 30], [[['A', 30]], 0]], ['equal qty pallets', [[['A', 1, 20], ['B', 2, 20], ['C', 3, 40]], 50], [[['A', 20], ['B', 20], ['C', 10]], 0]], ['generated mix 8', [[['P0', 3, 10], ['P1', 3, 48], ['P2', 2, 20], ['P3', 5, 48]], 50], [[['P2', 20], ['P0', 10], ['P1', 20]], 0]]], [['generated mix 18', [[['P0', 3, 0], ['P1', 3, 40]], 90], [[['P1', 40]], 50]], ['generated mix 45', [[['P0', 3, 10], ['P1', 8, 0], ['P2', 3, 30], ['P3', 3, 48], ['P4', 1, 48], ['P5', 3, 30]], 90], [[['P4', 48], ['P0', 10], ['P2', 30], ['P3', 2]], 0]], ['shortfall', [[['A', 1, 10]], 25], [[['A', 10]], 15]], ['zero need', [[['A', 1, 10]], 0], [[], 0]], ['exact whole', [[['A', 1, 30]], 30], [[['A', 30]], 0]], ['generated mix 9', [[['P0', 1, 20], ['P1', 2, 48], ['P2', 2, 20]], 20], [[['P0', 20]], 0]], ['generated mix 17', [[['P0', 3, 0]], 50], [[], 50]], ['generated mix 26', [[['P0', 1, 40], ['P1', 8, 20]], 0], [[], 0]]], [['generated mix 37', [[['P0', 2, 48], ['P1', 3, 10], ['P2', 3, 30], ['P3', 3, 20], ['P4', 5, 48], ['P5', 2, 20]], 90], [[['P0', 48], ['P5', 20], ['P1', 10], ['P2', 12]], 0]], ['generated mix 60', [[['P0', 3, 20], ['P1', 5, 20], ['P2', 3, 20], ['P3', 3, 30]], 30], [[['P0', 20], ['P2', 10]], 0]], ['clean-out skip big', [[['A', 1, 50], ['B', 2, 20], ['C', 3, 10]], 30], [[['B', 20], ['C', 10]], 0]], ['partial oldest', [[['A', 1, 50], ['B', 2, 60]], 30], [[['A', 30]], 0]], ['equal qty pallets', [[['A', 1, 20], ['B', 2, 20], ['C', 3, 40]], 50], [[['A', 20], ['B', 20], ['C', 10]], 0]], ['generated mix 20', [[['P0', 2, 0], ['P1', 3, 48], ['P2', 2, 30]], 60], [[['P2', 30], ['P1', 30]], 0]], ['generated mix 28', [[['P0', 3, 40]], 90], [[['P0', 40]], 50]], ['generated mix 36', [[['P0', 5, 40], ['P1', 2, 10], ['P2', 1, 40], ['P3', 8, 10]], 90], [[['P2', 40], ['P1', 10], ['P0', 40]], 0]]], [['generated mix 60', [[['P0', 3, 20], ['P1', 5, 20], ['P2', 3, 20], ['P3', 3, 30]], 30], [[['P0', 20], ['P2', 10]], 0]], ['generated mix 10', [[['P0', 3, 10], ['P1', 2, 10], ['P2', 1, 30], ['P3', 3, 30]], 60], [[['P2', 30], ['P1', 10], ['P0', 10], ['P3', 10]], 0]], ['shortfall', [[['A', 1, 10]], 25], [[['A', 10]], 15]], ['zero need', [[['A', 1, 10]], 0], [[], 0]], ['exact whole', [[['A', 1, 30]], 30], [[['A', 30]], 0]], ['generated mix 32', [[['P0', 8, 40], ['P1', 2, 48]], 200], [[['P1', 48], ['P0', 40]], 112]], ['generated mix 40', [[['P0', 5, 0], ['P1', 3, 48], ['P2', 2, 40], ['P3', 3, 20], ['P4', 5, 40], ['P5', 3, 30]], 20], [[['P3', 20]], 0]], ['generated mix 48', [[['P0', 5, 0]], 20], [[], 20]]], [['generated mix 70', [[['P0', 1, 48], ['P1', 8, 0]], 60], [[['P0', 48]], 12]], ['generated mix 30', [[['P0', 1, 20], ['P1', 5, 40], ['P2', 3, 48], ['P3', 2, 10], ['P4', 1, 48], ['P5', 2, 20]], 90], [[['P0', 20], ['P4', 48], ['P3', 10], ['P5', 12]], 0]], ['clean-out skip big', [[['A', 1, 50], ['B', 2, 20], ['C', 3, 10]], 30], [[['B', 20], ['C', 10]], 0]], ['partial oldest', [[['A', 1, 50], ['B', 2, 60]], 30], [[['A', 30]], 0]], ['equal qty pallets', [[['A', 1, 20], ['B', 2, 20], ['C', 3, 40]], 50], [[['A', 20], ['B', 20], ['C', 10]], 0]], ['generated mix 43', [[['P0', 8, 10]], 25], [[['P0', 10]], 15]], ['generated mix 51', [[['P0', 5, 30], ['P1', 1, 40], ['P2', 2, 48], ['P3', 3, 10]], 10], [[['P3', 10]], 0]], ['generated mix 59', [[['P0', 3, 20], ['P1', 2, 40], ['P2', 3, 0], ['P3', 3, 20], ['P4', 5, 40]], 10], [[['P1', 10]], 0]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Stipulated clean-out policy; no lot, expiry, or location travel considerations. 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-warehouse-slotting-reserve-allocation-taken-identity","generated_at":"2026-09-29T14:52:10.738321+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Reserve allocation decides which pallets feed replenishment and order picks.","root_cause":"Pass 2 does not skip pallets taken in pass 1.","sha256":"e82997c2de00e075195df1bea0974d788a5271266f5f55709a8624731e5f1a23","title":"Reserve allocation: cleaned pallet picked again · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.835,"exit_code":1,"observations":[{"actual":[[["A",10]],15],"check":"shortfall","expected":[[["A",10]],15],"passed":true},{"actual":[[["P0",20],["P4",48],["P3",10],["P1",12]],0],"check":"generated mix 30","expected":[[["P0",20],["P4",48],["P3",10],["P5",12]],0],"passed":false},{"actual":[[["B",20],["C",10]],0],"check":"clean-out skip big","expected":[[["B",20],["C",10]],0],"passed":true},{"actual":[[["A",30]],0],"check":"partial oldest","expected":[[["A",30]],0],"passed":true},{"actual":[[],0],"check":"zero need","expected":[[],0],"passed":true},{"actual":[[["A",30]],0],"check":"exact whole","expected":[[["A",30]],0],"passed":true},{"actual":[[["A",20],["B",20],["C",10]],0],"check":"equal qty pallets","expected":[[["A",20],["B",20],["C",10]],0],"passed":true},{"actual":[[["P2",20],["P0",10],["P1",20]],0],"check":"generated mix 8","expected":[[["P2",20],["P0",10],["P1",20]],0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"shortfall\", \"actual\": [[[\"A\", 10]], 15], \"expected\": [[[\"A\", 10]], 15], \"passed\": true}, {\"check\": \"generated mix 30\", \"actual\": [[[\"P0\", 20], [\"P4\", 48], [\"P3\", 10], [\"P1\", 12]], 0], \"expected\": [[[\"P0\", 20], [\"P4\", 48], [\"P3\", 10], [\"P5\", 12]], 0], \"passed\": false}, {\"check\": \"clean-out skip big\", \"actual\": [[[\"B\", 20], [\"C\", 10]], 0], \"expected\": [[[\"B\", 20], [\"C\", 10]], 0], \"passed\": true}, {\"check\": \"partial oldest\", \"actual\": [[[\"A\", 30]], 0], \"expected\": [[[\"A\", 30]], 0], \"passed\": true}, {\"check\": \"zero need\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"exact whole\", \"actual\": [[[\"A\", 30]], 0], \"expected\": [[[\"A\", 30]], 0], \"passed\": true}, {\"check\": \"equal qty pallets\", \"actual\": [[[\"A\", 20], [\"B\", 20], [\"C\", 10]], 0], \"expected\": [[[\"A\", 20], [\"B\", 20], [\"C\", 10]], 0], \"passed\": true}, {\"check\": \"generated mix 8\", \"actual\": [[[\"P2\", 20], [\"P0\", 10], [\"P1\", 20]], 0], \"expected\": [[[\"P2\", 20], [\"P0\", 10], [\"P1\", 20]], 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.994,"exit_code":1,"observations":[{"actual":[[["A",10],["A",10]],5],"check":"shortfall","expected":[[["A",10]],15],"passed":false},{"actual":[[["P0",20],["P4",48],["P3",10],["P0",12]],0],"check":"generated mix 30","expected":[[["P0",20],["P4",48],["P3",10],["P5",12]],0],"passed":false},{"actual":[[["B",20],["C",10]],0],"check":"clean-out skip big","expected":[[["B",20],["C",10]],0],"passed":true},{"actual":[[["A",30]],0],"check":"partial oldest","expected":[[["A",30]],0],"passed":true},{"actual":[[],0],"check":"zero need","expected":[[],0],"passed":true},{"actual":[[["A",30]],0],"check":"exact whole","expected":[[["A",30]],0],"passed":true},{"actual":[[["A",20],["B",20],["A",10]],0],"check":"equal qty pallets","expected":[[["A",20],["B",20],["C",10]],0],"passed":false},{"actual":[[["P2",20],["P0",10],["P2",20]],0],"check":"generated mix 8","expected":[[["P2",20],["P0",10],["P1",20]],0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"shortfall\", \"actual\": [[[\"A\", 10], [\"A\", 10]], 5], \"expected\": [[[\"A\", 10]], 15], \"passed\": false}, {\"check\": \"generated mix 30\", \"actual\": [[[\"P0\", 20], [\"P4\", 48], [\"P3\", 10], [\"P0\", 12]], 0], \"expected\": [[[\"P0\", 20], [\"P4\", 48], [\"P3\", 10], [\"P5\", 12]], 0], \"passed\": false}, {\"check\": \"clean-out skip big\", \"actual\": [[[\"B\", 20], [\"C\", 10]], 0], \"expected\": [[[\"B\", 20], [\"C\", 10]], 0], \"passed\": true}, {\"check\": \"partial oldest\", \"actual\": [[[\"A\", 30]], 0], \"expected\": [[[\"A\", 30]], 0], \"passed\": true}, {\"check\": \"zero need\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"exact whole\", \"actual\": [[[\"A\", 30]], 0], \"expected\": [[[\"A\", 30]], 0], \"passed\": true}, {\"check\": \"equal qty pallets\", \"actual\": [[[\"A\", 20], [\"B\", 20], [\"A\", 10]], 0], \"expected\": [[[\"A\", 20], [\"B\", 20], [\"C\", 10]], 0], \"passed\": false}, {\"check\": \"generated mix 8\", \"actual\": [[[\"P2\", 20], [\"P0\", 10], [\"P2\", 20]], 0], \"expected\": [[[\"P2\", 20], [\"P0\", 10], [\"P1\", 20]], 0], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}