{"abstract":"Fully read messages are shown with delivered ticks because the delivered test runs first.","category":"Chat ordering and read receipts","checks":8,"contract":"Recipients are members other than the sender whose joined_at (first visible seq, default 0) is <= sent_seq. A recipient has read the message when read[u] (their read marker) >= sent_seq; reading implies delivery. Status is \"sent\" with no recipients, \"read\" when every recipient read, \"delivered\" when every recipient got it, else \"sent\". Result {status, read_by (sorted), recipients (count)}.","evaluation_group":"w2-chat_ordering_and_read_receipts-group-receipt-summary","failed_approach":"Declaring read as soon as one recipient reads overstates group progress. The attempted `elif len(has_read) >= 1: status = 'read' elif len(got) == len(recipients): status = 'delivered'` still disagrees with a fixture.","family":"w2-chat_ordering_and_read_receipts-group-receipt-summary-status-precedence","id":"FA-75931","implementations":{"attempt":{"sha256":"30da85efc767ef233394b483a0b948eb4539773dfcecdd5ff49054f421a500b2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sender, members, joined_at, sent_seq, delivered, read):\n    recipients = [u for u in members if u != sender and joined_at.get(u, 0) <= sent_seq]\n    has_read = [u for u in recipients if read.get(u, -1) >= sent_seq]\n    got = [u for u in recipients if delivered.get(u) or u in has_read]\n    if not recipients:\n        status = 'sent'\n    elif len(has_read) >= 1:\n        status = 'read'\n    elif len(got) == len(recipients):\n        status = 'delivered'\n    else:\n        status = 'sent'\n    return {'status': status, 'read_by': sorted(has_read), 'recipients': len(recipients)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_CASES = {1: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 21}, 11, {'bo': True}, {'bo': 16}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 10}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 5}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 1, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 5, {'bo': True}, {'cy': 5}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})], 2: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 22}, 12, {'bo': True}, {'bo': 17}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 11}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 6}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 2, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 6, {'bo': True}, {'cy': 6}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})], 3: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 23}, 13, {'bo': True}, {'bo': 18}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 7}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 3, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 7, {'bo': True}, {'cy': 7}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})], 4: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 24}, 14, {'bo': True}, {'bo': 19}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 13}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 8}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 4, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 8, {'bo': True}, {'cy': 8}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})], 5: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 25}, 15, {'bo': True}, {'bo': 20}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 14}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 9}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 5, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 9, {'bo': True}, {'cy': 9}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})]}\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":"4ff2dabb7fb70714291051c68c32e47d89eecf7d76546f146ce191ba44af0394","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sender, members, joined_at, sent_seq, delivered, read):\n    recipients = [u for u in members if u != sender and joined_at.get(u, 0) <= sent_seq]\n    has_read = [u for u in recipients if read.get(u, -1) >= sent_seq]\n    got = [u for u in recipients if delivered.get(u) or u in has_read]\n    if not recipients:\n        status = 'sent'\n    elif len(got) == len(recipients):\n        status = 'delivered'\n    elif len(has_read) == len(recipients):\n        status = 'read'\n    else:\n        status = 'sent'\n    return {'status': status, 'read_by': sorted(has_read), 'recipients': len(recipients)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_CASES = {1: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 21}, 11, {'bo': True}, {'bo': 16}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 10}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 5}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 1, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 5, {'bo': True}, {'cy': 5}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})], 2: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 22}, 12, {'bo': True}, {'bo': 17}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 11}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 6}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 2, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 6, {'bo': True}, {'cy': 6}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})], 3: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 23}, 13, {'bo': True}, {'bo': 18}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 7}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 3, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 7, {'bo': True}, {'cy': 7}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})], 4: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 24}, 14, {'bo': True}, {'bo': 19}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 13}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 8}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 4, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 8, {'bo': True}, {'cy': 8}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})], 5: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 25}, 15, {'bo': True}, {'bo': 20}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 14}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 9}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 5, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 9, {'bo': True}, {'cy': 9}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})]}\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":"aeaa22a0b07474d2a6583ab95130f52f4b30e34fd4251e0ecfc3c01b301740eb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sender, members, joined_at, sent_seq, delivered, read):\n    recipients = [u for u in members if u != sender and joined_at.get(u, 0) <= sent_seq]\n    has_read = [u for u in recipients if read.get(u, -1) >= sent_seq]\n    got = [u for u in recipients if delivered.get(u) or u in has_read]\n    if not recipients:\n        status = 'sent'\n    elif len(has_read) == len(recipients):\n        status = 'read'\n    elif len(got) == len(recipients):\n        status = 'delivered'\n    else:\n        status = 'sent'\n    return {'status': status, 'read_by': sorted(has_read), 'recipients': len(recipients)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_CASES = {1: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 21}, 11, {'bo': True}, {'bo': 16}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 10}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 5}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 1, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 5, {'bo': True}, {'cy': 5}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})], 2: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 22}, 12, {'bo': True}, {'bo': 17}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 11}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 6}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 2, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 6, {'bo': True}, {'cy': 6}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})], 3: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 23}, 13, {'bo': True}, {'bo': 18}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 7}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 3, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 7, {'bo': True}, {'cy': 7}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})], 4: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 24}, 14, {'bo': True}, {'bo': 19}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 13}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 8}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 4, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 8, {'bo': True}, {'cy': 8}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})], 5: [('late joiner does not block read', ('al', ['al', 'bo', 'cy'], {'cy': 25}, 15, {'bo': True}, {'bo': 20}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('member joined exactly at the message', ('al', ['al', 'bo', 'cy'], {'cy': 12}, 12, {'bo': True, 'cy': True}, {'bo': 12}), {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'}), ('read marker beyond message', ('al', ['al', 'bo'], {}, 7, {}, {'bo': 14}), {'read_by': ['bo'], 'recipients': 1, 'status': 'read'}), ('read without delivery ack', ('al', ['al', 'bo', 'cy'], {}, 4, {'bo': True}, {'cy': 9}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('everyone read', ('al', ['al', 'bo', 'cy'], {}, 3, {'bo': True, 'cy': True}, {'bo': 3, 'cy': 5}), {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'}), ('sender alone', ('al', ['al'], {}, 5, {}, {}), {'read_by': [], 'recipients': 0, 'status': 'sent'}), ('read exactly without ack', ('al', ['al', 'bo', 'cy'], {}, 9, {'bo': True}, {'cy': 9}), {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'}), ('partial delivery', ('al', ['al', 'bo', 'cy', 'di'], {}, 2, {'bo': True, 'cy': True}, {'bo': 1}), {'read_by': [], 'recipients': 3, 'status': 'sent'})]}\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-group-receipt-summary-status-precedence","generated_at":"2026-09-29T14:49:11.534164+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Group tick marks summarise many receipts; wrong membership or thresholds show false \"read\" states.","repair":"Use `elif len(has_read) == len(recipients): status = 'read' elif len(got) == len(recipients): status = 'delivered'` for the status precedence decision and keep every other rule of the model unchanged.","root_cause":"The status precedence decision evaluates `elif len(got) == len(recipients): status = 'delivered' elif len(has_read) == len(recipients): status = 'read'` where the contract requires `elif len(has_read) == len(recipients): status = 'read' elif len(got) == len(recipients): status = 'delivered'`.","sha256":"8e57027d6bffb97cd25ae2009c5e35d290e2c99144796ae4582c5ae0f5247c11","title":"Summarize group delivery and read receipts for one message: status precedence · 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":40.872,"exit_code":1,"observations":[{"actual":{"read_by":["bo"],"recipients":1,"status":"read"},"check":"late joiner does not block read","expected":{"read_by":["bo"],"recipients":1,"status":"read"},"passed":true},{"actual":{"read_by":["bo"],"recipients":2,"status":"read"},"check":"member joined exactly at the message","expected":{"read_by":["bo"],"recipients":2,"status":"delivered"},"passed":false},{"actual":{"read_by":["bo"],"recipients":1,"status":"read"},"check":"read marker beyond message","expected":{"read_by":["bo"],"recipients":1,"status":"read"},"passed":true},{"actual":{"read_by":["cy"],"recipients":2,"status":"read"},"check":"read without delivery ack","expected":{"read_by":["cy"],"recipients":2,"status":"delivered"},"passed":false},{"actual":{"read_by":["bo","cy"],"recipients":2,"status":"read"},"check":"everyone read","expected":{"read_by":["bo","cy"],"recipients":2,"status":"read"},"passed":true},{"actual":{"read_by":[],"recipients":0,"status":"sent"},"check":"sender alone","expected":{"read_by":[],"recipients":0,"status":"sent"},"passed":true},{"actual":{"read_by":["cy"],"recipients":2,"status":"read"},"check":"read exactly without ack","expected":{"read_by":["cy"],"recipients":2,"status":"delivered"},"passed":false},{"actual":{"read_by":[],"recipients":3,"status":"sent"},"check":"partial delivery","expected":{"read_by":[],"recipients":3,"status":"sent"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"late joiner does not block read\", \"actual\": {\"status\": \"read\", \"read_by\": [\"bo\"], \"recipients\": 1}, \"expected\": {\"read_by\": [\"bo\"], \"recipients\": 1, \"status\": \"read\"}, \"passed\": true}, {\"check\": \"member joined exactly at the message\", \"actual\": {\"status\": \"read\", \"read_by\": [\"bo\"], \"recipients\": 2}, \"expected\": {\"read_by\": [\"bo\"], \"recipients\": 2, \"status\": \"delivered\"}, \"passed\": false}, {\"check\": \"read marker beyond message\", \"actual\": {\"status\": \"read\", \"read_by\": [\"bo\"], \"recipients\": 1}, \"expected\": {\"read_by\": [\"bo\"], \"recipients\": 1, \"status\": \"read\"}, \"passed\": true}, {\"check\": \"read without delivery ack\", \"actual\": {\"status\": \"read\", \"read_by\": [\"cy\"], \"recipients\": 2}, \"expected\": {\"read_by\": [\"cy\"], \"recipients\": 2, \"status\": \"delivered\"}, \"passed\": false}, {\"check\": \"everyone read\", \"actual\": {\"status\": \"read\", \"read_by\": [\"bo\", \"cy\"], \"recipients\": 2}, \"expected\": {\"read_by\": [\"bo\", \"cy\"], \"recipients\": 2, \"status\": \"read\"}, \"passed\": true}, {\"check\": \"sender alone\", \"actual\": {\"status\": \"sent\", \"read_by\": [], \"recipients\": 0}, \"expected\": {\"read_by\": [], \"recipients\": 0, \"status\": \"sent\"}, \"passed\": true}, {\"check\": \"read exactly without ack\", \"actual\": {\"status\": \"read\", \"read_by\": [\"cy\"], \"recipients\": 2}, \"expected\": {\"read_by\": [\"cy\"], \"recipients\": 2, \"status\": \"delivered\"}, \"passed\": false}, {\"check\": \"partial delivery\", \"actual\": {\"status\": \"sent\", \"read_by\": [], \"recipients\": 3}, \"expected\": {\"read_by\": [], \"recipients\": 3, \"status\": \"sent\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.125,"exit_code":1,"observations":[{"actual":{"read_by":["bo"],"recipients":1,"status":"delivered"},"check":"late joiner does not block read","expected":{"read_by":["bo"],"recipients":1,"status":"read"},"passed":false},{"actual":{"read_by":["bo"],"recipients":2,"status":"delivered"},"check":"member joined exactly at the message","expected":{"read_by":["bo"],"recipients":2,"status":"delivered"},"passed":true},{"actual":{"read_by":["bo"],"recipients":1,"status":"delivered"},"check":"read marker beyond message","expected":{"read_by":["bo"],"recipients":1,"status":"read"},"passed":false},{"actual":{"read_by":["cy"],"recipients":2,"status":"delivered"},"check":"read without delivery ack","expected":{"read_by":["cy"],"recipients":2,"status":"delivered"},"passed":true},{"actual":{"read_by":["bo","cy"],"recipients":2,"status":"delivered"},"check":"everyone read","expected":{"read_by":["bo","cy"],"recipients":2,"status":"read"},"passed":false},{"actual":{"read_by":[],"recipients":0,"status":"sent"},"check":"sender alone","expected":{"read_by":[],"recipients":0,"status":"sent"},"passed":true},{"actual":{"read_by":["cy"],"recipients":2,"status":"delivered"},"check":"read exactly without ack","expected":{"read_by":["cy"],"recipients":2,"status":"delivered"},"passed":true},{"actual":{"read_by":[],"recipients":3,"status":"sent"},"check":"partial delivery","expected":{"read_by":[],"recipients":3,"status":"sent"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"late joiner does not block read\", \"actual\": {\"status\": \"delivered\", \"read_by\": [\"bo\"], \"recipients\": 1}, \"expected\": {\"read_by\": [\"bo\"], \"recipients\": 1, \"status\": \"read\"}, \"passed\": false}, {\"check\": \"member joined exactly at the message\", \"actual\": {\"status\": \"delivered\", \"read_by\": [\"bo\"], \"recipients\": 2}, \"expected\": {\"read_by\": [\"bo\"], \"recipients\": 2, \"status\": \"delivered\"}, \"passed\": true}, {\"check\": \"read marker beyond message\", \"actual\": {\"status\": \"delivered\", \"read_by\": [\"bo\"], \"recipients\": 1}, \"expected\": {\"read_by\": [\"bo\"], \"recipients\": 1, \"status\": \"read\"}, \"passed\": false}, {\"check\": \"read without delivery ack\", \"actual\": {\"status\": \"delivered\", \"read_by\": [\"cy\"], \"recipients\": 2}, \"expected\": {\"read_by\": [\"cy\"], \"recipients\": 2, \"status\": \"delivered\"}, \"passed\": true}, {\"check\": \"everyone read\", \"actual\": {\"status\": \"delivered\", \"read_by\": [\"bo\", \"cy\"], \"recipients\": 2}, \"expected\": {\"read_by\": [\"bo\", \"cy\"], \"recipients\": 2, \"status\": \"read\"}, \"passed\": false}, {\"check\": \"sender alone\", \"actual\": {\"status\": \"sent\", \"read_by\": [], \"recipients\": 0}, \"expected\": {\"read_by\": [], \"recipients\": 0, \"status\": \"sent\"}, \"passed\": true}, {\"check\": \"read exactly without ack\", \"actual\": {\"status\": \"delivered\", \"read_by\": [\"cy\"], \"recipients\": 2}, \"expected\": {\"read_by\": [\"cy\"], \"recipients\": 2, \"status\": \"delivered\"}, \"passed\": true}, {\"check\": \"partial delivery\", \"actual\": {\"status\": \"sent\", \"read_by\": [], \"recipients\": 3}, \"expected\": {\"read_by\": [], \"recipients\": 3, \"status\": \"sent\"}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.714,"exit_code":0,"observations":[{"actual":{"read_by":["bo"],"recipients":1,"status":"read"},"check":"late joiner does not block read","expected":{"read_by":["bo"],"recipients":1,"status":"read"},"passed":true},{"actual":{"read_by":["bo"],"recipients":2,"status":"delivered"},"check":"member joined exactly at the message","expected":{"read_by":["bo"],"recipients":2,"status":"delivered"},"passed":true},{"actual":{"read_by":["bo"],"recipients":1,"status":"read"},"check":"read marker beyond message","expected":{"read_by":["bo"],"recipients":1,"status":"read"},"passed":true},{"actual":{"read_by":["cy"],"recipients":2,"status":"delivered"},"check":"read without delivery ack","expected":{"read_by":["cy"],"recipients":2,"status":"delivered"},"passed":true},{"actual":{"read_by":["bo","cy"],"recipients":2,"status":"read"},"check":"everyone read","expected":{"read_by":["bo","cy"],"recipients":2,"status":"read"},"passed":true},{"actual":{"read_by":[],"recipients":0,"status":"sent"},"check":"sender alone","expected":{"read_by":[],"recipients":0,"status":"sent"},"passed":true},{"actual":{"read_by":["cy"],"recipients":2,"status":"delivered"},"check":"read exactly without ack","expected":{"read_by":["cy"],"recipients":2,"status":"delivered"},"passed":true},{"actual":{"read_by":[],"recipients":3,"status":"sent"},"check":"partial delivery","expected":{"read_by":[],"recipients":3,"status":"sent"},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"late joiner does not block read\", \"actual\": {\"status\": \"read\", \"read_by\": [\"bo\"], \"recipients\": 1}, \"expected\": {\"read_by\": [\"bo\"], \"recipients\": 1, \"status\": \"read\"}, \"passed\": true}, {\"check\": \"member joined exactly at the message\", \"actual\": {\"status\": \"delivered\", \"read_by\": [\"bo\"], \"recipients\": 2}, \"expected\": {\"read_by\": [\"bo\"], \"recipients\": 2, \"status\": \"delivered\"}, \"passed\": true}, {\"check\": \"read marker beyond message\", \"actual\": {\"status\": \"read\", \"read_by\": [\"bo\"], \"recipients\": 1}, \"expected\": {\"read_by\": [\"bo\"], \"recipients\": 1, \"status\": \"read\"}, \"passed\": true}, {\"check\": \"read without delivery ack\", \"actual\": {\"status\": \"delivered\", \"read_by\": [\"cy\"], \"recipients\": 2}, \"expected\": {\"read_by\": [\"cy\"], \"recipients\": 2, \"status\": \"delivered\"}, \"passed\": true}, {\"check\": \"everyone read\", \"actual\": {\"status\": \"read\", \"read_by\": [\"bo\", \"cy\"], \"recipients\": 2}, \"expected\": {\"read_by\": [\"bo\", \"cy\"], \"recipients\": 2, \"status\": \"read\"}, \"passed\": true}, {\"check\": \"sender alone\", \"actual\": {\"status\": \"sent\", \"read_by\": [], \"recipients\": 0}, \"expected\": {\"read_by\": [], \"recipients\": 0, \"status\": \"sent\"}, \"passed\": true}, {\"check\": \"read exactly without ack\", \"actual\": {\"status\": \"delivered\", \"read_by\": [\"cy\"], \"recipients\": 2}, \"expected\": {\"read_by\": [\"cy\"], \"recipients\": 2, \"status\": \"delivered\"}, \"passed\": true}, {\"check\": \"partial delivery\", \"actual\": {\"status\": \"sent\", \"read_by\": [], \"recipients\": 3}, \"expected\": {\"read_by\": [], \"recipients\": 3, \"status\": \"sent\"}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}