{"abstract":"Groups are reported in root order rather than by their first polygon.","category":"GIS polygon topology","checks":8,"contract":"Input [polygons, keys]: closed rings on a noded coverage and one attribute value per polygon. Polygons are merged when their keys are exactly equal (type-sensitive, None never merges) and they share at least one edge, transitively. Return the groups as ascending index lists, the list of groups sorted by first index.","contract_signature":"x","evaluation_group":"w2-gis-polygon-topology-dissolve-by-attribute","failed_approach":"Sorting by group size does not order groups by their first index.","family":"w2-gis-polygon-topology-dissolve-by-attribute-group-ordering","id":"FA-70796","implementations":{"attempt":{"sha256":"9c467f9a3023484167808c7b4649834e7788fb13f5f4799f553addef21023fb5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    polys, keys = x\n    def edges(r):\n        return {tuple(sorted([tuple(a), tuple(b)])) for a, b in zip(r, r[1:]) if a != b}\n    E = [edges(p) for p in polys]\n    parent = list(range(len(polys)))\n    def find(a):\n        while parent[a] != a:\n            a = parent[a]\n        return a\n    for i in range(len(polys)):\n        for j in range(i + 1, len(polys)):\n            if keys[i] is not None and keys[i] == keys[j] and E[i] & E[j]:\n                parent[find(i)] = find(j)\n    groups = {}\n    for i in range(len(polys)):\n        groups.setdefault(find(i), []).append(i)\n    return sorted(groups.values(), key=len)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'a', 'b', 'a', 'b', 'b', 'c', 'c', 'c']], [[0, 1, 3], [2, 4, 5], [6, 7, 8]]), ('regression #1', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a']], [[0], [1], [2], [3], [4], [5], [6], [7], [8]]), ('regression #2', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'a', 'a', 'b', 'b', 'a', 'a', 'a', 'a']], [[0, 1, 2, 5, 6, 7, 8], [3, 4]]), ('regression #3', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [None, None, 'x', 'x', None, 'x', None, None, 'x']], [[0], [1], [2, 5, 8], [3], [4], [6], [7]]), ('regression #4', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [1, '1', 1, 2, 2, '2', 1, 1, 1]], [[0], [1], [2], [3, 4], [5], [6, 7, 8]]), ('regression #5', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['', '', 'k', 'k', '', 'k', 'k', 'k', 'k']], [[0, 1, 4], [2, 3, 5, 6, 7, 8]]), ('control #6', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z']], [[0, 1, 2, 3, 4, 5, 6, 7, 8]]), ('control #7', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']], [[0], [1], [2], [3], [4], [5], [6], [7], [8]])], [('regression #3', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [None, None, 'x', 'x', None, 'x', None, None, 'x']], [[0], [1], [2, 5, 8], [3], [4], [6], [7]]), ('regression #4', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [1, '1', 1, 2, 2, '2', 1, 1, 1]], [[0], [1], [2], [3, 4], [5], [6, 7, 8]]), ('regression #5', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['', '', 'k', 'k', '', 'k', 'k', 'k', 'k']], [[0, 1, 4], [2, 3, 5, 6, 7, 8]]), ('control #6', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z']], [[0, 1, 2, 3, 4, 5, 6, 7, 8]]), ('control #7', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']], [[0], [1], [2], [3], [4], [5], [6], [7], [8]]), ('regression #8', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c']], [[0, 3, 6], [1, 4, 7], [2, 5, 8]]), ('regression #9', [[[[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]]], ['q', 'q', 'q', 'r']], [[0, 1, 2], [3]]), ('regression #10', [[[[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]]], ['m', 'm', 'm', 'm']], [[0, 1, 2], [3]])], [('regression #4', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [1, '1', 1, 2, 2, '2', 1, 1, 1]], [[0], [1], [2], [3, 4], [5], [6, 7, 8]]), ('control #7', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']], [[0], [1], [2], [3], [4], [5], [6], [7], [8]]), ('regression #8', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c']], [[0, 3, 6], [1, 4, 7], [2, 5, 8]]), ('regression #9', [[[[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]]], ['q', 'q', 'q', 'r']], [[0, 1, 2], [3]]), ('regression #10', [[[[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]]], ['m', 'm', 'm', 'm']], [[0, 1, 2], [3]]), ('regression #11', [[[[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]]], ['s', 's', 't', 's', 's']], [[0, 1], [2], [3, 4]]), ('boundary #12', [[], []], []), ('regression #13', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['p', 'q', 'q', 'p', 'q', 'p', 'p', 'p', 'p']], [[0, 3, 5, 6, 7, 8], [1, 2, 4]])], [('control #0', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'a', 'b', 'a', 'b', 'b', 'c', 'c', 'c']], [[0, 1, 3], [2, 4, 5], [6, 7, 8]]), ('regression #1', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a']], [[0], [1], [2], [3], [4], [5], [6], [7], [8]]), ('regression #9', [[[[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]]], ['q', 'q', 'q', 'r']], [[0, 1, 2], [3]]), ('regression #10', [[[[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]]], ['m', 'm', 'm', 'm']], [[0, 1, 2], [3]]), ('regression #11', [[[[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]]], ['s', 's', 't', 's', 's']], [[0, 1], [2], [3, 4]]), ('boundary #12', [[], []], []), ('regression #13', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['p', 'q', 'q', 'p', 'q', 'p', 'p', 'p', 'p']], [[0, 3, 5, 6, 7, 8], [1, 2, 4]]), ('regression #14', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]]], ['w', 'w', 'w', 'w']], [[0, 1, 3], [2]])], [('control #0', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'a', 'b', 'a', 'b', 'b', 'c', 'c', 'c']], [[0, 1, 3], [2, 4, 5], [6, 7, 8]]), ('regression #1', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a']], [[0], [1], [2], [3], [4], [5], [6], [7], [8]]), ('regression #2', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'a', 'a', 'b', 'b', 'a', 'a', 'a', 'a']], [[0, 1, 2, 5, 6, 7, 8], [3, 4]]), ('regression #3', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [None, None, 'x', 'x', None, 'x', None, None, 'x']], [[0], [1], [2, 5, 8], [3], [4], [6], [7]]), ('regression #4', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [1, '1', 1, 2, 2, '2', 1, 1, 1]], [[0], [1], [2], [3, 4], [5], [6, 7, 8]]), ('regression #5', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['', '', 'k', 'k', '', 'k', 'k', 'k', 'k']], [[0, 1, 4], [2, 3, 5, 6, 7, 8]]), ('regression #11', [[[[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]]], ['s', 's', 't', 's', 's']], [[0, 1], [2], [3, 4]]), ('regression #14', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]]], ['w', 'w', 'w', 'w']], [[0, 1, 3], [2]])]]\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":"8056a5141e579c1d92e285389c1a75250d3fd9dc8f0570bfc0bb3dba34a0efe5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    polys, keys = x\n    def edges(r):\n        return {tuple(sorted([tuple(a), tuple(b)])) for a, b in zip(r, r[1:]) if a != b}\n    E = [edges(p) for p in polys]\n    parent = list(range(len(polys)))\n    def find(a):\n        while parent[a] != a:\n            a = parent[a]\n        return a\n    for i in range(len(polys)):\n        for j in range(i + 1, len(polys)):\n            if keys[i] is not None and keys[i] == keys[j] and E[i] & E[j]:\n                parent[find(i)] = find(j)\n    groups = {}\n    for i in range(len(polys)):\n        groups.setdefault(find(i), []).append(i)\n    return sorted(groups.values(), key=lambda g: find(g[0]))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'a', 'b', 'a', 'b', 'b', 'c', 'c', 'c']], [[0, 1, 3], [2, 4, 5], [6, 7, 8]]), ('regression #1', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a']], [[0], [1], [2], [3], [4], [5], [6], [7], [8]]), ('regression #2', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'a', 'a', 'b', 'b', 'a', 'a', 'a', 'a']], [[0, 1, 2, 5, 6, 7, 8], [3, 4]]), ('regression #3', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [None, None, 'x', 'x', None, 'x', None, None, 'x']], [[0], [1], [2, 5, 8], [3], [4], [6], [7]]), ('regression #4', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [1, '1', 1, 2, 2, '2', 1, 1, 1]], [[0], [1], [2], [3, 4], [5], [6, 7, 8]]), ('regression #5', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['', '', 'k', 'k', '', 'k', 'k', 'k', 'k']], [[0, 1, 4], [2, 3, 5, 6, 7, 8]]), ('control #6', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z']], [[0, 1, 2, 3, 4, 5, 6, 7, 8]]), ('control #7', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']], [[0], [1], [2], [3], [4], [5], [6], [7], [8]])], [('regression #3', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [None, None, 'x', 'x', None, 'x', None, None, 'x']], [[0], [1], [2, 5, 8], [3], [4], [6], [7]]), ('regression #4', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [1, '1', 1, 2, 2, '2', 1, 1, 1]], [[0], [1], [2], [3, 4], [5], [6, 7, 8]]), ('regression #5', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['', '', 'k', 'k', '', 'k', 'k', 'k', 'k']], [[0, 1, 4], [2, 3, 5, 6, 7, 8]]), ('control #6', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['z', 'z', 'z', 'z', 'z', 'z', 'z', 'z', 'z']], [[0, 1, 2, 3, 4, 5, 6, 7, 8]]), ('control #7', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']], [[0], [1], [2], [3], [4], [5], [6], [7], [8]]), ('regression #8', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c']], [[0, 3, 6], [1, 4, 7], [2, 5, 8]]), ('regression #9', [[[[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]]], ['q', 'q', 'q', 'r']], [[0, 1, 2], [3]]), ('regression #10', [[[[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]]], ['m', 'm', 'm', 'm']], [[0, 1, 2], [3]])], [('regression #4', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [1, '1', 1, 2, 2, '2', 1, 1, 1]], [[0], [1], [2], [3, 4], [5], [6, 7, 8]]), ('control #7', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']], [[0], [1], [2], [3], [4], [5], [6], [7], [8]]), ('regression #8', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c']], [[0, 3, 6], [1, 4, 7], [2, 5, 8]]), ('regression #9', [[[[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]]], ['q', 'q', 'q', 'r']], [[0, 1, 2], [3]]), ('regression #10', [[[[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]]], ['m', 'm', 'm', 'm']], [[0, 1, 2], [3]]), ('regression #11', [[[[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]]], ['s', 's', 't', 's', 's']], [[0, 1], [2], [3, 4]]), ('boundary #12', [[], []], []), ('regression #13', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['p', 'q', 'q', 'p', 'q', 'p', 'p', 'p', 'p']], [[0, 3, 5, 6, 7, 8], [1, 2, 4]])], [('control #0', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'a', 'b', 'a', 'b', 'b', 'c', 'c', 'c']], [[0, 1, 3], [2, 4, 5], [6, 7, 8]]), ('regression #1', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a']], [[0], [1], [2], [3], [4], [5], [6], [7], [8]]), ('regression #9', [[[[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]]], ['q', 'q', 'q', 'r']], [[0, 1, 2], [3]]), ('regression #10', [[[[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]]], ['m', 'm', 'm', 'm']], [[0, 1, 2], [3]]), ('regression #11', [[[[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]]], ['s', 's', 't', 's', 's']], [[0, 1], [2], [3, 4]]), ('boundary #12', [[], []], []), ('regression #13', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['p', 'q', 'q', 'p', 'q', 'p', 'p', 'p', 'p']], [[0, 3, 5, 6, 7, 8], [1, 2, 4]]), ('regression #14', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]]], ['w', 'w', 'w', 'w']], [[0, 1, 3], [2]])], [('control #0', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'a', 'b', 'a', 'b', 'b', 'c', 'c', 'c']], [[0, 1, 3], [2, 4, 5], [6, 7, 8]]), ('regression #1', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a']], [[0], [1], [2], [3], [4], [5], [6], [7], [8]]), ('regression #2', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['a', 'a', 'a', 'b', 'b', 'a', 'a', 'a', 'a']], [[0, 1, 2, 5, 6, 7, 8], [3, 4]]), ('regression #3', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [None, None, 'x', 'x', None, 'x', None, None, 'x']], [[0], [1], [2, 5, 8], [3], [4], [6], [7]]), ('regression #4', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], [1, '1', 1, 2, 2, '2', 1, 1, 1]], [[0], [1], [2], [3, 4], [5], [6, 7, 8]]), ('regression #5', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 2], [6, 2], [6, 4], [4, 4], [4, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]], [[2, 4], [4, 4], [4, 6], [2, 6], [2, 4]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]]], ['', '', 'k', 'k', '', 'k', 'k', 'k', 'k']], [[0, 1, 4], [2, 3, 5, 6, 7, 8]]), ('regression #11', [[[[4, 0], [6, 0], [6, 2], [4, 2], [4, 0]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]], [[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[0, 2], [2, 2], [2, 4], [0, 4], [0, 2]], [[0, 4], [2, 4], [2, 6], [0, 6], [0, 4]]], ['s', 's', 't', 's', 's']], [[0, 1], [2], [3, 4]]), ('regression #14', [[[[0, 0], [2, 0], [2, 2], [0, 2], [0, 0]], [[2, 2], [4, 2], [4, 4], [2, 4], [2, 2]], [[4, 4], [6, 4], [6, 6], [4, 6], [4, 4]], [[2, 0], [4, 0], [4, 2], [2, 2], [2, 0]]], ['w', 'w', 'w', 'w']], [[0, 1, 3], [2]])]]\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 deterministic toy contract on a bounded input domain; results are rounded as stated and no conformance with any published standard or library is claimed. 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-gis-polygon-topology-dissolve-by-attribute-group-ordering","generated_at":"2026-09-29T14:48:23.963816+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Dissolving parcels into zoning or ownership blocks is a core GIS operation; grouping errors merge blocks that only touch at a corner or split contiguous ones.","root_cause":"Groups are sorted by their union-find root index, which is an arbitrary member rather than the first one.","sha256":"7c733ed20eed4115bf1cbd0ca244d952c8dc69ddab7f9ed9356dfbf533a2c649","title":"Dissolve grouping by attribute and shared edges: group ordering · 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":44.287,"exit_code":1,"observations":[{"actual":[[0,1,3],[2,4,5],[6,7,8]],"check":"control #0","expected":[[0,1,3],[2,4,5],[6,7,8]],"passed":true},{"actual":[[0],[1],[2],[3],[4],[5],[6],[7],[8]],"check":"regression #1","expected":[[0],[1],[2],[3],[4],[5],[6],[7],[8]],"passed":true},{"actual":[[3,4],[0,1,2,5,6,7,8]],"check":"regression #2","expected":[[0,1,2,5,6,7,8],[3,4]],"passed":false},{"actual":[[0],[1],[3],[4],[6],[7],[2,5,8]],"check":"regression #3","expected":[[0],[1],[2,5,8],[3],[4],[6],[7]],"passed":false},{"actual":[[0],[1],[2],[5],[3,4],[6,7,8]],"check":"regression #4","expected":[[0],[1],[2],[3,4],[5],[6,7,8]],"passed":false},{"actual":[[0,1,4],[2,3,5,6,7,8]],"check":"regression #5","expected":[[0,1,4],[2,3,5,6,7,8]],"passed":true},{"actual":[[0,1,2,3,4,5,6,7,8]],"check":"control #6","expected":[[0,1,2,3,4,5,6,7,8]],"passed":true},{"actual":[[0],[1],[2],[3],[4],[5],[6],[7],[8]],"check":"control #7","expected":[[0],[1],[2],[3],[4],[5],[6],[7],[8]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [[0, 1, 3], [2, 4, 5], [6, 7, 8]], \"expected\": [[0, 1, 3], [2, 4, 5], [6, 7, 8]], \"passed\": true}, {\"check\": \"regression #1\", \"actual\": [[0], [1], [2], [3], [4], [5], [6], [7], [8]], \"expected\": [[0], [1], [2], [3], [4], [5], [6], [7], [8]], \"passed\": true}, {\"check\": \"regression #2\", \"actual\": [[3, 4], [0, 1, 2, 5, 6, 7, 8]], \"expected\": [[0, 1, 2, 5, 6, 7, 8], [3, 4]], \"passed\": false}, {\"check\": \"regression #3\", \"actual\": [[0], [1], [3], [4], [6], [7], [2, 5, 8]], \"expected\": [[0], [1], [2, 5, 8], [3], [4], [6], [7]], \"passed\": false}, {\"check\": \"regression #4\", \"actual\": [[0], [1], [2], [5], [3, 4], [6, 7, 8]], \"expected\": [[0], [1], [2], [3, 4], [5], [6, 7, 8]], \"passed\": false}, {\"check\": \"regression #5\", \"actual\": [[0, 1, 4], [2, 3, 5, 6, 7, 8]], \"expected\": [[0, 1, 4], [2, 3, 5, 6, 7, 8]], \"passed\": true}, {\"check\": \"control #6\", \"actual\": [[0, 1, 2, 3, 4, 5, 6, 7, 8]], \"expected\": [[0, 1, 2, 3, 4, 5, 6, 7, 8]], \"passed\": true}, {\"check\": \"control #7\", \"actual\": [[0], [1], [2], [3], [4], [5], [6], [7], [8]], \"expected\": [[0], [1], [2], [3], [4], [5], [6], [7], [8]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.902,"exit_code":1,"observations":[{"actual":[[0,1,3],[2,4,5],[6,7,8]],"check":"control #0","expected":[[0,1,3],[2,4,5],[6,7,8]],"passed":true},{"actual":[[0],[1],[2],[3],[4],[5],[6],[7],[8]],"check":"regression #1","expected":[[0],[1],[2],[3],[4],[5],[6],[7],[8]],"passed":true},{"actual":[[3,4],[0,1,2,5,6,7,8]],"check":"regression #2","expected":[[0,1,2,5,6,7,8],[3,4]],"passed":false},{"actual":[[0],[1],[3],[4],[6],[7],[2,5,8]],"check":"regression #3","expected":[[0],[1],[2,5,8],[3],[4],[6],[7]],"passed":false},{"actual":[[0],[1],[2],[3,4],[5],[6,7,8]],"check":"regression #4","expected":[[0],[1],[2],[3,4],[5],[6,7,8]],"passed":true},{"actual":[[0,1,4],[2,3,5,6,7,8]],"check":"regression #5","expected":[[0,1,4],[2,3,5,6,7,8]],"passed":true},{"actual":[[0,1,2,3,4,5,6,7,8]],"check":"control #6","expected":[[0,1,2,3,4,5,6,7,8]],"passed":true},{"actual":[[0],[1],[2],[3],[4],[5],[6],[7],[8]],"check":"control #7","expected":[[0],[1],[2],[3],[4],[5],[6],[7],[8]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [[0, 1, 3], [2, 4, 5], [6, 7, 8]], \"expected\": [[0, 1, 3], [2, 4, 5], [6, 7, 8]], \"passed\": true}, {\"check\": \"regression #1\", \"actual\": [[0], [1], [2], [3], [4], [5], [6], [7], [8]], \"expected\": [[0], [1], [2], [3], [4], [5], [6], [7], [8]], \"passed\": true}, {\"check\": \"regression #2\", \"actual\": [[3, 4], [0, 1, 2, 5, 6, 7, 8]], \"expected\": [[0, 1, 2, 5, 6, 7, 8], [3, 4]], \"passed\": false}, {\"check\": \"regression #3\", \"actual\": [[0], [1], [3], [4], [6], [7], [2, 5, 8]], \"expected\": [[0], [1], [2, 5, 8], [3], [4], [6], [7]], \"passed\": false}, {\"check\": \"regression #4\", \"actual\": [[0], [1], [2], [3, 4], [5], [6, 7, 8]], \"expected\": [[0], [1], [2], [3, 4], [5], [6, 7, 8]], \"passed\": true}, {\"check\": \"regression #5\", \"actual\": [[0, 1, 4], [2, 3, 5, 6, 7, 8]], \"expected\": [[0, 1, 4], [2, 3, 5, 6, 7, 8]], \"passed\": true}, {\"check\": \"control #6\", \"actual\": [[0, 1, 2, 3, 4, 5, 6, 7, 8]], \"expected\": [[0, 1, 2, 3, 4, 5, 6, 7, 8]], \"passed\": true}, {\"check\": \"control #7\", \"actual\": [[0], [1], [2], [3], [4], [5], [6], [7], [8]], \"expected\": [[0], [1], [2], [3], [4], [5], [6], [7], [8]], \"passed\": true}], \"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."}}