{"abstract":"A replica never learns increments from replicas it has not heard from directly before.","category":"CRDT convergence","checks":7,"contract":"Each replica keeps a grow-only map replica->count. [\"inc\", r, k] adds positive integer k to r's own slot; a non-positive k is rejected and counted. [\"sync\", src, dst] merges src into dst by pointwise maximum. Return per-replica values (sum of slots), the rejection count, and the first replica's sorted slots.","contract_signature":"events, replicas","evaluation_group":"w2-crdt-convergence-g-counter-gossip","failed_approach":"Also admitting the sender's own slot still drops third-party slots that arrive by transitive gossip.","family":"w2-crdt-convergence-g-counter-gossip-merge-key-scope","id":"FA-74856","implementations":{"attempt":{"sha256":"1136251ea27eddeecf318d47622d095cbebc3cb234be829b6419421977fb383c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events, replicas):\n    state = {r: {} for r in replicas}\n    rejected = 0\n    for ev in events:\n        if ev[0] == 'inc':\n            r, amount = ev[1], ev[2]\n            if amount <= 0:\n                rejected += 1\n                continue\n            state[r][r] = state[r].get(r, 0) + amount\n        elif ev[0] == 'sync':\n            src, dst = state[ev[1]], state[ev[2]]\n            for k, v in src.items():\n                if k in dst or k == ev[1]:\n                    dst[k] = max(dst.get(k, 0), v)\n    values = [sum(state[r].values()) for r in replicas]\n    return {'values': values, 'rejected': rejected, 'state': sorted([k, v] for k, v in state[replicas[0]].items())}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {\n    1: [('repeated sync is idempotent', [[['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'a', 'b'], ['inc', 'b', 2], ['sync', 'b', 'a']], ['a', 'b', 'c', 'd']], {'values': [4, 4, 0, 0], 'rejected': 0, 'state': [['a', 2], ['b', 2]]}), ('transitive gossip carries third-party slots', [[['inc', 'a', 1], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['inc', 'c', 1], ['sync', 'c', 'd']], ['a', 'b', 'c', 'd']], {'values': [1, 1, 2, 2], 'rejected': 0, 'state': [['a', 1]]}), ('stale path does not regress a slot', [[['inc', 'a', 1], ['sync', 'a', 'd'], ['inc', 'a', 1], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['sync', 'd', 'c']], ['a', 'b', 'c', 'd']], {'values': [2, 2, 2, 1], 'rejected': 0, 'state': [['a', 2]]}), ('zero and negative amounts are rejected', [[['inc', 'a', 0], ['inc', 'b', -1], ['inc', 'c', 2], ['sync', 'c', 'a'], ['inc', 'a', 3]], ['a', 'b', 'c', 'd']], {'values': [5, 0, 2, 0], 'rejected': 2, 'state': [['a', 3], ['c', 2]]}), ('concurrent increments all survive', [[['inc', 'a', 1], ['inc', 'b', 3], ['inc', 'c', 1], ['sync', 'a', 'b'], ['sync', 'c', 'b'], ['sync', 'b', 'a'], ['sync', 'b', 'c']], ['a', 'b', 'c', 'd']], {'values': [5, 5, 5, 0], 'rejected': 0, 'state': [['a', 1], ['b', 3], ['c', 1]]}), ('empty history', [[], ['a', 'b', 'c', 'd']], {'values': [0, 0, 0, 0], 'rejected': 0, 'state': []}), ('repeated local increments accumulate', [[['inc', 'a', 1], ['sync', 'a', 'a'], ['inc', 'a', 1], ['inc', 'd', 1]], ['a', 'b', 'c', 'd']], {'values': [2, 0, 0, 1], 'rejected': 0, 'state': [['a', 2]]})],\n    2: [('repeated sync is idempotent', [[['inc', 'a', 3], ['sync', 'a', 'b'], ['sync', 'a', 'b'], ['inc', 'b', 2], ['sync', 'b', 'a']], ['a', 'b', 'c', 'd']], {'values': [5, 5, 0, 0], 'rejected': 0, 'state': [['a', 3], ['b', 2]]}), ('transitive gossip carries third-party slots', [[['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['inc', 'c', 1], ['sync', 'c', 'd']], ['a', 'b', 'c', 'd']], {'values': [2, 2, 3, 3], 'rejected': 0, 'state': [['a', 2]]}), ('stale path does not regress a slot', [[['inc', 'a', 1], ['sync', 'a', 'd'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['sync', 'd', 'c']], ['a', 'b', 'c', 'd']], {'values': [3, 3, 3, 1], 'rejected': 0, 'state': [['a', 3]]}), ('zero and negative amounts are rejected', [[['inc', 'a', 0], ['inc', 'b', -2], ['inc', 'c', 2], ['sync', 'c', 'a'], ['inc', 'a', 3]], ['a', 'b', 'c', 'd']], {'values': [5, 0, 2, 0], 'rejected': 2, 'state': [['a', 3], ['c', 2]]}), ('concurrent increments all survive', [[['inc', 'a', 2], ['inc', 'b', 4], ['inc', 'c', 1], ['sync', 'a', 'b'], ['sync', 'c', 'b'], ['sync', 'b', 'a'], ['sync', 'b', 'c']], ['a', 'b', 'c', 'd']], {'values': [7, 7, 7, 0], 'rejected': 0, 'state': [['a', 2], ['b', 4], ['c', 1]]}), ('empty history', [[], ['a', 'b', 'c', 'd']], {'values': [0, 0, 0, 0], 'rejected': 0, 'state': []}), ('repeated local increments accumulate', [[['inc', 'a', 2], ['sync', 'a', 'a'], ['inc', 'a', 1], ['inc', 'd', 2]], ['a', 'b', 'c', 'd']], {'values': [3, 0, 0, 2], 'rejected': 0, 'state': [['a', 3]]})],\n    3: [('repeated sync is idempotent', [[['inc', 'a', 4], ['sync', 'a', 'b'], ['sync', 'a', 'b'], ['inc', 'b', 2], ['sync', 'b', 'a']], ['a', 'b', 'c', 'd']], {'values': [6, 6, 0, 0], 'rejected': 0, 'state': [['a', 4], ['b', 2]]}), ('transitive gossip carries third-party slots', [[['inc', 'a', 3], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['inc', 'c', 1], ['sync', 'c', 'd']], ['a', 'b', 'c', 'd']], {'values': [3, 3, 4, 4], 'rejected': 0, 'state': [['a', 3]]}), ('stale path does not regress a slot', [[['inc', 'a', 1], ['sync', 'a', 'd'], ['inc', 'a', 3], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['sync', 'd', 'c']], ['a', 'b', 'c', 'd']], {'values': [4, 4, 4, 1], 'rejected': 0, 'state': [['a', 4]]}), ('zero and negative amounts are rejected', [[['inc', 'a', 0], ['inc', 'b', -3], ['inc', 'c', 2], ['sync', 'c', 'a'], ['inc', 'a', 3]], ['a', 'b', 'c', 'd']], {'values': [5, 0, 2, 0], 'rejected': 2, 'state': [['a', 3], ['c', 2]]}), ('concurrent increments all survive', [[['inc', 'a', 3], ['inc', 'b', 5], ['inc', 'c', 1], ['sync', 'a', 'b'], ['sync', 'c', 'b'], ['sync', 'b', 'a'], ['sync', 'b', 'c']], ['a', 'b', 'c', 'd']], {'values': [9, 9, 9, 0], 'rejected': 0, 'state': [['a', 3], ['b', 5], ['c', 1]]}), ('empty history', [[], ['a', 'b', 'c', 'd']], {'values': [0, 0, 0, 0], 'rejected': 0, 'state': []}), ('repeated local increments accumulate', [[['inc', 'a', 3], ['sync', 'a', 'a'], ['inc', 'a', 1], ['inc', 'd', 3]], ['a', 'b', 'c', 'd']], {'values': [4, 0, 0, 3], 'rejected': 0, 'state': [['a', 4]]})],\n    4: [('repeated sync is idempotent', [[['inc', 'a', 5], ['sync', 'a', 'b'], ['sync', 'a', 'b'], ['inc', 'b', 2], ['sync', 'b', 'a']], ['a', 'b', 'c', 'd']], {'values': [7, 7, 0, 0], 'rejected': 0, 'state': [['a', 5], ['b', 2]]}), ('transitive gossip carries third-party slots', [[['inc', 'a', 4], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['inc', 'c', 1], ['sync', 'c', 'd']], ['a', 'b', 'c', 'd']], {'values': [4, 4, 5, 5], 'rejected': 0, 'state': [['a', 4]]}), ('stale path does not regress a slot', [[['inc', 'a', 1], ['sync', 'a', 'd'], ['inc', 'a', 4], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['sync', 'd', 'c']], ['a', 'b', 'c', 'd']], {'values': [5, 5, 5, 1], 'rejected': 0, 'state': [['a', 5]]}), ('zero and negative amounts are rejected', [[['inc', 'a', 0], ['inc', 'b', -4], ['inc', 'c', 2], ['sync', 'c', 'a'], ['inc', 'a', 3]], ['a', 'b', 'c', 'd']], {'values': [5, 0, 2, 0], 'rejected': 2, 'state': [['a', 3], ['c', 2]]}), ('concurrent increments all survive', [[['inc', 'a', 4], ['inc', 'b', 6], ['inc', 'c', 1], ['sync', 'a', 'b'], ['sync', 'c', 'b'], ['sync', 'b', 'a'], ['sync', 'b', 'c']], ['a', 'b', 'c', 'd']], {'values': [11, 11, 11, 0], 'rejected': 0, 'state': [['a', 4], ['b', 6], ['c', 1]]}), ('empty history', [[], ['a', 'b', 'c', 'd']], {'values': [0, 0, 0, 0], 'rejected': 0, 'state': []}), ('repeated local increments accumulate', [[['inc', 'a', 4], ['sync', 'a', 'a'], ['inc', 'a', 1], ['inc', 'd', 4]], ['a', 'b', 'c', 'd']], {'values': [5, 0, 0, 4], 'rejected': 0, 'state': [['a', 5]]})],\n    5: [('repeated sync is idempotent', [[['inc', 'a', 6], ['sync', 'a', 'b'], ['sync', 'a', 'b'], ['inc', 'b', 2], ['sync', 'b', 'a']], ['a', 'b', 'c', 'd']], {'values': [8, 8, 0, 0], 'rejected': 0, 'state': [['a', 6], ['b', 2]]}), ('transitive gossip carries third-party slots', [[['inc', 'a', 5], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['inc', 'c', 1], ['sync', 'c', 'd']], ['a', 'b', 'c', 'd']], {'values': [5, 5, 6, 6], 'rejected': 0, 'state': [['a', 5]]}), ('stale path does not regress a slot', [[['inc', 'a', 1], ['sync', 'a', 'd'], ['inc', 'a', 5], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['sync', 'd', 'c']], ['a', 'b', 'c', 'd']], {'values': [6, 6, 6, 1], 'rejected': 0, 'state': [['a', 6]]}), ('zero and negative amounts are rejected', [[['inc', 'a', 0], ['inc', 'b', -5], ['inc', 'c', 2], ['sync', 'c', 'a'], ['inc', 'a', 3]], ['a', 'b', 'c', 'd']], {'values': [5, 0, 2, 0], 'rejected': 2, 'state': [['a', 3], ['c', 2]]}), ('concurrent increments all survive', [[['inc', 'a', 5], ['inc', 'b', 7], ['inc', 'c', 1], ['sync', 'a', 'b'], ['sync', 'c', 'b'], ['sync', 'b', 'a'], ['sync', 'b', 'c']], ['a', 'b', 'c', 'd']], {'values': [13, 13, 13, 0], 'rejected': 0, 'state': [['a', 5], ['b', 7], ['c', 1]]}), ('empty history', [[], ['a', 'b', 'c', 'd']], {'values': [0, 0, 0, 0], 'rejected': 0, 'state': []}), ('repeated local increments accumulate', [[['inc', 'a', 5], ['sync', 'a', 'a'], ['inc', 'a', 1], ['inc', 'd', 5]], ['a', 'b', 'c', 'd']], {'values': [6, 0, 0, 5], 'rejected': 0, 'state': [['a', 6]]})],\n}[N]\nfor label, args, expected in cases:\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":"3c5a8c2680dfd2033ed2a43f755a469610e06e58565cddb71a67756e5adfa7d0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events, replicas):\n    state = {r: {} for r in replicas}\n    rejected = 0\n    for ev in events:\n        if ev[0] == 'inc':\n            r, amount = ev[1], ev[2]\n            if amount <= 0:\n                rejected += 1\n                continue\n            state[r][r] = state[r].get(r, 0) + amount\n        elif ev[0] == 'sync':\n            src, dst = state[ev[1]], state[ev[2]]\n            for k in list(dst):\n                dst[k] = max(dst[k], src.get(k, 0))\n    values = [sum(state[r].values()) for r in replicas]\n    return {'values': values, 'rejected': rejected, 'state': sorted([k, v] for k, v in state[replicas[0]].items())}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {\n    1: [('repeated sync is idempotent', [[['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'a', 'b'], ['inc', 'b', 2], ['sync', 'b', 'a']], ['a', 'b', 'c', 'd']], {'values': [4, 4, 0, 0], 'rejected': 0, 'state': [['a', 2], ['b', 2]]}), ('transitive gossip carries third-party slots', [[['inc', 'a', 1], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['inc', 'c', 1], ['sync', 'c', 'd']], ['a', 'b', 'c', 'd']], {'values': [1, 1, 2, 2], 'rejected': 0, 'state': [['a', 1]]}), ('stale path does not regress a slot', [[['inc', 'a', 1], ['sync', 'a', 'd'], ['inc', 'a', 1], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['sync', 'd', 'c']], ['a', 'b', 'c', 'd']], {'values': [2, 2, 2, 1], 'rejected': 0, 'state': [['a', 2]]}), ('zero and negative amounts are rejected', [[['inc', 'a', 0], ['inc', 'b', -1], ['inc', 'c', 2], ['sync', 'c', 'a'], ['inc', 'a', 3]], ['a', 'b', 'c', 'd']], {'values': [5, 0, 2, 0], 'rejected': 2, 'state': [['a', 3], ['c', 2]]}), ('concurrent increments all survive', [[['inc', 'a', 1], ['inc', 'b', 3], ['inc', 'c', 1], ['sync', 'a', 'b'], ['sync', 'c', 'b'], ['sync', 'b', 'a'], ['sync', 'b', 'c']], ['a', 'b', 'c', 'd']], {'values': [5, 5, 5, 0], 'rejected': 0, 'state': [['a', 1], ['b', 3], ['c', 1]]}), ('empty history', [[], ['a', 'b', 'c', 'd']], {'values': [0, 0, 0, 0], 'rejected': 0, 'state': []}), ('repeated local increments accumulate', [[['inc', 'a', 1], ['sync', 'a', 'a'], ['inc', 'a', 1], ['inc', 'd', 1]], ['a', 'b', 'c', 'd']], {'values': [2, 0, 0, 1], 'rejected': 0, 'state': [['a', 2]]})],\n    2: [('repeated sync is idempotent', [[['inc', 'a', 3], ['sync', 'a', 'b'], ['sync', 'a', 'b'], ['inc', 'b', 2], ['sync', 'b', 'a']], ['a', 'b', 'c', 'd']], {'values': [5, 5, 0, 0], 'rejected': 0, 'state': [['a', 3], ['b', 2]]}), ('transitive gossip carries third-party slots', [[['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['inc', 'c', 1], ['sync', 'c', 'd']], ['a', 'b', 'c', 'd']], {'values': [2, 2, 3, 3], 'rejected': 0, 'state': [['a', 2]]}), ('stale path does not regress a slot', [[['inc', 'a', 1], ['sync', 'a', 'd'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['sync', 'd', 'c']], ['a', 'b', 'c', 'd']], {'values': [3, 3, 3, 1], 'rejected': 0, 'state': [['a', 3]]}), ('zero and negative amounts are rejected', [[['inc', 'a', 0], ['inc', 'b', -2], ['inc', 'c', 2], ['sync', 'c', 'a'], ['inc', 'a', 3]], ['a', 'b', 'c', 'd']], {'values': [5, 0, 2, 0], 'rejected': 2, 'state': [['a', 3], ['c', 2]]}), ('concurrent increments all survive', [[['inc', 'a', 2], ['inc', 'b', 4], ['inc', 'c', 1], ['sync', 'a', 'b'], ['sync', 'c', 'b'], ['sync', 'b', 'a'], ['sync', 'b', 'c']], ['a', 'b', 'c', 'd']], {'values': [7, 7, 7, 0], 'rejected': 0, 'state': [['a', 2], ['b', 4], ['c', 1]]}), ('empty history', [[], ['a', 'b', 'c', 'd']], {'values': [0, 0, 0, 0], 'rejected': 0, 'state': []}), ('repeated local increments accumulate', [[['inc', 'a', 2], ['sync', 'a', 'a'], ['inc', 'a', 1], ['inc', 'd', 2]], ['a', 'b', 'c', 'd']], {'values': [3, 0, 0, 2], 'rejected': 0, 'state': [['a', 3]]})],\n    3: [('repeated sync is idempotent', [[['inc', 'a', 4], ['sync', 'a', 'b'], ['sync', 'a', 'b'], ['inc', 'b', 2], ['sync', 'b', 'a']], ['a', 'b', 'c', 'd']], {'values': [6, 6, 0, 0], 'rejected': 0, 'state': [['a', 4], ['b', 2]]}), ('transitive gossip carries third-party slots', [[['inc', 'a', 3], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['inc', 'c', 1], ['sync', 'c', 'd']], ['a', 'b', 'c', 'd']], {'values': [3, 3, 4, 4], 'rejected': 0, 'state': [['a', 3]]}), ('stale path does not regress a slot', [[['inc', 'a', 1], ['sync', 'a', 'd'], ['inc', 'a', 3], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['sync', 'd', 'c']], ['a', 'b', 'c', 'd']], {'values': [4, 4, 4, 1], 'rejected': 0, 'state': [['a', 4]]}), ('zero and negative amounts are rejected', [[['inc', 'a', 0], ['inc', 'b', -3], ['inc', 'c', 2], ['sync', 'c', 'a'], ['inc', 'a', 3]], ['a', 'b', 'c', 'd']], {'values': [5, 0, 2, 0], 'rejected': 2, 'state': [['a', 3], ['c', 2]]}), ('concurrent increments all survive', [[['inc', 'a', 3], ['inc', 'b', 5], ['inc', 'c', 1], ['sync', 'a', 'b'], ['sync', 'c', 'b'], ['sync', 'b', 'a'], ['sync', 'b', 'c']], ['a', 'b', 'c', 'd']], {'values': [9, 9, 9, 0], 'rejected': 0, 'state': [['a', 3], ['b', 5], ['c', 1]]}), ('empty history', [[], ['a', 'b', 'c', 'd']], {'values': [0, 0, 0, 0], 'rejected': 0, 'state': []}), ('repeated local increments accumulate', [[['inc', 'a', 3], ['sync', 'a', 'a'], ['inc', 'a', 1], ['inc', 'd', 3]], ['a', 'b', 'c', 'd']], {'values': [4, 0, 0, 3], 'rejected': 0, 'state': [['a', 4]]})],\n    4: [('repeated sync is idempotent', [[['inc', 'a', 5], ['sync', 'a', 'b'], ['sync', 'a', 'b'], ['inc', 'b', 2], ['sync', 'b', 'a']], ['a', 'b', 'c', 'd']], {'values': [7, 7, 0, 0], 'rejected': 0, 'state': [['a', 5], ['b', 2]]}), ('transitive gossip carries third-party slots', [[['inc', 'a', 4], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['inc', 'c', 1], ['sync', 'c', 'd']], ['a', 'b', 'c', 'd']], {'values': [4, 4, 5, 5], 'rejected': 0, 'state': [['a', 4]]}), ('stale path does not regress a slot', [[['inc', 'a', 1], ['sync', 'a', 'd'], ['inc', 'a', 4], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['sync', 'd', 'c']], ['a', 'b', 'c', 'd']], {'values': [5, 5, 5, 1], 'rejected': 0, 'state': [['a', 5]]}), ('zero and negative amounts are rejected', [[['inc', 'a', 0], ['inc', 'b', -4], ['inc', 'c', 2], ['sync', 'c', 'a'], ['inc', 'a', 3]], ['a', 'b', 'c', 'd']], {'values': [5, 0, 2, 0], 'rejected': 2, 'state': [['a', 3], ['c', 2]]}), ('concurrent increments all survive', [[['inc', 'a', 4], ['inc', 'b', 6], ['inc', 'c', 1], ['sync', 'a', 'b'], ['sync', 'c', 'b'], ['sync', 'b', 'a'], ['sync', 'b', 'c']], ['a', 'b', 'c', 'd']], {'values': [11, 11, 11, 0], 'rejected': 0, 'state': [['a', 4], ['b', 6], ['c', 1]]}), ('empty history', [[], ['a', 'b', 'c', 'd']], {'values': [0, 0, 0, 0], 'rejected': 0, 'state': []}), ('repeated local increments accumulate', [[['inc', 'a', 4], ['sync', 'a', 'a'], ['inc', 'a', 1], ['inc', 'd', 4]], ['a', 'b', 'c', 'd']], {'values': [5, 0, 0, 4], 'rejected': 0, 'state': [['a', 5]]})],\n    5: [('repeated sync is idempotent', [[['inc', 'a', 6], ['sync', 'a', 'b'], ['sync', 'a', 'b'], ['inc', 'b', 2], ['sync', 'b', 'a']], ['a', 'b', 'c', 'd']], {'values': [8, 8, 0, 0], 'rejected': 0, 'state': [['a', 6], ['b', 2]]}), ('transitive gossip carries third-party slots', [[['inc', 'a', 5], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['inc', 'c', 1], ['sync', 'c', 'd']], ['a', 'b', 'c', 'd']], {'values': [5, 5, 6, 6], 'rejected': 0, 'state': [['a', 5]]}), ('stale path does not regress a slot', [[['inc', 'a', 1], ['sync', 'a', 'd'], ['inc', 'a', 5], ['sync', 'a', 'b'], ['sync', 'b', 'c'], ['sync', 'd', 'c']], ['a', 'b', 'c', 'd']], {'values': [6, 6, 6, 1], 'rejected': 0, 'state': [['a', 6]]}), ('zero and negative amounts are rejected', [[['inc', 'a', 0], ['inc', 'b', -5], ['inc', 'c', 2], ['sync', 'c', 'a'], ['inc', 'a', 3]], ['a', 'b', 'c', 'd']], {'values': [5, 0, 2, 0], 'rejected': 2, 'state': [['a', 3], ['c', 2]]}), ('concurrent increments all survive', [[['inc', 'a', 5], ['inc', 'b', 7], ['inc', 'c', 1], ['sync', 'a', 'b'], ['sync', 'c', 'b'], ['sync', 'b', 'a'], ['sync', 'b', 'c']], ['a', 'b', 'c', 'd']], {'values': [13, 13, 13, 0], 'rejected': 0, 'state': [['a', 5], ['b', 7], ['c', 1]]}), ('empty history', [[], ['a', 'b', 'c', 'd']], {'values': [0, 0, 0, 0], 'rejected': 0, 'state': []}), ('repeated local increments accumulate', [[['inc', 'a', 5], ['sync', 'a', 'a'], ['inc', 'a', 1], ['inc', 'd', 5]], ['a', 'b', 'c', 'd']], {'values': [6, 0, 0, 5], 'rejected': 0, 'state': [['a', 6]]})],\n}[N]\nfor label, args, expected in cases:\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":"A deterministic, bounded teaching model of one replicated data type with stipulated operation and merge rules; it is not a production CRDT library and makes no claim of conformance to any specific published design. 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-crdt-convergence-g-counter-gossip-merge-key-scope","generated_at":"2026-09-29T14:49:00.654360+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"State-based counters must converge under repeated, reordered and transitive gossip.","root_cause":"The merge iterates the receiver's keys, so slots that exist only at the sender are never copied.","sha256":"a2deff7794944e642096f3bd5859833bdfac92d24b638a60cb9787587dff6088","title":"G-Counter gossip: merge only refreshes slots the receiver already knows · 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":38.86,"exit_code":1,"observations":[{"actual":{"rejected":0,"state":[["a",2],["b",2]],"values":[4,4,0,0]},"check":"repeated sync is idempotent","expected":{"rejected":0,"state":[["a",2],["b",2]],"values":[4,4,0,0]},"passed":true},{"actual":{"rejected":0,"state":[["a",1]],"values":[1,1,1,1]},"check":"transitive gossip carries third-party slots","expected":{"rejected":0,"state":[["a",1]],"values":[1,1,2,2]},"passed":false},{"actual":{"rejected":0,"state":[["a",2]],"values":[2,2,0,1]},"check":"stale path does not regress a slot","expected":{"rejected":0,"state":[["a",2]],"values":[2,2,2,1]},"passed":false},{"actual":{"rejected":2,"state":[["a",3],["c",2]],"values":[5,0,2,0]},"check":"zero and negative amounts are rejected","expected":{"rejected":2,"state":[["a",3],["c",2]],"values":[5,0,2,0]},"passed":true},{"actual":{"rejected":0,"state":[["a",1],["b",3]],"values":[4,5,4,0]},"check":"concurrent increments all survive","expected":{"rejected":0,"state":[["a",1],["b",3],["c",1]],"values":[5,5,5,0]},"passed":false},{"actual":{"rejected":0,"state":[],"values":[0,0,0,0]},"check":"empty history","expected":{"rejected":0,"state":[],"values":[0,0,0,0]},"passed":true},{"actual":{"rejected":0,"state":[["a",2]],"values":[2,0,0,1]},"check":"repeated local increments accumulate","expected":{"rejected":0,"state":[["a",2]],"values":[2,0,0,1]},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeated sync is idempotent\", \"actual\": {\"values\": [4, 4, 0, 0], \"rejected\": 0, \"state\": [[\"a\", 2], [\"b\", 2]]}, \"expected\": {\"values\": [4, 4, 0, 0], \"rejected\": 0, \"state\": [[\"a\", 2], [\"b\", 2]]}, \"passed\": true}, {\"check\": \"transitive gossip carries third-party slots\", \"actual\": {\"values\": [1, 1, 1, 1], \"rejected\": 0, \"state\": [[\"a\", 1]]}, \"expected\": {\"values\": [1, 1, 2, 2], \"rejected\": 0, \"state\": [[\"a\", 1]]}, \"passed\": false}, {\"check\": \"stale path does not regress a slot\", \"actual\": {\"values\": [2, 2, 0, 1], \"rejected\": 0, \"state\": [[\"a\", 2]]}, \"expected\": {\"values\": [2, 2, 2, 1], \"rejected\": 0, \"state\": [[\"a\", 2]]}, \"passed\": false}, {\"check\": \"zero and negative amounts are rejected\", \"actual\": {\"values\": [5, 0, 2, 0], \"rejected\": 2, \"state\": [[\"a\", 3], [\"c\", 2]]}, \"expected\": {\"values\": [5, 0, 2, 0], \"rejected\": 2, \"state\": [[\"a\", 3], [\"c\", 2]]}, \"passed\": true}, {\"check\": \"concurrent increments all survive\", \"actual\": {\"values\": [4, 5, 4, 0], \"rejected\": 0, \"state\": [[\"a\", 1], [\"b\", 3]]}, \"expected\": {\"values\": [5, 5, 5, 0], \"rejected\": 0, \"state\": [[\"a\", 1], [\"b\", 3], [\"c\", 1]]}, \"passed\": false}, {\"check\": \"empty history\", \"actual\": {\"values\": [0, 0, 0, 0], \"rejected\": 0, \"state\": []}, \"expected\": {\"values\": [0, 0, 0, 0], \"rejected\": 0, \"state\": []}, \"passed\": true}, {\"check\": \"repeated local increments accumulate\", \"actual\": {\"values\": [2, 0, 0, 1], \"rejected\": 0, \"state\": [[\"a\", 2]]}, \"expected\": {\"values\": [2, 0, 0, 1], \"rejected\": 0, \"state\": [[\"a\", 2]]}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.995,"exit_code":1,"observations":[{"actual":{"rejected":0,"state":[["a",2]],"values":[2,2,0,0]},"check":"repeated sync is idempotent","expected":{"rejected":0,"state":[["a",2],["b",2]],"values":[4,4,0,0]},"passed":false},{"actual":{"rejected":0,"state":[["a",1]],"values":[1,0,1,0]},"check":"transitive gossip carries third-party slots","expected":{"rejected":0,"state":[["a",1]],"values":[1,1,2,2]},"passed":false},{"actual":{"rejected":0,"state":[["a",2]],"values":[2,0,0,0]},"check":"stale path does not regress a slot","expected":{"rejected":0,"state":[["a",2]],"values":[2,2,2,1]},"passed":false},{"actual":{"rejected":2,"state":[["a",3]],"values":[3,0,2,0]},"check":"zero and negative amounts are rejected","expected":{"rejected":2,"state":[["a",3],["c",2]],"values":[5,0,2,0]},"passed":false},{"actual":{"rejected":0,"state":[["a",1]],"values":[1,3,1,0]},"check":"concurrent increments all survive","expected":{"rejected":0,"state":[["a",1],["b",3],["c",1]],"values":[5,5,5,0]},"passed":false},{"actual":{"rejected":0,"state":[],"values":[0,0,0,0]},"check":"empty history","expected":{"rejected":0,"state":[],"values":[0,0,0,0]},"passed":true},{"actual":{"rejected":0,"state":[["a",2]],"values":[2,0,0,1]},"check":"repeated local increments accumulate","expected":{"rejected":0,"state":[["a",2]],"values":[2,0,0,1]},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeated sync is idempotent\", \"actual\": {\"values\": [2, 2, 0, 0], \"rejected\": 0, \"state\": [[\"a\", 2]]}, \"expected\": {\"values\": [4, 4, 0, 0], \"rejected\": 0, \"state\": [[\"a\", 2], [\"b\", 2]]}, \"passed\": false}, {\"check\": \"transitive gossip carries third-party slots\", \"actual\": {\"values\": [1, 0, 1, 0], \"rejected\": 0, \"state\": [[\"a\", 1]]}, \"expected\": {\"values\": [1, 1, 2, 2], \"rejected\": 0, \"state\": [[\"a\", 1]]}, \"passed\": false}, {\"check\": \"stale path does not regress a slot\", \"actual\": {\"values\": [2, 0, 0, 0], \"rejected\": 0, \"state\": [[\"a\", 2]]}, \"expected\": {\"values\": [2, 2, 2, 1], \"rejected\": 0, \"state\": [[\"a\", 2]]}, \"passed\": false}, {\"check\": \"zero and negative amounts are rejected\", \"actual\": {\"values\": [3, 0, 2, 0], \"rejected\": 2, \"state\": [[\"a\", 3]]}, \"expected\": {\"values\": [5, 0, 2, 0], \"rejected\": 2, \"state\": [[\"a\", 3], [\"c\", 2]]}, \"passed\": false}, {\"check\": \"concurrent increments all survive\", \"actual\": {\"values\": [1, 3, 1, 0], \"rejected\": 0, \"state\": [[\"a\", 1]]}, \"expected\": {\"values\": [5, 5, 5, 0], \"rejected\": 0, \"state\": [[\"a\", 1], [\"b\", 3], [\"c\", 1]]}, \"passed\": false}, {\"check\": \"empty history\", \"actual\": {\"values\": [0, 0, 0, 0], \"rejected\": 0, \"state\": []}, \"expected\": {\"values\": [0, 0, 0, 0], \"rejected\": 0, \"state\": []}, \"passed\": true}, {\"check\": \"repeated local increments accumulate\", \"actual\": {\"values\": [2, 0, 0, 1], \"rejected\": 0, \"state\": [[\"a\", 2]]}, \"expected\": {\"values\": [2, 0, 0, 1], \"rejected\": 0, \"state\": [[\"a\", 2]]}, \"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."}}