{"abstract":"Messages sent seconds apart across midnight are grouped under the previous day's header.","category":"Chat ordering and read receipts","checks":7,"contract":"messages are ascending {author, ts, kind}. A message shows a header (starts a group) when it is the first message, when it or the previous message is a system message, when the author changes, when more than 300 seconds passed since the previous message, or when the UTC day changes. Result: one boolean per message.","evaluation_group":"w2-chat_ordering_and_read_receipts-message-grouping","failed_approach":"Requiring a full day of elapsed time never splits at midnight. The attempted `head = m['ts'] - prev['ts'] >= 86400` still disagrees with a fixture.","family":"w2-chat_ordering_and_read_receipts-message-grouping-day-break","id":"FA-76166","implementations":{"attempt":{"sha256":"495c27d95be40f36972a5250feda4ffa953c3fc5aef147cc2ba0033e4645a888","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(messages):\n    out = []\n    prev = None\n    for m in messages:\n        if prev is None or m['kind'] == 'system' or prev['kind'] == 'system':\n            head = True\n        elif m['author'] != prev['author']:\n            head = True\n        elif m['ts'] - prev['ts'] > 300:\n            head = True\n        else:\n            head = m['ts'] - prev['ts'] >= 86400\n        out.append(head)\n        prev = m\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_CASES = {1: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1401, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 13, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259211, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}],), [True, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])], 2: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1402, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 2000, 'kind': 'user'}, {'author': 'bo', 'ts': 2300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 14, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259212, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}, {'author': 'bo', 'ts': 340, 'kind': 'user'}],), [True, False, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])], 3: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1403, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 3000, 'kind': 'user'}, {'author': 'bo', 'ts': 3300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 15, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259213, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}, {'author': 'bo', 'ts': 340, 'kind': 'user'}, {'author': 'bo', 'ts': 400, 'kind': 'user'}],), [True, False, False, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])], 4: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1404, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 4000, 'kind': 'user'}, {'author': 'bo', 'ts': 4300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 16, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259214, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}, {'author': 'bo', 'ts': 340, 'kind': 'user'}, {'author': 'bo', 'ts': 400, 'kind': 'user'}, {'author': 'bo', 'ts': 460, 'kind': 'user'}],), [True, False, False, False, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])], 5: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1405, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 5000, 'kind': 'user'}, {'author': 'bo', 'ts': 5300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 17, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259215, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}, {'author': 'bo', 'ts': 340, 'kind': 'user'}, {'author': 'bo', 'ts': 400, 'kind': 'user'}, {'author': 'bo', 'ts': 460, 'kind': 'user'}, {'author': 'bo', 'ts': 520, 'kind': 'user'}],), [True, False, False, False, False, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])]}\nfor _label, _args, _expected in _CASES[N]:\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":"df718674230af0d3134a8982c9ec07f6c6f16e1e5076098720b9dfa7db418a16","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(messages):\n    out = []\n    prev = None\n    for m in messages:\n        if prev is None or m['kind'] == 'system' or prev['kind'] == 'system':\n            head = True\n        elif m['author'] != prev['author']:\n            head = True\n        elif m['ts'] - prev['ts'] > 300:\n            head = True\n        else:\n            head = False\n        out.append(head)\n        prev = m\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_CASES = {1: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1401, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 13, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259211, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}],), [True, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])], 2: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1402, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 2000, 'kind': 'user'}, {'author': 'bo', 'ts': 2300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 14, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259212, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}, {'author': 'bo', 'ts': 340, 'kind': 'user'}],), [True, False, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])], 3: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1403, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 3000, 'kind': 'user'}, {'author': 'bo', 'ts': 3300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 15, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259213, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}, {'author': 'bo', 'ts': 340, 'kind': 'user'}, {'author': 'bo', 'ts': 400, 'kind': 'user'}],), [True, False, False, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])], 4: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1404, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 4000, 'kind': 'user'}, {'author': 'bo', 'ts': 4300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 16, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259214, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}, {'author': 'bo', 'ts': 340, 'kind': 'user'}, {'author': 'bo', 'ts': 400, 'kind': 'user'}, {'author': 'bo', 'ts': 460, 'kind': 'user'}],), [True, False, False, False, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])], 5: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1405, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 5000, 'kind': 'user'}, {'author': 'bo', 'ts': 5300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 17, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259215, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}, {'author': 'bo', 'ts': 340, 'kind': 'user'}, {'author': 'bo', 'ts': 400, 'kind': 'user'}, {'author': 'bo', 'ts': 460, 'kind': 'user'}, {'author': 'bo', 'ts': 520, 'kind': 'user'}],), [True, False, False, False, False, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])]}\nfor _label, _args, _expected in _CASES[N]:\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":"a967f3c9ab3b4d8b437bf78b8479af86feac54ab64d5dbe9b798dff27d8eea35","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(messages):\n    out = []\n    prev = None\n    for m in messages:\n        if prev is None or m['kind'] == 'system' or prev['kind'] == 'system':\n            head = True\n        elif m['author'] != prev['author']:\n            head = True\n        elif m['ts'] - prev['ts'] > 300:\n            head = True\n        else:\n            head = m['ts'] // 86400 != prev['ts'] // 86400\n        out.append(head)\n        prev = m\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_CASES = {1: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1401, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 13, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259211, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}],), [True, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])], 2: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1402, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 2000, 'kind': 'user'}, {'author': 'bo', 'ts': 2300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 14, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259212, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}, {'author': 'bo', 'ts': 340, 'kind': 'user'}],), [True, False, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])], 3: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1403, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 3000, 'kind': 'user'}, {'author': 'bo', 'ts': 3300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 15, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259213, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}, {'author': 'bo', 'ts': 340, 'kind': 'user'}, {'author': 'bo', 'ts': 400, 'kind': 'user'}],), [True, False, False, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])], 4: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1404, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 4000, 'kind': 'user'}, {'author': 'bo', 'ts': 4300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 16, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259214, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}, {'author': 'bo', 'ts': 340, 'kind': 'user'}, {'author': 'bo', 'ts': 400, 'kind': 'user'}, {'author': 'bo', 'ts': 460, 'kind': 'user'}],), [True, False, False, False, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])], 5: [('long pause', ([{'author': 'bo', 'ts': 1000, 'kind': 'user'}, {'author': 'bo', 'ts': 1405, 'kind': 'user'}],), [True, True]), ('exact five minutes', ([{'author': 'bo', 'ts': 5000, 'kind': 'user'}, {'author': 'bo', 'ts': 5300, 'kind': 'user'}],), [True, False]), ('after a system message', ([{'author': 'bo', 'ts': 10, 'kind': 'user'}, {'author': 'bo', 'ts': 11, 'kind': 'system'}, {'author': 'bo', 'ts': 17, 'kind': 'user'}],), [True, True, True]), ('midnight crossing', ([{'author': 'bo', 'ts': 259170, 'kind': 'user'}, {'author': 'bo', 'ts': 259215, 'kind': 'user'}],), [True, True]), ('burst', ([{'author': 'bo', 'ts': 100, 'kind': 'user'}, {'author': 'bo', 'ts': 160, 'kind': 'user'}, {'author': 'bo', 'ts': 220, 'kind': 'user'}, {'author': 'bo', 'ts': 280, 'kind': 'user'}, {'author': 'bo', 'ts': 340, 'kind': 'user'}, {'author': 'bo', 'ts': 400, 'kind': 'user'}, {'author': 'bo', 'ts': 460, 'kind': 'user'}, {'author': 'bo', 'ts': 520, 'kind': 'user'}],), [True, False, False, False, False, False, False, False]), ('author change', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'cy', 'ts': 6, 'kind': 'user'}],), [True, True]), ('bot notice between', ([{'author': 'bo', 'ts': 5, 'kind': 'user'}, {'author': 'bot', 'ts': 6, 'kind': 'notice'}, {'author': 'bo', 'ts': 7, 'kind': 'user'}],), [True, True, True])]}\nfor _label, _args, _expected in _CASES[N]:\n    check(_label, solve(*_args), _expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Stipulated offline chat model; not a complete messaging protocol, client or server implementation. 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-chat_ordering_and_read_receipts-message-grouping-day-break","generated_at":"2026-09-29T14:49:13.879297+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Compact chat layouts hide repeated avatars; wrong grouping attributes messages to the wrong person or time.","repair":"Use `head = m['ts'] // 86400 != prev['ts'] // 86400` for the day break decision and keep every other rule of the model unchanged.","root_cause":"The day break decision evaluates `head = False` where the contract requires `head = m['ts'] // 86400 != prev['ts'] // 86400`.","sha256":"38377021c9dde83c0dba0bd455229d3f909c000b109a2110d6065d699989d4d4","title":"Decide which messages start a new visual group: day break · case 01","variant":1,"variant_policy":"N selects a different enumerated fixture set (shifted clocks, identifiers and sizes); boundary fixtures recur across variants.","verification":{"attempt":{"elapsed_ms":41.67,"exit_code":1,"observations":[{"actual":[true,true],"check":"long pause","expected":[true,true],"passed":true},{"actual":[true,false],"check":"exact five minutes","expected":[true,false],"passed":true},{"actual":[true,true,true],"check":"after a system message","expected":[true,true,true],"passed":true},{"actual":[true,false],"check":"midnight crossing","expected":[true,true],"passed":false},{"actual":[true,false,false,false],"check":"burst","expected":[true,false,false,false],"passed":true},{"actual":[true,true],"check":"author change","expected":[true,true],"passed":true},{"actual":[true,true,true],"check":"bot notice between","expected":[true,true,true],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"long pause\", \"actual\": [true, true], \"expected\": [true, true], \"passed\": true}, {\"check\": \"exact five minutes\", \"actual\": [true, false], \"expected\": [true, false], \"passed\": true}, {\"check\": \"after a system message\", \"actual\": [true, true, true], \"expected\": [true, true, true], \"passed\": true}, {\"check\": \"midnight crossing\", \"actual\": [true, false], \"expected\": [true, true], \"passed\": false}, {\"check\": \"burst\", \"actual\": [true, false, false, false], \"expected\": [true, false, false, false], \"passed\": true}, {\"check\": \"author change\", \"actual\": [true, true], \"expected\": [true, true], \"passed\": true}, {\"check\": \"bot notice between\", \"actual\": [true, true, true], \"expected\": [true, true, true], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.386,"exit_code":1,"observations":[{"actual":[true,true],"check":"long pause","expected":[true,true],"passed":true},{"actual":[true,false],"check":"exact five minutes","expected":[true,false],"passed":true},{"actual":[true,true,true],"check":"after a system message","expected":[true,true,true],"passed":true},{"actual":[true,false],"check":"midnight crossing","expected":[true,true],"passed":false},{"actual":[true,false,false,false],"check":"burst","expected":[true,false,false,false],"passed":true},{"actual":[true,true],"check":"author change","expected":[true,true],"passed":true},{"actual":[true,true,true],"check":"bot notice between","expected":[true,true,true],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"long pause\", \"actual\": [true, true], \"expected\": [true, true], \"passed\": true}, {\"check\": \"exact five minutes\", \"actual\": [true, false], \"expected\": [true, false], \"passed\": true}, {\"check\": \"after a system message\", \"actual\": [true, true, true], \"expected\": [true, true, true], \"passed\": true}, {\"check\": \"midnight crossing\", \"actual\": [true, false], \"expected\": [true, true], \"passed\": false}, {\"check\": \"burst\", \"actual\": [true, false, false, false], \"expected\": [true, false, false, false], \"passed\": true}, {\"check\": \"author change\", \"actual\": [true, true], \"expected\": [true, true], \"passed\": true}, {\"check\": \"bot notice between\", \"actual\": [true, true, true], \"expected\": [true, true, true], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.032,"exit_code":0,"observations":[{"actual":[true,true],"check":"long pause","expected":[true,true],"passed":true},{"actual":[true,false],"check":"exact five minutes","expected":[true,false],"passed":true},{"actual":[true,true,true],"check":"after a system message","expected":[true,true,true],"passed":true},{"actual":[true,true],"check":"midnight crossing","expected":[true,true],"passed":true},{"actual":[true,false,false,false],"check":"burst","expected":[true,false,false,false],"passed":true},{"actual":[true,true],"check":"author change","expected":[true,true],"passed":true},{"actual":[true,true,true],"check":"bot notice between","expected":[true,true,true],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"long pause\", \"actual\": [true, true], \"expected\": [true, true], \"passed\": true}, {\"check\": \"exact five minutes\", \"actual\": [true, false], \"expected\": [true, false], \"passed\": true}, {\"check\": \"after a system message\", \"actual\": [true, true, true], \"expected\": [true, true, true], \"passed\": true}, {\"check\": \"midnight crossing\", \"actual\": [true, true], \"expected\": [true, true], \"passed\": true}, {\"check\": \"burst\", \"actual\": [true, false, false, false], \"expected\": [true, false, false, false], \"passed\": true}, {\"check\": \"author change\", \"actual\": [true, true], \"expected\": [true, true], \"passed\": true}, {\"check\": \"bot notice between\", \"actual\": [true, true, true], \"expected\": [true, true, true], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}