{"abstract":"Products separated by exactly the required number of bays are flagged.","category":"Warehouse slotting and bin packing","checks":8,"contract":"placements [[sku, hazard class, aisle, bay]]; rules [[class_a, class_b, min_bay_gap]] apply in either order within the same aisle. A rule class matches a hazard class equal to it or a division of it (\"4\" matches \"4.1\"). A pair violates when |bay difference| < min_gap. Different SKUs only. Return sorted unique [sku_low, sku_high] pairs.","evaluation_group":"w2-warehouse-slotting-hazmat-segregation","failed_approach":"Counting bays between locations instead of bay difference misses pairs one bay too close.","family":"w2-warehouse-slotting-hazmat-segregation-gap-threshold","id":"FA-95021","implementations":{"attempt":{"sha256":"51cd6411512220be9d5b7b99008c8f0dff925ac0e6f3e2aeca9de9d113a466dd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(placements, rules):\n    def matches(cls, rule):\n        return cls == rule or cls.startswith(rule + '.')\n    found = set()\n    n = len(placements)\n    for i in range(n):\n        for j in range(i + 1, n):\n            sa, ca, aa, ba = placements[i]\n            sb, cb, ab, bb = placements[j]\n            if sa == sb or aa != ab:\n                continue\n            gap = abs(ba - bb)\n            for ra, rb, min_gap in rules:\n                hit = (matches(ca, ra) and matches(cb, rb)) or (matches(ca, rb) and matches(cb, ra))\n                if hit and gap + 1 < min_gap:\n                    found.add(tuple(sorted([sa, sb])))\n    return [list(p) for p in sorted(found)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['gap equal ok', [[['F', '3', 1, 4], ['O', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['division match', [[['W', '4.3', 2, 2], ['C', '8', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['C', 'W']]], ['adjacent oxidizer', [[['F', '3', 1, 4], ['O', '5.1', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['F', 'O']]], ['same class rule', [[['P', '5.2', 1, 3], ['Q', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['P', 'Q']]], ['reverse order', [[['O', '5.1', 1, 1], ['G', '2.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['G', 'O']]], ['other aisle', [[['F', '3', 1, 4], ['O', '5.1', 2, 4]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 6', [[['H0', '2.1', 1, 4], ['H1', '9', 1, 1]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 14', [[['H0', '3', 1, 5], ['H1', '2.1', 2, 4], ['H2', '9', 2, 1], ['H3', '4.3', 1, 6], ['H0', '3', 1, 4]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []]], [['generated mix 66', [[['H0', '9', 1, 1], ['H1', '4.1', 2, 6], ['H2', '2.1', 1, 2], ['H3', '5.2', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 41', [[['H0', '3', 1, 4], ['H1', '3', 2, 2], ['H2', '4.1', 1, 3], ['H3', '9', 1, 2], ['H4', '5.2', 1, 5], ['H5', '5.1', 2, 1], ['H0', '3', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H1', 'H5']]], ['other aisle', [[['F', '3', 1, 4], ['O', '5.1', 2, 4]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['same sku twice', [[['P', '5.2', 1, 3], ['P', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['two pairs', [[['A', '3', 1, 1], ['Z', '5.1', 1, 2], ['B', '3', 1, 5], ['C', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['A', 'Z'], ['B', 'C']]], ['gap equal ok', [[['F', '3', 1, 4], ['O', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 8', [[['H0', '5.1', 1, 6], ['H1', '3', 1, 1], ['H2', '5.2', 1, 2], ['H3', '2.1', 2, 1], ['H0', '5.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 16', [[['H0', '5.2', 1, 6], ['H1', '4.1', 1, 5], ['H2', '2.1', 1, 2], ['H3', '5.1', 1, 1], ['H4', '5.1', 1, 1], ['H5', '8', 2, 5], ['H0', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H0', 'H2'], ['H2', 'H3'], ['H2', 'H4']]]], [['generated mix 18', [[['H0', '8', 1, 4], ['H1', '5.1', 1, 3], ['H2', '4.1', 1, 3], ['H0', '8', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 73', [[['H0', '5.1', 1, 4], ['H1', '9', 1, 6], ['H2', '3', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H0', 'H2']]], ['reverse order', [[['O', '5.1', 1, 1], ['G', '2.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['G', 'O']]], ['adjacent oxidizer', [[['F', '3', 1, 4], ['O', '5.1', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['F', 'O']]], ['division match', [[['W', '4.3', 2, 2], ['C', '8', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['C', 'W']]], ['same class rule', [[['P', '5.2', 1, 3], ['Q', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['P', 'Q']]], ['generated mix 20', [[['H0', '8', 1, 5], ['H1', '5.2', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 28', [[['H0', '4.3', 2, 3], ['H1', '5.1', 1, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []]], [['generated mix 4', [[['H0', '8', 2, 3], ['H1', '8', 1, 6], ['H2', '5.1', 2, 3], ['H3', '3', 1, 3], ['H4', '4.3', 2, 4], ['H5', '4.3', 2, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['reverse order', [[['O', '5.1', 1, 1], ['G', '2.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['G', 'O']]], ['division match', [[['W', '4.3', 2, 2], ['C', '8', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['C', 'W']]], ['same class rule', [[['P', '5.2', 1, 3], ['Q', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['P', 'Q']]], ['two pairs', [[['A', '3', 1, 1], ['Z', '5.1', 1, 2], ['B', '3', 1, 5], ['C', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['A', 'Z'], ['B', 'C']]], ['gap equal ok', [[['F', '3', 1, 4], ['O', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 32', [[['H0', '9', 1, 1], ['H1', '8', 2, 6], ['H2', '4.3', 2, 4], ['H3', '4.3', 2, 4], ['H4', '4.3', 2, 3], ['H0', '9', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 40', [[['H0', '9', 2, 6], ['H1', '5.1', 1, 6], ['H2', '2.1', 2, 4], ['H3', '5.2', 2, 3], ['H4', '4.1', 1, 1], ['H5', '4.3', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H2', 'H3']]]], [['generated mix 69', [[['H0', '5.1', 1, 3], ['H1', '9', 2, 4], ['H2', '3', 1, 1], ['H3', '5.2', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 52', [[['H0', '5.2', 1, 1], ['H1', '8', 1, 5], ['H2', '5.2', 1, 1], ['H3', '5.1', 1, 6], ['H0', '5.2', 1, 4]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H0', 'H2']]], ['same class rule', [[['P', '5.2', 1, 3], ['Q', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['P', 'Q']]], ['reverse order', [[['O', '5.1', 1, 1], ['G', '2.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['G', 'O']]], ['adjacent oxidizer', [[['F', '3', 1, 4], ['O', '5.1', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['F', 'O']]], ['division match', [[['W', '4.3', 2, 2], ['C', '8', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['C', 'W']]], ['generated mix 41', [[['H0', '3', 1, 4], ['H1', '3', 2, 2], ['H2', '4.1', 1, 3], ['H3', '9', 1, 2], ['H4', '5.2', 1, 5], ['H5', '5.1', 2, 1], ['H0', '3', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H1', 'H5']]], ['generated mix 49', [[['H0', '8', 1, 6], ['H1', '5.1', 1, 5], ['H2', '5.1', 1, 3], ['H3', '5.2', 1, 4], ['H4', '4.1', 1, 6], ['H5', '4.1', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H0', 'H4']]]]]\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":"e378de75a1770e2cad72f18159cb44531f8984e1df553492c7c0a2ae62daa94e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(placements, rules):\n    def matches(cls, rule):\n        return cls == rule or cls.startswith(rule + '.')\n    found = set()\n    n = len(placements)\n    for i in range(n):\n        for j in range(i + 1, n):\n            sa, ca, aa, ba = placements[i]\n            sb, cb, ab, bb = placements[j]\n            if sa == sb or aa != ab:\n                continue\n            gap = abs(ba - bb)\n            for ra, rb, min_gap in rules:\n                hit = (matches(ca, ra) and matches(cb, rb)) or (matches(ca, rb) and matches(cb, ra))\n                if hit and gap <= min_gap:\n                    found.add(tuple(sorted([sa, sb])))\n    return [list(p) for p in sorted(found)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['gap equal ok', [[['F', '3', 1, 4], ['O', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['division match', [[['W', '4.3', 2, 2], ['C', '8', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['C', 'W']]], ['adjacent oxidizer', [[['F', '3', 1, 4], ['O', '5.1', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['F', 'O']]], ['same class rule', [[['P', '5.2', 1, 3], ['Q', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['P', 'Q']]], ['reverse order', [[['O', '5.1', 1, 1], ['G', '2.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['G', 'O']]], ['other aisle', [[['F', '3', 1, 4], ['O', '5.1', 2, 4]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 6', [[['H0', '2.1', 1, 4], ['H1', '9', 1, 1]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 14', [[['H0', '3', 1, 5], ['H1', '2.1', 2, 4], ['H2', '9', 2, 1], ['H3', '4.3', 1, 6], ['H0', '3', 1, 4]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []]], [['generated mix 66', [[['H0', '9', 1, 1], ['H1', '4.1', 2, 6], ['H2', '2.1', 1, 2], ['H3', '5.2', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 41', [[['H0', '3', 1, 4], ['H1', '3', 2, 2], ['H2', '4.1', 1, 3], ['H3', '9', 1, 2], ['H4', '5.2', 1, 5], ['H5', '5.1', 2, 1], ['H0', '3', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H1', 'H5']]], ['other aisle', [[['F', '3', 1, 4], ['O', '5.1', 2, 4]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['same sku twice', [[['P', '5.2', 1, 3], ['P', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['two pairs', [[['A', '3', 1, 1], ['Z', '5.1', 1, 2], ['B', '3', 1, 5], ['C', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['A', 'Z'], ['B', 'C']]], ['gap equal ok', [[['F', '3', 1, 4], ['O', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 8', [[['H0', '5.1', 1, 6], ['H1', '3', 1, 1], ['H2', '5.2', 1, 2], ['H3', '2.1', 2, 1], ['H0', '5.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 16', [[['H0', '5.2', 1, 6], ['H1', '4.1', 1, 5], ['H2', '2.1', 1, 2], ['H3', '5.1', 1, 1], ['H4', '5.1', 1, 1], ['H5', '8', 2, 5], ['H0', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H0', 'H2'], ['H2', 'H3'], ['H2', 'H4']]]], [['generated mix 18', [[['H0', '8', 1, 4], ['H1', '5.1', 1, 3], ['H2', '4.1', 1, 3], ['H0', '8', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 73', [[['H0', '5.1', 1, 4], ['H1', '9', 1, 6], ['H2', '3', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H0', 'H2']]], ['reverse order', [[['O', '5.1', 1, 1], ['G', '2.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['G', 'O']]], ['adjacent oxidizer', [[['F', '3', 1, 4], ['O', '5.1', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['F', 'O']]], ['division match', [[['W', '4.3', 2, 2], ['C', '8', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['C', 'W']]], ['same class rule', [[['P', '5.2', 1, 3], ['Q', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['P', 'Q']]], ['generated mix 20', [[['H0', '8', 1, 5], ['H1', '5.2', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 28', [[['H0', '4.3', 2, 3], ['H1', '5.1', 1, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []]], [['generated mix 4', [[['H0', '8', 2, 3], ['H1', '8', 1, 6], ['H2', '5.1', 2, 3], ['H3', '3', 1, 3], ['H4', '4.3', 2, 4], ['H5', '4.3', 2, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['reverse order', [[['O', '5.1', 1, 1], ['G', '2.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['G', 'O']]], ['division match', [[['W', '4.3', 2, 2], ['C', '8', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['C', 'W']]], ['same class rule', [[['P', '5.2', 1, 3], ['Q', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['P', 'Q']]], ['two pairs', [[['A', '3', 1, 1], ['Z', '5.1', 1, 2], ['B', '3', 1, 5], ['C', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['A', 'Z'], ['B', 'C']]], ['gap equal ok', [[['F', '3', 1, 4], ['O', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 32', [[['H0', '9', 1, 1], ['H1', '8', 2, 6], ['H2', '4.3', 2, 4], ['H3', '4.3', 2, 4], ['H4', '4.3', 2, 3], ['H0', '9', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 40', [[['H0', '9', 2, 6], ['H1', '5.1', 1, 6], ['H2', '2.1', 2, 4], ['H3', '5.2', 2, 3], ['H4', '4.1', 1, 1], ['H5', '4.3', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H2', 'H3']]]], [['generated mix 69', [[['H0', '5.1', 1, 3], ['H1', '9', 2, 4], ['H2', '3', 1, 1], ['H3', '5.2', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 52', [[['H0', '5.2', 1, 1], ['H1', '8', 1, 5], ['H2', '5.2', 1, 1], ['H3', '5.1', 1, 6], ['H0', '5.2', 1, 4]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H0', 'H2']]], ['same class rule', [[['P', '5.2', 1, 3], ['Q', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['P', 'Q']]], ['reverse order', [[['O', '5.1', 1, 1], ['G', '2.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['G', 'O']]], ['adjacent oxidizer', [[['F', '3', 1, 4], ['O', '5.1', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['F', 'O']]], ['division match', [[['W', '4.3', 2, 2], ['C', '8', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['C', 'W']]], ['generated mix 41', [[['H0', '3', 1, 4], ['H1', '3', 2, 2], ['H2', '4.1', 1, 3], ['H3', '9', 1, 2], ['H4', '5.2', 1, 5], ['H5', '5.1', 2, 1], ['H0', '3', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H1', 'H5']]], ['generated mix 49', [[['H0', '8', 1, 6], ['H1', '5.1', 1, 5], ['H2', '5.1', 1, 3], ['H3', '5.2', 1, 4], ['H4', '4.1', 1, 6], ['H5', '4.1', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H0', 'H4']]]]]\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"},"fixed":{"sha256":"1c210243f794940b4755ab4250db4ae7a4d255d3f317329d1100c6ae6c3b30fe","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(placements, rules):\n    def matches(cls, rule):\n        return cls == rule or cls.startswith(rule + '.')\n    found = set()\n    n = len(placements)\n    for i in range(n):\n        for j in range(i + 1, n):\n            sa, ca, aa, ba = placements[i]\n            sb, cb, ab, bb = placements[j]\n            if sa == sb or aa != ab:\n                continue\n            gap = abs(ba - bb)\n            for ra, rb, min_gap in rules:\n                hit = (matches(ca, ra) and matches(cb, rb)) or (matches(ca, rb) and matches(cb, ra))\n                if hit and gap < min_gap:\n                    found.add(tuple(sorted([sa, sb])))\n    return [list(p) for p in sorted(found)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['gap equal ok', [[['F', '3', 1, 4], ['O', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['division match', [[['W', '4.3', 2, 2], ['C', '8', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['C', 'W']]], ['adjacent oxidizer', [[['F', '3', 1, 4], ['O', '5.1', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['F', 'O']]], ['same class rule', [[['P', '5.2', 1, 3], ['Q', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['P', 'Q']]], ['reverse order', [[['O', '5.1', 1, 1], ['G', '2.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['G', 'O']]], ['other aisle', [[['F', '3', 1, 4], ['O', '5.1', 2, 4]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 6', [[['H0', '2.1', 1, 4], ['H1', '9', 1, 1]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 14', [[['H0', '3', 1, 5], ['H1', '2.1', 2, 4], ['H2', '9', 2, 1], ['H3', '4.3', 1, 6], ['H0', '3', 1, 4]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []]], [['generated mix 66', [[['H0', '9', 1, 1], ['H1', '4.1', 2, 6], ['H2', '2.1', 1, 2], ['H3', '5.2', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 41', [[['H0', '3', 1, 4], ['H1', '3', 2, 2], ['H2', '4.1', 1, 3], ['H3', '9', 1, 2], ['H4', '5.2', 1, 5], ['H5', '5.1', 2, 1], ['H0', '3', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H1', 'H5']]], ['other aisle', [[['F', '3', 1, 4], ['O', '5.1', 2, 4]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['same sku twice', [[['P', '5.2', 1, 3], ['P', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['two pairs', [[['A', '3', 1, 1], ['Z', '5.1', 1, 2], ['B', '3', 1, 5], ['C', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['A', 'Z'], ['B', 'C']]], ['gap equal ok', [[['F', '3', 1, 4], ['O', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 8', [[['H0', '5.1', 1, 6], ['H1', '3', 1, 1], ['H2', '5.2', 1, 2], ['H3', '2.1', 2, 1], ['H0', '5.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 16', [[['H0', '5.2', 1, 6], ['H1', '4.1', 1, 5], ['H2', '2.1', 1, 2], ['H3', '5.1', 1, 1], ['H4', '5.1', 1, 1], ['H5', '8', 2, 5], ['H0', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H0', 'H2'], ['H2', 'H3'], ['H2', 'H4']]]], [['generated mix 18', [[['H0', '8', 1, 4], ['H1', '5.1', 1, 3], ['H2', '4.1', 1, 3], ['H0', '8', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 73', [[['H0', '5.1', 1, 4], ['H1', '9', 1, 6], ['H2', '3', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H0', 'H2']]], ['reverse order', [[['O', '5.1', 1, 1], ['G', '2.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['G', 'O']]], ['adjacent oxidizer', [[['F', '3', 1, 4], ['O', '5.1', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['F', 'O']]], ['division match', [[['W', '4.3', 2, 2], ['C', '8', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['C', 'W']]], ['same class rule', [[['P', '5.2', 1, 3], ['Q', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['P', 'Q']]], ['generated mix 20', [[['H0', '8', 1, 5], ['H1', '5.2', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 28', [[['H0', '4.3', 2, 3], ['H1', '5.1', 1, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []]], [['generated mix 4', [[['H0', '8', 2, 3], ['H1', '8', 1, 6], ['H2', '5.1', 2, 3], ['H3', '3', 1, 3], ['H4', '4.3', 2, 4], ['H5', '4.3', 2, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['reverse order', [[['O', '5.1', 1, 1], ['G', '2.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['G', 'O']]], ['division match', [[['W', '4.3', 2, 2], ['C', '8', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['C', 'W']]], ['same class rule', [[['P', '5.2', 1, 3], ['Q', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['P', 'Q']]], ['two pairs', [[['A', '3', 1, 1], ['Z', '5.1', 1, 2], ['B', '3', 1, 5], ['C', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['A', 'Z'], ['B', 'C']]], ['gap equal ok', [[['F', '3', 1, 4], ['O', '5.1', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 32', [[['H0', '9', 1, 1], ['H1', '8', 2, 6], ['H2', '4.3', 2, 4], ['H3', '4.3', 2, 4], ['H4', '4.3', 2, 3], ['H0', '9', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 40', [[['H0', '9', 2, 6], ['H1', '5.1', 1, 6], ['H2', '2.1', 2, 4], ['H3', '5.2', 2, 3], ['H4', '4.1', 1, 1], ['H5', '4.3', 1, 6]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H2', 'H3']]]], [['generated mix 69', [[['H0', '5.1', 1, 3], ['H1', '9', 2, 4], ['H2', '3', 1, 1], ['H3', '5.2', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], []], ['generated mix 52', [[['H0', '5.2', 1, 1], ['H1', '8', 1, 5], ['H2', '5.2', 1, 1], ['H3', '5.1', 1, 6], ['H0', '5.2', 1, 4]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H0', 'H2']]], ['same class rule', [[['P', '5.2', 1, 3], ['Q', '5.2', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['P', 'Q']]], ['reverse order', [[['O', '5.1', 1, 1], ['G', '2.1', 1, 3]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['G', 'O']]], ['adjacent oxidizer', [[['F', '3', 1, 4], ['O', '5.1', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['F', 'O']]], ['division match', [[['W', '4.3', 2, 2], ['C', '8', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['C', 'W']]], ['generated mix 41', [[['H0', '3', 1, 4], ['H1', '3', 2, 2], ['H2', '4.1', 1, 3], ['H3', '9', 1, 2], ['H4', '5.2', 1, 5], ['H5', '5.1', 2, 1], ['H0', '3', 1, 5]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H1', 'H5']]], ['generated mix 49', [[['H0', '8', 1, 6], ['H1', '5.1', 1, 5], ['H2', '5.1', 1, 3], ['H3', '5.2', 1, 4], ['H4', '4.1', 1, 6], ['H5', '4.1', 2, 2]], [['3', '5.1', 2], ['4', '8', 1], ['5.2', '5.2', 1], ['2.1', '5', 3]]], [['H0', 'H4']]]]]\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 bay-gap rule table; not a regulatory segregation chart. 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-hazmat-segregation-gap-threshold","generated_at":"2026-09-29T14:52:09.880865+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Dangerous goods storage requires separation between incompatible hazard classes.","repair":"Flag only gaps strictly below the minimum separation.","root_cause":"The separation check treats a gap equal to the minimum as insufficient.","sha256":"7e5b0e1929b23d7e362eab1e6f4c606013356fc539cef74b5c60dc1af0005ce8","title":"Hazmat audit: required separation treated as violation · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.337,"exit_code":1,"observations":[{"actual":[],"check":"gap equal ok","expected":[],"passed":true},{"actual":[],"check":"division match","expected":[["C","W"]],"passed":false},{"actual":[],"check":"adjacent oxidizer","expected":[["F","O"]],"passed":false},{"actual":[],"check":"same class rule","expected":[["P","Q"]],"passed":false},{"actual":[],"check":"reverse order","expected":[["G","O"]],"passed":false},{"actual":[],"check":"other aisle","expected":[],"passed":true},{"actual":[],"check":"generated mix 6","expected":[],"passed":true},{"actual":[],"check":"generated mix 14","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"gap equal ok\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"division match\", \"actual\": [], \"expected\": [[\"C\", \"W\"]], \"passed\": false}, {\"check\": \"adjacent oxidizer\", \"actual\": [], \"expected\": [[\"F\", \"O\"]], \"passed\": false}, {\"check\": \"same class rule\", \"actual\": [], \"expected\": [[\"P\", \"Q\"]], \"passed\": false}, {\"check\": \"reverse order\", \"actual\": [], \"expected\": [[\"G\", \"O\"]], \"passed\": false}, {\"check\": \"other aisle\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"generated mix 6\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"generated mix 14\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.099,"exit_code":1,"observations":[{"actual":[["F","O"]],"check":"gap equal ok","expected":[],"passed":false},{"actual":[["C","W"]],"check":"division match","expected":[["C","W"]],"passed":true},{"actual":[["F","O"]],"check":"adjacent oxidizer","expected":[["F","O"]],"passed":true},{"actual":[["P","Q"]],"check":"same class rule","expected":[["P","Q"]],"passed":true},{"actual":[["G","O"]],"check":"reverse order","expected":[["G","O"]],"passed":true},{"actual":[],"check":"other aisle","expected":[],"passed":true},{"actual":[],"check":"generated mix 6","expected":[],"passed":true},{"actual":[],"check":"generated mix 14","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"gap equal ok\", \"actual\": [[\"F\", \"O\"]], \"expected\": [], \"passed\": false}, {\"check\": \"division match\", \"actual\": [[\"C\", \"W\"]], \"expected\": [[\"C\", \"W\"]], \"passed\": true}, {\"check\": \"adjacent oxidizer\", \"actual\": [[\"F\", \"O\"]], \"expected\": [[\"F\", \"O\"]], \"passed\": true}, {\"check\": \"same class rule\", \"actual\": [[\"P\", \"Q\"]], \"expected\": [[\"P\", \"Q\"]], \"passed\": true}, {\"check\": \"reverse order\", \"actual\": [[\"G\", \"O\"]], \"expected\": [[\"G\", \"O\"]], \"passed\": true}, {\"check\": \"other aisle\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"generated mix 6\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"generated mix 14\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.372,"exit_code":0,"observations":[{"actual":[],"check":"gap equal ok","expected":[],"passed":true},{"actual":[["C","W"]],"check":"division match","expected":[["C","W"]],"passed":true},{"actual":[["F","O"]],"check":"adjacent oxidizer","expected":[["F","O"]],"passed":true},{"actual":[["P","Q"]],"check":"same class rule","expected":[["P","Q"]],"passed":true},{"actual":[["G","O"]],"check":"reverse order","expected":[["G","O"]],"passed":true},{"actual":[],"check":"other aisle","expected":[],"passed":true},{"actual":[],"check":"generated mix 6","expected":[],"passed":true},{"actual":[],"check":"generated mix 14","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"gap equal ok\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"division match\", \"actual\": [[\"C\", \"W\"]], \"expected\": [[\"C\", \"W\"]], \"passed\": true}, {\"check\": \"adjacent oxidizer\", \"actual\": [[\"F\", \"O\"]], \"expected\": [[\"F\", \"O\"]], \"passed\": true}, {\"check\": \"same class rule\", \"actual\": [[\"P\", \"Q\"]], \"expected\": [[\"P\", \"Q\"]], \"passed\": true}, {\"check\": \"reverse order\", \"actual\": [[\"G\", \"O\"]], \"expected\": [[\"G\", \"O\"]], \"passed\": true}, {\"check\": \"other aisle\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"generated mix 6\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"generated mix 14\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}