{"abstract":"Increments made before a reset reappear after the reset propagates.","category":"CRDT convergence","checks":8,"contract":"Each replica holds an epoch and grow-only slots for that epoch. [\"inc\", r, k] grows r's slot; [\"reset\", r] increments r's epoch and clears all its slots. [\"sync\", s, d]: if s's epoch is higher, d adopts s's epoch and a copy of s's slots; if equal, slots merge by maximum; if lower, nothing changes. Return values (sum of slots) and epochs.","evaluation_group":"w2-crdt-convergence-epoch-reset-counter","failed_approach":"Copying the slots without adopting the epoch lets a later merge from the old epoch overwrite them again.","family":"w2-crdt-convergence-epoch-reset-counter-adopt-newer-epoch","id":"FA-75101","implementations":{"attempt":{"sha256":"e68f72f0e98479892c5305bebc97de11c9d9b1a18f3940b8be2c13e6372661df","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events, replicas):\n    E = {r: 0 for r in replicas}\n    S = {r: {} for r in replicas}\n    for ev in events:\n        if ev[0] == 'inc':\n            r = ev[1]\n            S[r][r] = S[r].get(r, 0) + ev[2]\n        elif ev[0] == 'reset':\n            r = ev[1]\n            E[r] += 1\n            S[r] = {}\n        else:\n            s, d = ev[1], ev[2]\n            if E[s] > E[d]:\n                S[d] = dict(S[s])\n            elif E[s] == E[d]:\n                for k, v in S[s].items():\n                    S[d][k] = max(S[d].get(k, 0), v)\n    return {'values': [sum(S[r].values()) for r in replicas], 'epochs': [E[r] for r in replicas]}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {\n    1: [('reset wins over concurrent older increments', [[['inc', 'a', 1], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 6], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 6, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 1], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 3, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 1], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 1], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 3, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 1], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\n    2: [('reset wins over concurrent older increments', [[['inc', 'a', 2], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 7], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 7, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 2], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [4, 4, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 2], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 2], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 2], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [4, 4, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 2], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\n    3: [('reset wins over concurrent older increments', [[['inc', 'a', 3], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 8], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 8, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 3], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [5, 5, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 3], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 3], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 3], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [5, 5, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 3], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\n    4: [('reset wins over concurrent older increments', [[['inc', 'a', 4], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 9], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 9, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 4], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [6, 6, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 4], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 4], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [6, 6, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 4], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\n    5: [('reset wins over concurrent older increments', [[['inc', 'a', 5], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 10], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 10, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 5], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [7, 7, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 5], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 5], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 5], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [7, 7, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 5], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\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":"e00262c9cd987440c40e64a4dcc5ada7ebc1aea6aa9e03121c658d481897581d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events, replicas):\n    E = {r: 0 for r in replicas}\n    S = {r: {} for r in replicas}\n    for ev in events:\n        if ev[0] == 'inc':\n            r = ev[1]\n            S[r][r] = S[r].get(r, 0) + ev[2]\n        elif ev[0] == 'reset':\n            r = ev[1]\n            E[r] += 1\n            S[r] = {}\n        else:\n            s, d = ev[1], ev[2]\n            if E[s] > E[d]:\n                E[d] = E[s]\n            if E[s] >= E[d]:\n                for k, v in S[s].items():\n                    S[d][k] = max(S[d].get(k, 0), v)\n    return {'values': [sum(S[r].values()) for r in replicas], 'epochs': [E[r] for r in replicas]}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {\n    1: [('reset wins over concurrent older increments', [[['inc', 'a', 1], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 6], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 6, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 1], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 3, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 1], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 1], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 3, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 1], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\n    2: [('reset wins over concurrent older increments', [[['inc', 'a', 2], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 7], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 7, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 2], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [4, 4, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 2], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 2], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 2], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [4, 4, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 2], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\n    3: [('reset wins over concurrent older increments', [[['inc', 'a', 3], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 8], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 8, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 3], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [5, 5, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 3], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 3], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 3], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [5, 5, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 3], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\n    4: [('reset wins over concurrent older increments', [[['inc', 'a', 4], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 9], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 9, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 4], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [6, 6, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 4], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 4], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [6, 6, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 4], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\n    5: [('reset wins over concurrent older increments', [[['inc', 'a', 5], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 10], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 10, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 5], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [7, 7, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 5], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 5], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 5], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [7, 7, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 5], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\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"},"fixed":{"sha256":"ecd333b789518dff63ea8e8295f64877fe9fe6bca5d85ccf5e8c517456034405","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events, replicas):\n    E = {r: 0 for r in replicas}\n    S = {r: {} for r in replicas}\n    for ev in events:\n        if ev[0] == 'inc':\n            r = ev[1]\n            S[r][r] = S[r].get(r, 0) + ev[2]\n        elif ev[0] == 'reset':\n            r = ev[1]\n            E[r] += 1\n            S[r] = {}\n        else:\n            s, d = ev[1], ev[2]\n            if E[s] > E[d]:\n                E[d] = E[s]\n                S[d] = dict(S[s])\n            elif E[s] == E[d]:\n                for k, v in S[s].items():\n                    S[d][k] = max(S[d].get(k, 0), v)\n    return {'values': [sum(S[r].values()) for r in replicas], 'epochs': [E[r] for r in replicas]}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {\n    1: [('reset wins over concurrent older increments', [[['inc', 'a', 1], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 6], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 6, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 1], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 3, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 1], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 1], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 3, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 1], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\n    2: [('reset wins over concurrent older increments', [[['inc', 'a', 2], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 7], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 7, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 2], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [4, 4, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 2], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 2], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 2], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [4, 4, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 2], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\n    3: [('reset wins over concurrent older increments', [[['inc', 'a', 3], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 8], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 8, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 3], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [5, 5, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 3], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 3], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 3], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [5, 5, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 3], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\n    4: [('reset wins over concurrent older increments', [[['inc', 'a', 4], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 9], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 9, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 4], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [6, 6, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 4], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 4], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [6, 6, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 4], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\n    5: [('reset wins over concurrent older increments', [[['inc', 'a', 5], ['sync', 'a', 'b'], ['inc', 'b', 2], ['reset', 'a'], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [0, 0, 0], 'epochs': [1, 1, 0]}), ('stale epoch is ignored', [[['reset', 'a'], ['inc', 'a', 3], ['inc', 'b', 10], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [3, 10, 0], 'epochs': [1, 0, 0]}), ('equal epochs merge by maximum', [[['reset', 'a'], ['sync', 'a', 'b'], ['inc', 'a', 5], ['inc', 'b', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [7, 7, 0], 'epochs': [1, 1, 0]}), ('second reset opens a new epoch', [[['inc', 'c', 4], ['reset', 'c'], ['inc', 'c', 5], ['reset', 'c'], ['inc', 'c', 1], ['sync', 'c', 'a']], ['a', 'b', 'c']], {'values': [1, 0, 1], 'epochs': [2, 0, 2]}), ('reset clears every slot', [[['inc', 'a', 5], ['inc', 'b', 3], ['sync', 'b', 'a'], ['reset', 'a'], ['inc', 'a', 1]], ['a', 'b', 'c']], {'values': [1, 3, 0], 'epochs': [1, 0, 0]}), ('independent resets reach the same epoch', [[['inc', 'a', 1], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 5], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'a']], ['a', 'b', 'c']], {'values': [7, 7, 0], 'epochs': [1, 1, 0]}), ('epoch adoption copies the newer slots', [[['inc', 'b', 5], ['reset', 'a'], ['inc', 'a', 2], ['sync', 'a', 'b'], ['sync', 'b', 'c']], ['a', 'b', 'c']], {'values': [2, 2, 2], 'epochs': [1, 1, 1]}), ('epoch is local knowledge', [[['reset', 'a'], ['reset', 'a'], ['reset', 'b'], ['inc', 'b', 1]], ['a', 'b', 'c']], {'values': [0, 1, 0], 'epochs': [2, 1, 0]})],\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-epoch-reset-counter-adopt-newer-epoch","generated_at":"2026-09-29T14:49:03.006697+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Reset-wins counters need an epoch so a reset is not undone by increments that were concurrent with it.","repair":"When the incoming epoch is newer, replace the local slots with the incoming slots and adopt the epoch.","root_cause":"On receiving a newer epoch the receiver keeps its old slots and merges the new ones in by maximum.","sha256":"02030ab74af9c4132b62b663b587a1c8f973b9d47a7143a1e275d7592fb2c710","title":"Epoch-resettable counter: a newer epoch is merged into pre-reset slots · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.087,"exit_code":1,"observations":[{"actual":{"epochs":[1,0,0],"values":[0,0,0]},"check":"reset wins over concurrent older increments","expected":{"epochs":[1,1,0],"values":[0,0,0]},"passed":false},{"actual":{"epochs":[1,0,0],"values":[3,6,0]},"check":"stale epoch is ignored","expected":{"epochs":[1,0,0],"values":[3,6,0]},"passed":true},{"actual":{"epochs":[1,0,0],"values":[1,1,0]},"check":"equal epochs merge by maximum","expected":{"epochs":[1,1,0],"values":[3,3,0]},"passed":false},{"actual":{"epochs":[0,0,2],"values":[1,0,1]},"check":"second reset opens a new epoch","expected":{"epochs":[2,0,2],"values":[1,0,1]},"passed":false},{"actual":{"epochs":[1,0,0],"values":[1,3,0]},"check":"reset clears every slot","expected":{"epochs":[1,0,0],"values":[1,3,0]},"passed":true},{"actual":{"epochs":[1,1,0],"values":[3,3,0]},"check":"independent resets reach the same epoch","expected":{"epochs":[1,1,0],"values":[3,3,0]},"passed":true},{"actual":{"epochs":[1,0,0],"values":[2,2,2]},"check":"epoch adoption copies the newer slots","expected":{"epochs":[1,1,1],"values":[2,2,2]},"passed":false},{"actual":{"epochs":[2,1,0],"values":[0,1,0]},"check":"epoch is local knowledge","expected":{"epochs":[2,1,0],"values":[0,1,0]},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reset wins over concurrent older increments\", \"actual\": {\"values\": [0, 0, 0], \"epochs\": [1, 0, 0]}, \"expected\": {\"values\": [0, 0, 0], \"epochs\": [1, 1, 0]}, \"passed\": false}, {\"check\": \"stale epoch is ignored\", \"actual\": {\"values\": [3, 6, 0], \"epochs\": [1, 0, 0]}, \"expected\": {\"values\": [3, 6, 0], \"epochs\": [1, 0, 0]}, \"passed\": true}, {\"check\": \"equal epochs merge by maximum\", \"actual\": {\"values\": [1, 1, 0], \"epochs\": [1, 0, 0]}, \"expected\": {\"values\": [3, 3, 0], \"epochs\": [1, 1, 0]}, \"passed\": false}, {\"check\": \"second reset opens a new epoch\", \"actual\": {\"values\": [1, 0, 1], \"epochs\": [0, 0, 2]}, \"expected\": {\"values\": [1, 0, 1], \"epochs\": [2, 0, 2]}, \"passed\": false}, {\"check\": \"reset clears every slot\", \"actual\": {\"values\": [1, 3, 0], \"epochs\": [1, 0, 0]}, \"expected\": {\"values\": [1, 3, 0], \"epochs\": [1, 0, 0]}, \"passed\": true}, {\"check\": \"independent resets reach the same epoch\", \"actual\": {\"values\": [3, 3, 0], \"epochs\": [1, 1, 0]}, \"expected\": {\"values\": [3, 3, 0], \"epochs\": [1, 1, 0]}, \"passed\": true}, {\"check\": \"epoch adoption copies the newer slots\", \"actual\": {\"values\": [2, 2, 2], \"epochs\": [1, 0, 0]}, \"expected\": {\"values\": [2, 2, 2], \"epochs\": [1, 1, 1]}, \"passed\": false}, {\"check\": \"epoch is local knowledge\", \"actual\": {\"values\": [0, 1, 0], \"epochs\": [2, 1, 0]}, \"expected\": {\"values\": [0, 1, 0], \"epochs\": [2, 1, 0]}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.707,"exit_code":1,"observations":[{"actual":{"epochs":[1,1,0],"values":[3,3,0]},"check":"reset wins over concurrent older increments","expected":{"epochs":[1,1,0],"values":[0,0,0]},"passed":false},{"actual":{"epochs":[1,0,0],"values":[3,6,0]},"check":"stale epoch is ignored","expected":{"epochs":[1,0,0],"values":[3,6,0]},"passed":true},{"actual":{"epochs":[1,1,0],"values":[3,3,0]},"check":"equal epochs merge by maximum","expected":{"epochs":[1,1,0],"values":[3,3,0]},"passed":true},{"actual":{"epochs":[2,0,2],"values":[1,0,1]},"check":"second reset opens a new epoch","expected":{"epochs":[2,0,2],"values":[1,0,1]},"passed":true},{"actual":{"epochs":[1,0,0],"values":[1,3,0]},"check":"reset clears every slot","expected":{"epochs":[1,0,0],"values":[1,3,0]},"passed":true},{"actual":{"epochs":[1,1,0],"values":[3,3,0]},"check":"independent resets reach the same epoch","expected":{"epochs":[1,1,0],"values":[3,3,0]},"passed":true},{"actual":{"epochs":[1,1,1],"values":[2,3,3]},"check":"epoch adoption copies the newer slots","expected":{"epochs":[1,1,1],"values":[2,2,2]},"passed":false},{"actual":{"epochs":[2,1,0],"values":[0,1,0]},"check":"epoch is local knowledge","expected":{"epochs":[2,1,0],"values":[0,1,0]},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reset wins over concurrent older increments\", \"actual\": {\"values\": [3, 3, 0], \"epochs\": [1, 1, 0]}, \"expected\": {\"values\": [0, 0, 0], \"epochs\": [1, 1, 0]}, \"passed\": false}, {\"check\": \"stale epoch is ignored\", \"actual\": {\"values\": [3, 6, 0], \"epochs\": [1, 0, 0]}, \"expected\": {\"values\": [3, 6, 0], \"epochs\": [1, 0, 0]}, \"passed\": true}, {\"check\": \"equal epochs merge by maximum\", \"actual\": {\"values\": [3, 3, 0], \"epochs\": [1, 1, 0]}, \"expected\": {\"values\": [3, 3, 0], \"epochs\": [1, 1, 0]}, \"passed\": true}, {\"check\": \"second reset opens a new epoch\", \"actual\": {\"values\": [1, 0, 1], \"epochs\": [2, 0, 2]}, \"expected\": {\"values\": [1, 0, 1], \"epochs\": [2, 0, 2]}, \"passed\": true}, {\"check\": \"reset clears every slot\", \"actual\": {\"values\": [1, 3, 0], \"epochs\": [1, 0, 0]}, \"expected\": {\"values\": [1, 3, 0], \"epochs\": [1, 0, 0]}, \"passed\": true}, {\"check\": \"independent resets reach the same epoch\", \"actual\": {\"values\": [3, 3, 0], \"epochs\": [1, 1, 0]}, \"expected\": {\"values\": [3, 3, 0], \"epochs\": [1, 1, 0]}, \"passed\": true}, {\"check\": \"epoch adoption copies the newer slots\", \"actual\": {\"values\": [2, 3, 3], \"epochs\": [1, 1, 1]}, \"expected\": {\"values\": [2, 2, 2], \"epochs\": [1, 1, 1]}, \"passed\": false}, {\"check\": \"epoch is local knowledge\", \"actual\": {\"values\": [0, 1, 0], \"epochs\": [2, 1, 0]}, \"expected\": {\"values\": [0, 1, 0], \"epochs\": [2, 1, 0]}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.027,"exit_code":0,"observations":[{"actual":{"epochs":[1,1,0],"values":[0,0,0]},"check":"reset wins over concurrent older increments","expected":{"epochs":[1,1,0],"values":[0,0,0]},"passed":true},{"actual":{"epochs":[1,0,0],"values":[3,6,0]},"check":"stale epoch is ignored","expected":{"epochs":[1,0,0],"values":[3,6,0]},"passed":true},{"actual":{"epochs":[1,1,0],"values":[3,3,0]},"check":"equal epochs merge by maximum","expected":{"epochs":[1,1,0],"values":[3,3,0]},"passed":true},{"actual":{"epochs":[2,0,2],"values":[1,0,1]},"check":"second reset opens a new epoch","expected":{"epochs":[2,0,2],"values":[1,0,1]},"passed":true},{"actual":{"epochs":[1,0,0],"values":[1,3,0]},"check":"reset clears every slot","expected":{"epochs":[1,0,0],"values":[1,3,0]},"passed":true},{"actual":{"epochs":[1,1,0],"values":[3,3,0]},"check":"independent resets reach the same epoch","expected":{"epochs":[1,1,0],"values":[3,3,0]},"passed":true},{"actual":{"epochs":[1,1,1],"values":[2,2,2]},"check":"epoch adoption copies the newer slots","expected":{"epochs":[1,1,1],"values":[2,2,2]},"passed":true},{"actual":{"epochs":[2,1,0],"values":[0,1,0]},"check":"epoch is local knowledge","expected":{"epochs":[2,1,0],"values":[0,1,0]},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reset wins over concurrent older increments\", \"actual\": {\"values\": [0, 0, 0], \"epochs\": [1, 1, 0]}, \"expected\": {\"values\": [0, 0, 0], \"epochs\": [1, 1, 0]}, \"passed\": true}, {\"check\": \"stale epoch is ignored\", \"actual\": {\"values\": [3, 6, 0], \"epochs\": [1, 0, 0]}, \"expected\": {\"values\": [3, 6, 0], \"epochs\": [1, 0, 0]}, \"passed\": true}, {\"check\": \"equal epochs merge by maximum\", \"actual\": {\"values\": [3, 3, 0], \"epochs\": [1, 1, 0]}, \"expected\": {\"values\": [3, 3, 0], \"epochs\": [1, 1, 0]}, \"passed\": true}, {\"check\": \"second reset opens a new epoch\", \"actual\": {\"values\": [1, 0, 1], \"epochs\": [2, 0, 2]}, \"expected\": {\"values\": [1, 0, 1], \"epochs\": [2, 0, 2]}, \"passed\": true}, {\"check\": \"reset clears every slot\", \"actual\": {\"values\": [1, 3, 0], \"epochs\": [1, 0, 0]}, \"expected\": {\"values\": [1, 3, 0], \"epochs\": [1, 0, 0]}, \"passed\": true}, {\"check\": \"independent resets reach the same epoch\", \"actual\": {\"values\": [3, 3, 0], \"epochs\": [1, 1, 0]}, \"expected\": {\"values\": [3, 3, 0], \"epochs\": [1, 1, 0]}, \"passed\": true}, {\"check\": \"epoch adoption copies the newer slots\", \"actual\": {\"values\": [2, 2, 2], \"epochs\": [1, 1, 1]}, \"expected\": {\"values\": [2, 2, 2], \"epochs\": [1, 1, 1]}, \"passed\": true}, {\"check\": \"epoch is local knowledge\", \"actual\": {\"values\": [0, 1, 0], \"epochs\": [2, 1, 0]}, \"expected\": {\"values\": [0, 1, 0], \"epochs\": [2, 1, 0]}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}