{"abstract":"A second reset is lost because it does not open a newer epoch than the first.","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":"Taking the maximum with one still leaves repeated resets in the same epoch.","family":"w2-crdt-convergence-epoch-reset-counter-reset-epoch-increment","id":"FA-75111","implementations":{"attempt":{"sha256":"ba7d53b9b3f8e132ef3ac631868f9dd4210c789d9da6d6d357adc00fbb872b56","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] = max(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"},"broken":{"sha256":"1904205de93e554d531094add0f2731b85fc916e6e133fb4d84537beb9e52f3b","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"},"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-reset-epoch-increment","generated_at":"2026-09-29T14:49:03.025452+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":"Each reset must increment the replica's current epoch.","root_cause":"The reset assigns a fixed epoch instead of incrementing the current one.","sha256":"5811690aa7b73f785f44041e27d9eeab300660567859622c29a378af140e23b5","title":"Epoch-resettable counter: every reset reuses epoch one · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.598,"exit_code":1,"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":[1,0,1],"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,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":[1,1,0],"values":[0,1,0]},"check":"epoch is local knowledge","expected":{"epochs":[2,1,0],"values":[0,1,0]},"passed":false}],"passed":false,"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\": [1, 0, 1]}, \"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, 1, 1]}, \"expected\": {\"values\": [2, 2, 2], \"epochs\": [1, 1, 1]}, \"passed\": true}, {\"check\": \"epoch is local knowledge\", \"actual\": {\"values\": [0, 1, 0], \"epochs\": [1, 1, 0]}, \"expected\": {\"values\": [0, 1, 0], \"epochs\": [2, 1, 0]}, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.239,"exit_code":1,"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":[1,0,1],"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,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":[1,1,0],"values":[0,1,0]},"check":"epoch is local knowledge","expected":{"epochs":[2,1,0],"values":[0,1,0]},"passed":false}],"passed":false,"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\": [1, 0, 1]}, \"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, 1, 1]}, \"expected\": {\"values\": [2, 2, 2], \"epochs\": [1, 1, 1]}, \"passed\": true}, {\"check\": \"epoch is local knowledge\", \"actual\": {\"values\": [0, 1, 0], \"epochs\": [1, 1, 0]}, \"expected\": {\"values\": [0, 1, 0], \"epochs\": [2, 1, 0]}, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.867,"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"}