{"abstract":"Counters grow every time the same state is gossiped again, and replicas never agree.","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":"Overwriting the slot with the incoming value is idempotent but lets a stale path regress a slot that was already higher.","family":"w2-crdt-convergence-g-counter-gossip-merge-join","id":"FA-74841","implementations":{"attempt":{"sha256":"b2da075f21953388bdf1b8b4a5edbd10f7c54e355df0d61ecd3143b8e1f3b344","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                dst[k] = 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":"c5f865cb473efaa35516c3fa5fe7e8a1e839a3f5e824da61872571b47b5f1ef7","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                dst[k] = 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"}},"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-join","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 adds the incoming slot to the local slot, so merge is not idempotent.","sha256":"51f441658b3616393216bb8a85f9dadb35a2d8b3731fc317d9792951aa7ba35f","title":"G-Counter gossip: repeated sync adds slots instead of taking the maximum · 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":39.455,"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,2,2]},"check":"transitive gossip carries third-party slots","expected":{"rejected":0,"state":[["a",1]],"values":[1,1,2,2]},"passed":true},{"actual":{"rejected":0,"state":[["a",2]],"values":[2,2,1,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],["c",1]],"values":[5,5,5,0]},"check":"concurrent increments all survive","expected":{"rejected":0,"state":[["a",1],["b",3],["c",1]],"values":[5,5,5,0]},"passed":true},{"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, 2, 2], \"rejected\": 0, \"state\": [[\"a\", 1]]}, \"expected\": {\"values\": [1, 1, 2, 2], \"rejected\": 0, \"state\": [[\"a\", 1]]}, \"passed\": true}, {\"check\": \"stale path does not regress a slot\", \"actual\": {\"values\": [2, 2, 1, 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\": [5, 5, 5, 0], \"rejected\": 0, \"state\": [[\"a\", 1], [\"b\", 3], [\"c\", 1]]}, \"expected\": {\"values\": [5, 5, 5, 0], \"rejected\": 0, \"state\": [[\"a\", 1], [\"b\", 3], [\"c\", 1]]}, \"passed\": true}, {\"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":42.092,"exit_code":1,"observations":[{"actual":{"rejected":0,"state":[["a",6],["b",2]],"values":[8,6,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,1,2,2]},"check":"transitive gossip carries third-party slots","expected":{"rejected":0,"state":[["a",1]],"values":[1,1,2,2]},"passed":true},{"actual":{"rejected":0,"state":[["a",2]],"values":[2,2,3,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",2],["b",3],["c",1]],"values":[6,5,6,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",3]],"values":[3,0,0,1]},"check":"repeated local increments accumulate","expected":{"rejected":0,"state":[["a",2]],"values":[2,0,0,1]},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeated sync is idempotent\", \"actual\": {\"values\": [8, 6, 0, 0], \"rejected\": 0, \"state\": [[\"a\", 6], [\"b\", 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, 1, 2, 2], \"rejected\": 0, \"state\": [[\"a\", 1]]}, \"expected\": {\"values\": [1, 1, 2, 2], \"rejected\": 0, \"state\": [[\"a\", 1]]}, \"passed\": true}, {\"check\": \"stale path does not regress a slot\", \"actual\": {\"values\": [2, 2, 3, 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\": [6, 5, 6, 0], \"rejected\": 0, \"state\": [[\"a\", 2], [\"b\", 3], [\"c\", 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\": [3, 0, 0, 1], \"rejected\": 0, \"state\": [[\"a\", 3]]}, \"expected\": {\"values\": [2, 0, 0, 1], \"rejected\": 0, \"state\": [[\"a\", 2]]}, \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}