FA-75926 / Chat ordering and read receipts / Open access
Summarize group delivery and read receipts for one message: read implies delivered · case 01
A recipient who read the message before the delivery acknowledgement arrived keeps the message at "sent".
ROOT CAUSE
The read implies delivered decision evaluates `delivered.get(u)` where the contract requires `delivered.get(u) or u in has_read`.
VERIFIED REPAIR
Use `delivered.get(u) or u in has_read` for the read implies delivered decision and keep every other rule of the model unchanged.
Unsuccessful approach: A strict read comparison still misses a recipient whose marker is exactly at the message. The attempted `delivered.get(u) or read.get(u, -1) > sent_seq` still disagrees with a fixture.
Case 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)}.
Why this case matters
Group tick marks summarise many receipts; wrong membership or thresholds show false "read" states.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(sender, members, joined_at, sent_seq, delivered, read):
recipients = [u for u in members if u != sender and joined_at.get(u, 0) <= sent_seq]
has_read = [u for u in recipients if read.get(u, -1) >= sent_seq]
got = [u for u in recipients if delivered.get(u)]
if not recipients:
status = 'sent'
elif len(has_read) == len(recipients):
status = 'read'
elif len(got) == len(recipients):
status = 'delivered'
else:
status = 'sent'
return {'status': status, 'read_by': sorted(has_read), 'recipients': len(recipients)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_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'})]}
for _label, _args, _expected in _CASES[N]:
check(_label, solve(*_args), _expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| late joiner does not block read | {'read_by': ['bo'], 'recipients': 1, 'status': 'read'} | {'read_by': ['bo'], 'recipients': 1, 'status': 'read'} | Passed |
| member joined exactly at the message | {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'} | {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'} | Passed |
| read marker beyond message | {'read_by': ['bo'], 'recipients': 1, 'status': 'read'} | {'read_by': ['bo'], 'recipients': 1, 'status': 'read'} | Passed |
| read without delivery ack | {'read_by': ['cy'], 'recipients': 2, 'status': 'sent'} | {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'} | Failed |
| everyone read | {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'} | {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'} | Passed |
| sender alone | {'read_by': [], 'recipients': 0, 'status': 'sent'} | {'read_by': [], 'recipients': 0, 'status': 'sent'} | Passed |
| read exactly without ack | {'read_by': ['cy'], 'recipients': 2, 'status': 'sent'} | {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'} | Failed |
| partial delivery | {'read_by': [], 'recipients': 3, 'status': 'sent'} | {'read_by': [], 'recipients': 3, 'status': 'sent'} | Passed |
SHA-256 / bc04d4e15d93bae474b5febc13adce60b2d44385f6257481061639f7e3633e1a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(sender, members, joined_at, sent_seq, delivered, read):
recipients = [u for u in members if u != sender and joined_at.get(u, 0) <= sent_seq]
has_read = [u for u in recipients if read.get(u, -1) >= sent_seq]
got = [u for u in recipients if delivered.get(u) or read.get(u, -1) > sent_seq]
if not recipients:
status = 'sent'
elif len(has_read) == len(recipients):
status = 'read'
elif len(got) == len(recipients):
status = 'delivered'
else:
status = 'sent'
return {'status': status, 'read_by': sorted(has_read), 'recipients': len(recipients)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_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'})]}
for _label, _args, _expected in _CASES[N]:
check(_label, solve(*_args), _expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| late joiner does not block read | {'read_by': ['bo'], 'recipients': 1, 'status': 'read'} | {'read_by': ['bo'], 'recipients': 1, 'status': 'read'} | Passed |
| member joined exactly at the message | {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'} | {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'} | Passed |
| read marker beyond message | {'read_by': ['bo'], 'recipients': 1, 'status': 'read'} | {'read_by': ['bo'], 'recipients': 1, 'status': 'read'} | Passed |
| read without delivery ack | {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'} | {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'} | Passed |
| everyone read | {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'} | {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'} | Passed |
| sender alone | {'read_by': [], 'recipients': 0, 'status': 'sent'} | {'read_by': [], 'recipients': 0, 'status': 'sent'} | Passed |
| read exactly without ack | {'read_by': ['cy'], 'recipients': 2, 'status': 'sent'} | {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'} | Failed |
| partial delivery | {'read_by': [], 'recipients': 3, 'status': 'sent'} | {'read_by': [], 'recipients': 3, 'status': 'sent'} | Passed |
SHA-256 / 070f1755cc32431a9e78dbfe2c2dd2894013f2b40c475270c8054d3d7b23dd50
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(sender, members, joined_at, sent_seq, delivered, read):
recipients = [u for u in members if u != sender and joined_at.get(u, 0) <= sent_seq]
has_read = [u for u in recipients if read.get(u, -1) >= sent_seq]
got = [u for u in recipients if delivered.get(u) or u in has_read]
if not recipients:
status = 'sent'
elif len(has_read) == len(recipients):
status = 'read'
elif len(got) == len(recipients):
status = 'delivered'
else:
status = 'sent'
return {'status': status, 'read_by': sorted(has_read), 'recipients': len(recipients)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_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'})]}
for _label, _args, _expected in _CASES[N]:
check(_label, solve(*_args), _expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| late joiner does not block read | {'read_by': ['bo'], 'recipients': 1, 'status': 'read'} | {'read_by': ['bo'], 'recipients': 1, 'status': 'read'} | Passed |
| member joined exactly at the message | {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'} | {'read_by': ['bo'], 'recipients': 2, 'status': 'delivered'} | Passed |
| read marker beyond message | {'read_by': ['bo'], 'recipients': 1, 'status': 'read'} | {'read_by': ['bo'], 'recipients': 1, 'status': 'read'} | Passed |
| read without delivery ack | {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'} | {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'} | Passed |
| everyone read | {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'} | {'read_by': ['bo', 'cy'], 'recipients': 2, 'status': 'read'} | Passed |
| sender alone | {'read_by': [], 'recipients': 0, 'status': 'sent'} | {'read_by': [], 'recipients': 0, 'status': 'sent'} | Passed |
| read exactly without ack | {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'} | {'read_by': ['cy'], 'recipients': 2, 'status': 'delivered'} | Passed |
| partial delivery | {'read_by': [], 'recipients': 3, 'status': 'sent'} | {'read_by': [], 'recipients': 3, 'status': 'sent'} | Passed |
SHA-256 / aeaa22a0b07474d2a6583ab95130f52f4b30e34fd4251e0ecfc3c01b301740eb
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:49:11.501197+00:00.
Case digest / 289d929c57d6637573a60ca626ba8723973e350986c97a7b2c1997c01db8ad06