{"abstract":"Each arrival postpones a batch timer, so sustained low-rate traffic starves publication.","category":"Runtime and resources","checks":7,"contract":"Arrivals have nondecreasing integer timestamps and latency is nonnegative. Before admitting an arrival, flush an existing batch if its first-item deadline <= arrival time. At finish_time (>= last arrival), flush if due. Record the scheduled deadline as flush time. Return [flushed [time,values] batches,remaining values]; actual event-loop delay is outside this model.","evaluation_group":"model-94c81c5f8e82d69e","failed_approach":"Anchoring the timer correctly but using a strict greater-than comparison leaves an exactly due batch pending.","family":"runtime-oldest-item-flush-deadline","id":"FA-271","implementations":{"attempt":{"sha256":"8e2abca6ea08d7c3ddea5fded4764155dda14d6c19b649e5afdebbd1f1d4ebbc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(latency, arrivals, finish_time):\n    pending, deadline, flushed = [], None, []\n    for timestamp, value in arrivals:\n        if pending and deadline < timestamp:\n            flushed.append([deadline, pending])\n            pending, deadline = [], None\n        if not pending:\n            deadline = timestamp + latency\n        pending.append(value)\n    if pending and deadline < finish_time:\n        flushed.append([deadline, pending])\n        pending = []\n    return [flushed, pending]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('steady arrivals cannot postpone oldest', solve(3*N, [[0, 'a'], [N, 'b'], [2*N, 'c']], 3*N), [[[3*N, ['a', 'b', 'c']]], []])\ncheck('arrival at deadline starts new batch', solve(3*N, [[0, 'a'], [3*N, 'b']], 3*N), [[[3*N, ['a']]], ['b']])\ncheck('sparse arrivals create distinct batches', solve(3*N, [[0, 'a'], [4*N, 'b']], 8*N), [[[3*N, ['a']], [7*N, ['b']]], []])\ncheck('not yet due remains buffered', solve(3*N, [[0, 'a']], N), [[], ['a']])\ncheck('same-tick values share batch', solve(N, [[0, 'a'], [0, 'b']], N), [[[N, ['a', 'b']]], []])\ncheck('zero-latency each item flushes', solve(0, [[N, 'a'], [N, 'b']], N), [[[N, ['a']], [N, ['b']]], []])\ncheck('empty buffer never flushes', solve(N, [], 10*N), [[], []])\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":"6c4669b463e91e3003d858431be34521d22ed3c8aa055f336d63115b904ca8a9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(latency, arrivals, finish_time):\n    pending, deadline, flushed = [], None, []\n    for timestamp, value in arrivals:\n        if pending and deadline <= timestamp:\n            flushed.append([deadline, pending])\n            pending, deadline = [], None\n        if True:\n            deadline = timestamp + latency\n        pending.append(value)\n    if pending and deadline <= finish_time:\n        flushed.append([deadline, pending])\n        pending = []\n    return [flushed, pending]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('steady arrivals cannot postpone oldest', solve(3*N, [[0, 'a'], [N, 'b'], [2*N, 'c']], 3*N), [[[3*N, ['a', 'b', 'c']]], []])\ncheck('arrival at deadline starts new batch', solve(3*N, [[0, 'a'], [3*N, 'b']], 3*N), [[[3*N, ['a']]], ['b']])\ncheck('sparse arrivals create distinct batches', solve(3*N, [[0, 'a'], [4*N, 'b']], 8*N), [[[3*N, ['a']], [7*N, ['b']]], []])\ncheck('not yet due remains buffered', solve(3*N, [[0, 'a']], N), [[], ['a']])\ncheck('same-tick values share batch', solve(N, [[0, 'a'], [0, 'b']], N), [[[N, ['a', 'b']]], []])\ncheck('zero-latency each item flushes', solve(0, [[N, 'a'], [N, 'b']], N), [[[N, ['a']], [N, ['b']]], []])\ncheck('empty buffer never flushes', solve(N, [], 10*N), [[], []])\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":"2815aa62be18dc006f7ed5171a7396a9662a7b8bd1d0e77868707d269d315529","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(latency, arrivals, finish_time):\n    pending, deadline, flushed = [], None, []\n    for timestamp, value in arrivals:\n        if pending and deadline <= timestamp:\n            flushed.append([deadline, pending])\n            pending, deadline = [], None\n        if not pending:\n            deadline = timestamp + latency\n        pending.append(value)\n    if pending and deadline <= finish_time:\n        flushed.append([deadline, pending])\n        pending = []\n    return [flushed, pending]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('steady arrivals cannot postpone oldest', solve(3*N, [[0, 'a'], [N, 'b'], [2*N, 'c']], 3*N), [[[3*N, ['a', 'b', 'c']]], []])\ncheck('arrival at deadline starts new batch', solve(3*N, [[0, 'a'], [3*N, 'b']], 3*N), [[[3*N, ['a']]], ['b']])\ncheck('sparse arrivals create distinct batches', solve(3*N, [[0, 'a'], [4*N, 'b']], 8*N), [[[3*N, ['a']], [7*N, ['b']]], []])\ncheck('not yet due remains buffered', solve(3*N, [[0, 'a']], N), [[], ['a']])\ncheck('same-tick values share batch', solve(N, [[0, 'a'], [0, 'b']], N), [[[N, ['a', 'b']]], []])\ncheck('zero-latency each item flushes', solve(0, [[N, 'a'], [N, 'b']], N), [[[N, ['a']], [N, ['b']]], []])\ncheck('empty buffer never flushes', solve(N, [], 10*N), [[], []])\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":" 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":"runtime-oldest-item-flush-deadline","generated_at":"2026-09-29T14:36:51.568611+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Models latency-bounded batching and the difference between a debounce timer and a maximum age guarantee for the oldest queued item.","repair":"Set one deadline when an empty batch receives its first item and flush at or before the next arrival at that deadline.","root_cause":"The deadline is based on the latest arrival instead of the oldest buffered item.","sha256":"935217eb3b10607dd71ec8feeb5ec2981191b802f0404e5e3e369b61616e1f06","title":"A busy batch never reaches its flush deadline · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":35.268,"exit_code":1,"observations":[{"actual":[[],["a","b","c"]],"check":"steady arrivals cannot postpone oldest","expected":[[[3,["a","b","c"]]],[]],"passed":false},{"actual":[[],["a","b"]],"check":"arrival at deadline starts new batch","expected":[[[3,["a"]]],["b"]],"passed":false},{"actual":[[[3,["a"]],[7,["b"]]],[]],"check":"sparse arrivals create distinct batches","expected":[[[3,["a"]],[7,["b"]]],[]],"passed":true},{"actual":[[],["a"]],"check":"not yet due remains buffered","expected":[[],["a"]],"passed":true},{"actual":[[],["a","b"]],"check":"same-tick values share batch","expected":[[[1,["a","b"]]],[]],"passed":false},{"actual":[[],["a","b"]],"check":"zero-latency each item flushes","expected":[[[1,["a"]],[1,["b"]]],[]],"passed":false},{"actual":[[],[]],"check":"empty buffer never flushes","expected":[[],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"steady arrivals cannot postpone oldest\", \"actual\": [[], [\"a\", \"b\", \"c\"]], \"expected\": [[[3, [\"a\", \"b\", \"c\"]]], []], \"passed\": false}, {\"check\": \"arrival at deadline starts new batch\", \"actual\": [[], [\"a\", \"b\"]], \"expected\": [[[3, [\"a\"]]], [\"b\"]], \"passed\": false}, {\"check\": \"sparse arrivals create distinct batches\", \"actual\": [[[3, [\"a\"]], [7, [\"b\"]]], []], \"expected\": [[[3, [\"a\"]], [7, [\"b\"]]], []], \"passed\": true}, {\"check\": \"not yet due remains buffered\", \"actual\": [[], [\"a\"]], \"expected\": [[], [\"a\"]], \"passed\": true}, {\"check\": \"same-tick values share batch\", \"actual\": [[], [\"a\", \"b\"]], \"expected\": [[[1, [\"a\", \"b\"]]], []], \"passed\": false}, {\"check\": \"zero-latency each item flushes\", \"actual\": [[], [\"a\", \"b\"]], \"expected\": [[[1, [\"a\"]], [1, [\"b\"]]], []], \"passed\": false}, {\"check\": \"empty buffer never flushes\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":32.607,"exit_code":1,"observations":[{"actual":[[],["a","b","c"]],"check":"steady arrivals cannot postpone oldest","expected":[[[3,["a","b","c"]]],[]],"passed":false},{"actual":[[[3,["a"]]],["b"]],"check":"arrival at deadline starts new batch","expected":[[[3,["a"]]],["b"]],"passed":true},{"actual":[[[3,["a"]],[7,["b"]]],[]],"check":"sparse arrivals create distinct batches","expected":[[[3,["a"]],[7,["b"]]],[]],"passed":true},{"actual":[[],["a"]],"check":"not yet due remains buffered","expected":[[],["a"]],"passed":true},{"actual":[[[1,["a","b"]]],[]],"check":"same-tick values share batch","expected":[[[1,["a","b"]]],[]],"passed":true},{"actual":[[[1,["a"]],[1,["b"]]],[]],"check":"zero-latency each item flushes","expected":[[[1,["a"]],[1,["b"]]],[]],"passed":true},{"actual":[[],[]],"check":"empty buffer never flushes","expected":[[],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"steady arrivals cannot postpone oldest\", \"actual\": [[], [\"a\", \"b\", \"c\"]], \"expected\": [[[3, [\"a\", \"b\", \"c\"]]], []], \"passed\": false}, {\"check\": \"arrival at deadline starts new batch\", \"actual\": [[[3, [\"a\"]]], [\"b\"]], \"expected\": [[[3, [\"a\"]]], [\"b\"]], \"passed\": true}, {\"check\": \"sparse arrivals create distinct batches\", \"actual\": [[[3, [\"a\"]], [7, [\"b\"]]], []], \"expected\": [[[3, [\"a\"]], [7, [\"b\"]]], []], \"passed\": true}, {\"check\": \"not yet due remains buffered\", \"actual\": [[], [\"a\"]], \"expected\": [[], [\"a\"]], \"passed\": true}, {\"check\": \"same-tick values share batch\", \"actual\": [[[1, [\"a\", \"b\"]]], []], \"expected\": [[[1, [\"a\", \"b\"]]], []], \"passed\": true}, {\"check\": \"zero-latency each item flushes\", \"actual\": [[[1, [\"a\"]], [1, [\"b\"]]], []], \"expected\": [[[1, [\"a\"]], [1, [\"b\"]]], []], \"passed\": true}, {\"check\": \"empty buffer never flushes\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":32.969,"exit_code":0,"observations":[{"actual":[[[3,["a","b","c"]]],[]],"check":"steady arrivals cannot postpone oldest","expected":[[[3,["a","b","c"]]],[]],"passed":true},{"actual":[[[3,["a"]]],["b"]],"check":"arrival at deadline starts new batch","expected":[[[3,["a"]]],["b"]],"passed":true},{"actual":[[[3,["a"]],[7,["b"]]],[]],"check":"sparse arrivals create distinct batches","expected":[[[3,["a"]],[7,["b"]]],[]],"passed":true},{"actual":[[],["a"]],"check":"not yet due remains buffered","expected":[[],["a"]],"passed":true},{"actual":[[[1,["a","b"]]],[]],"check":"same-tick values share batch","expected":[[[1,["a","b"]]],[]],"passed":true},{"actual":[[[1,["a"]],[1,["b"]]],[]],"check":"zero-latency each item flushes","expected":[[[1,["a"]],[1,["b"]]],[]],"passed":true},{"actual":[[],[]],"check":"empty buffer never flushes","expected":[[],[]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"steady arrivals cannot postpone oldest\", \"actual\": [[[3, [\"a\", \"b\", \"c\"]]], []], \"expected\": [[[3, [\"a\", \"b\", \"c\"]]], []], \"passed\": true}, {\"check\": \"arrival at deadline starts new batch\", \"actual\": [[[3, [\"a\"]]], [\"b\"]], \"expected\": [[[3, [\"a\"]]], [\"b\"]], \"passed\": true}, {\"check\": \"sparse arrivals create distinct batches\", \"actual\": [[[3, [\"a\"]], [7, [\"b\"]]], []], \"expected\": [[[3, [\"a\"]], [7, [\"b\"]]], []], \"passed\": true}, {\"check\": \"not yet due remains buffered\", \"actual\": [[], [\"a\"]], \"expected\": [[], [\"a\"]], \"passed\": true}, {\"check\": \"same-tick values share batch\", \"actual\": [[[1, [\"a\", \"b\"]]], []], \"expected\": [[[1, [\"a\", \"b\"]]], []], \"passed\": true}, {\"check\": \"zero-latency each item flushes\", \"actual\": [[[1, [\"a\"]], [1, [\"b\"]]], []], \"expected\": [[[1, [\"a\"]], [1, [\"b\"]]], []], \"passed\": true}, {\"check\": \"empty buffer never flushes\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}