{"abstract":"Typing indicators linger for the whole boundary tick after the timeout.","category":"Chat ordering and read receipts","checks":7,"contract":"events [ts_ms, user, kind] with kind start, stop or message are applied in (ts, user, kind) order. A user is typing when their latest start has no later stop or message and now - start < 6000 ms (a start stamped in the future by a skewed clock stays active). The viewer is excluded. Typers are listed by start time: one -> \"A is typing\", two -> \"A and B are typing\", more -> \"Several people are typing\", none -> \"\". names maps ids to display names.","contract_signature":"events, me, now, names","evaluation_group":"w2-chat_ordering_and_read_receipts-typing-indicator","failed_approach":"Taking the absolute age expires future-stamped starts from skewed clocks immediately. The attempted `abs(now - ts) < 6000` still disagrees with a fixture.","family":"w2-chat_ordering_and_read_receipts-typing-indicator-expiry-window","id":"FA-76131","implementations":{"attempt":{"sha256":"6f40434d2517330b8f8da501b69193383eda820d90024b2a4e223bcc9dd2f7f3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events, me, now, names):\n    last = {}\n    for ts, user, kind in sorted(events):\n        if kind == 'start':\n            last[user] = ts\n        else:\n            last.pop(user, None)\n    active = sorted((ts, user) for user, ts in last.items() if user != me and abs(now - ts) < 6000)\n    who = [names.get(u, u) for _, u in active]\n    if not who:\n        return ''\n    if len(who) == 1:\n        return who[0] + ' is typing'\n    if len(who) == 2:\n        return who[0] + ' and ' + who[1] + ' are typing'\n    return 'Several people are typing'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_CASES = {1: [('exact expiry', ([[1000, 'bo', 'start']], 'me', 7000, {'bo': 'Bo'}), ''), ('future stamped start', ([[50001, 'bo', 'start']], 'me', 40000, {}), 'bo is typing'), ('message clears typing', ([[100, 'bo', 'start'], [301, 'bo', 'message']], 'me', 1000, {'bo': 'Bo'}), ''), ('start order', ([[500, 'zed', 'start'], [701, 'amy', 'start']], 'me', 2000, {'zed': 'Zed', 'amy': 'Amy'}), 'Zed and Amy are typing'), ('three typers', ([[1, 'a', 'start'], [2, 'b', 'start'], [3, 'c', 'start']], 'me', 11, {'a': 'A', 'b': 'B', 'c': 'C'}), 'Several people are typing'), ('stop overtaken in transit', ([[2501, 'bo', 'stop'], [2100, 'bo', 'start'], [2600, 'cy', 'start']], 'me', 3000, {'cy': 'Cy'}), 'Cy is typing'), ('self typing hidden', ([[10, 'me', 'start']], 'me', 21, {}), '')], 2: [('exact expiry', ([[2000, 'bo', 'start']], 'me', 8000, {'bo': 'Bo'}), ''), ('future stamped start', ([[50002, 'bo', 'start']], 'me', 40000, {}), 'bo is typing'), ('message clears typing', ([[100, 'bo', 'start'], [302, 'bo', 'message']], 'me', 1000, {'bo': 'Bo'}), ''), ('start order', ([[500, 'zed', 'start'], [702, 'amy', 'start']], 'me', 2000, {'zed': 'Zed', 'amy': 'Amy'}), 'Zed and Amy are typing'), ('three typers', ([[1, 'a', 'start'], [2, 'b', 'start'], [3, 'c', 'start']], 'me', 12, {'a': 'A', 'b': 'B', 'c': 'C'}), 'Several people are typing'), ('stop overtaken in transit', ([[2502, 'bo', 'stop'], [2100, 'bo', 'start'], [2600, 'cy', 'start']], 'me', 3000, {'cy': 'Cy'}), 'Cy is typing'), ('self typing hidden', ([[10, 'me', 'start']], 'me', 22, {}), '')], 3: [('exact expiry', ([[3000, 'bo', 'start']], 'me', 9000, {'bo': 'Bo'}), ''), ('future stamped start', ([[50003, 'bo', 'start']], 'me', 40000, {}), 'bo is typing'), ('message clears typing', ([[100, 'bo', 'start'], [303, 'bo', 'message']], 'me', 1000, {'bo': 'Bo'}), ''), ('start order', ([[500, 'zed', 'start'], [703, 'amy', 'start']], 'me', 2000, {'zed': 'Zed', 'amy': 'Amy'}), 'Zed and Amy are typing'), ('three typers', ([[1, 'a', 'start'], [2, 'b', 'start'], [3, 'c', 'start']], 'me', 13, {'a': 'A', 'b': 'B', 'c': 'C'}), 'Several people are typing'), ('stop overtaken in transit', ([[2503, 'bo', 'stop'], [2100, 'bo', 'start'], [2600, 'cy', 'start']], 'me', 3000, {'cy': 'Cy'}), 'Cy is typing'), ('self typing hidden', ([[10, 'me', 'start']], 'me', 23, {}), '')], 4: [('exact expiry', ([[4000, 'bo', 'start']], 'me', 10000, {'bo': 'Bo'}), ''), ('future stamped start', ([[50004, 'bo', 'start']], 'me', 40000, {}), 'bo is typing'), ('message clears typing', ([[100, 'bo', 'start'], [304, 'bo', 'message']], 'me', 1000, {'bo': 'Bo'}), ''), ('start order', ([[500, 'zed', 'start'], [704, 'amy', 'start']], 'me', 2000, {'zed': 'Zed', 'amy': 'Amy'}), 'Zed and Amy are typing'), ('three typers', ([[1, 'a', 'start'], [2, 'b', 'start'], [3, 'c', 'start']], 'me', 14, {'a': 'A', 'b': 'B', 'c': 'C'}), 'Several people are typing'), ('stop overtaken in transit', ([[2504, 'bo', 'stop'], [2100, 'bo', 'start'], [2600, 'cy', 'start']], 'me', 3000, {'cy': 'Cy'}), 'Cy is typing'), ('self typing hidden', ([[10, 'me', 'start']], 'me', 24, {}), '')], 5: [('exact expiry', ([[5000, 'bo', 'start']], 'me', 11000, {'bo': 'Bo'}), ''), ('future stamped start', ([[50005, 'bo', 'start']], 'me', 40000, {}), 'bo is typing'), ('message clears typing', ([[100, 'bo', 'start'], [305, 'bo', 'message']], 'me', 1000, {'bo': 'Bo'}), ''), ('start order', ([[500, 'zed', 'start'], [705, 'amy', 'start']], 'me', 2000, {'zed': 'Zed', 'amy': 'Amy'}), 'Zed and Amy are typing'), ('three typers', ([[1, 'a', 'start'], [2, 'b', 'start'], [3, 'c', 'start']], 'me', 15, {'a': 'A', 'b': 'B', 'c': 'C'}), 'Several people are typing'), ('stop overtaken in transit', ([[2505, 'bo', 'stop'], [2100, 'bo', 'start'], [2600, 'cy', 'start']], 'me', 3000, {'cy': 'Cy'}), 'Cy is typing'), ('self typing hidden', ([[10, 'me', 'start']], 'me', 25, {}), '')]}\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":"40b73aa62b61110d0440d6ed7526e3997c9281f1614f91e2067a58ea32e8465a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events, me, now, names):\n    last = {}\n    for ts, user, kind in sorted(events):\n        if kind == 'start':\n            last[user] = ts\n        else:\n            last.pop(user, None)\n    active = sorted((ts, user) for user, ts in last.items() if user != me and now - ts <= 6000)\n    who = [names.get(u, u) for _, u in active]\n    if not who:\n        return ''\n    if len(who) == 1:\n        return who[0] + ' is typing'\n    if len(who) == 2:\n        return who[0] + ' and ' + who[1] + ' are typing'\n    return 'Several people are typing'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_CASES = {1: [('exact expiry', ([[1000, 'bo', 'start']], 'me', 7000, {'bo': 'Bo'}), ''), ('future stamped start', ([[50001, 'bo', 'start']], 'me', 40000, {}), 'bo is typing'), ('message clears typing', ([[100, 'bo', 'start'], [301, 'bo', 'message']], 'me', 1000, {'bo': 'Bo'}), ''), ('start order', ([[500, 'zed', 'start'], [701, 'amy', 'start']], 'me', 2000, {'zed': 'Zed', 'amy': 'Amy'}), 'Zed and Amy are typing'), ('three typers', ([[1, 'a', 'start'], [2, 'b', 'start'], [3, 'c', 'start']], 'me', 11, {'a': 'A', 'b': 'B', 'c': 'C'}), 'Several people are typing'), ('stop overtaken in transit', ([[2501, 'bo', 'stop'], [2100, 'bo', 'start'], [2600, 'cy', 'start']], 'me', 3000, {'cy': 'Cy'}), 'Cy is typing'), ('self typing hidden', ([[10, 'me', 'start']], 'me', 21, {}), '')], 2: [('exact expiry', ([[2000, 'bo', 'start']], 'me', 8000, {'bo': 'Bo'}), ''), ('future stamped start', ([[50002, 'bo', 'start']], 'me', 40000, {}), 'bo is typing'), ('message clears typing', ([[100, 'bo', 'start'], [302, 'bo', 'message']], 'me', 1000, {'bo': 'Bo'}), ''), ('start order', ([[500, 'zed', 'start'], [702, 'amy', 'start']], 'me', 2000, {'zed': 'Zed', 'amy': 'Amy'}), 'Zed and Amy are typing'), ('three typers', ([[1, 'a', 'start'], [2, 'b', 'start'], [3, 'c', 'start']], 'me', 12, {'a': 'A', 'b': 'B', 'c': 'C'}), 'Several people are typing'), ('stop overtaken in transit', ([[2502, 'bo', 'stop'], [2100, 'bo', 'start'], [2600, 'cy', 'start']], 'me', 3000, {'cy': 'Cy'}), 'Cy is typing'), ('self typing hidden', ([[10, 'me', 'start']], 'me', 22, {}), '')], 3: [('exact expiry', ([[3000, 'bo', 'start']], 'me', 9000, {'bo': 'Bo'}), ''), ('future stamped start', ([[50003, 'bo', 'start']], 'me', 40000, {}), 'bo is typing'), ('message clears typing', ([[100, 'bo', 'start'], [303, 'bo', 'message']], 'me', 1000, {'bo': 'Bo'}), ''), ('start order', ([[500, 'zed', 'start'], [703, 'amy', 'start']], 'me', 2000, {'zed': 'Zed', 'amy': 'Amy'}), 'Zed and Amy are typing'), ('three typers', ([[1, 'a', 'start'], [2, 'b', 'start'], [3, 'c', 'start']], 'me', 13, {'a': 'A', 'b': 'B', 'c': 'C'}), 'Several people are typing'), ('stop overtaken in transit', ([[2503, 'bo', 'stop'], [2100, 'bo', 'start'], [2600, 'cy', 'start']], 'me', 3000, {'cy': 'Cy'}), 'Cy is typing'), ('self typing hidden', ([[10, 'me', 'start']], 'me', 23, {}), '')], 4: [('exact expiry', ([[4000, 'bo', 'start']], 'me', 10000, {'bo': 'Bo'}), ''), ('future stamped start', ([[50004, 'bo', 'start']], 'me', 40000, {}), 'bo is typing'), ('message clears typing', ([[100, 'bo', 'start'], [304, 'bo', 'message']], 'me', 1000, {'bo': 'Bo'}), ''), ('start order', ([[500, 'zed', 'start'], [704, 'amy', 'start']], 'me', 2000, {'zed': 'Zed', 'amy': 'Amy'}), 'Zed and Amy are typing'), ('three typers', ([[1, 'a', 'start'], [2, 'b', 'start'], [3, 'c', 'start']], 'me', 14, {'a': 'A', 'b': 'B', 'c': 'C'}), 'Several people are typing'), ('stop overtaken in transit', ([[2504, 'bo', 'stop'], [2100, 'bo', 'start'], [2600, 'cy', 'start']], 'me', 3000, {'cy': 'Cy'}), 'Cy is typing'), ('self typing hidden', ([[10, 'me', 'start']], 'me', 24, {}), '')], 5: [('exact expiry', ([[5000, 'bo', 'start']], 'me', 11000, {'bo': 'Bo'}), ''), ('future stamped start', ([[50005, 'bo', 'start']], 'me', 40000, {}), 'bo is typing'), ('message clears typing', ([[100, 'bo', 'start'], [305, 'bo', 'message']], 'me', 1000, {'bo': 'Bo'}), ''), ('start order', ([[500, 'zed', 'start'], [705, 'amy', 'start']], 'me', 2000, {'zed': 'Zed', 'amy': 'Amy'}), 'Zed and Amy are typing'), ('three typers', ([[1, 'a', 'start'], [2, 'b', 'start'], [3, 'c', 'start']], 'me', 15, {'a': 'A', 'b': 'B', 'c': 'C'}), 'Several people are typing'), ('stop overtaken in transit', ([[2505, 'bo', 'stop'], [2100, 'bo', 'start'], [2600, 'cy', 'start']], 'me', 3000, {'cy': 'Cy'}), 'Cy is typing'), ('self typing hidden', ([[10, 'me', 'start']], 'me', 25, {}), '')]}\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-typing-indicator-expiry-window","generated_at":"2026-09-29T14:49:13.530507+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Typing indicators are ephemeral presence; stale or misordered indicators mislead users about who is replying.","root_cause":"The expiry window decision evaluates `now - ts <= 6000` where the contract requires `now - ts < 6000`.","sha256":"92511c59857ffa146c9bb2ea792406bfba7f098cd8316510e64ff99a4bf6c253","title":"Render who is typing from start and stop events: expiry window · case 01","variant":1,"variant_policy":"N selects a different enumerated fixture set (shifted clocks, identifiers and sizes); boundary fixtures recur across variants.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":44.307,"exit_code":1,"observations":[{"actual":"","check":"exact expiry","expected":"","passed":true},{"actual":"","check":"future stamped start","expected":"bo is typing","passed":false},{"actual":"","check":"message clears typing","expected":"","passed":true},{"actual":"Zed and Amy are typing","check":"start order","expected":"Zed and Amy are typing","passed":true},{"actual":"Several people are typing","check":"three typers","expected":"Several people are typing","passed":true},{"actual":"Cy is typing","check":"stop overtaken in transit","expected":"Cy is typing","passed":true},{"actual":"","check":"self typing hidden","expected":"","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact expiry\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"future stamped start\", \"actual\": \"\", \"expected\": \"bo is typing\", \"passed\": false}, {\"check\": \"message clears typing\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"start order\", \"actual\": \"Zed and Amy are typing\", \"expected\": \"Zed and Amy are typing\", \"passed\": true}, {\"check\": \"three typers\", \"actual\": \"Several people are typing\", \"expected\": \"Several people are typing\", \"passed\": true}, {\"check\": \"stop overtaken in transit\", \"actual\": \"Cy is typing\", \"expected\": \"Cy is typing\", \"passed\": true}, {\"check\": \"self typing hidden\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.101,"exit_code":1,"observations":[{"actual":"Bo is typing","check":"exact expiry","expected":"","passed":false},{"actual":"bo is typing","check":"future stamped start","expected":"bo is typing","passed":true},{"actual":"","check":"message clears typing","expected":"","passed":true},{"actual":"Zed and Amy are typing","check":"start order","expected":"Zed and Amy are typing","passed":true},{"actual":"Several people are typing","check":"three typers","expected":"Several people are typing","passed":true},{"actual":"Cy is typing","check":"stop overtaken in transit","expected":"Cy is typing","passed":true},{"actual":"","check":"self typing hidden","expected":"","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact expiry\", \"actual\": \"Bo is typing\", \"expected\": \"\", \"passed\": false}, {\"check\": \"future stamped start\", \"actual\": \"bo is typing\", \"expected\": \"bo is typing\", \"passed\": true}, {\"check\": \"message clears typing\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"start order\", \"actual\": \"Zed and Amy are typing\", \"expected\": \"Zed and Amy are typing\", \"passed\": true}, {\"check\": \"three typers\", \"actual\": \"Several people are typing\", \"expected\": \"Several people are typing\", \"passed\": true}, {\"check\": \"stop overtaken in transit\", \"actual\": \"Cy is typing\", \"expected\": \"Cy is typing\", \"passed\": true}, {\"check\": \"self typing hidden\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}