FAILURE MAP
← Case archive

FA-086 / Distributed coordination / Open access

Overlapping identical reads start duplicate remote jobs · case 01

Concurrent callers start separate fetches, or a completed fetch incorrectly absorbs a later request.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The request registry does not distinguish active shared work from a permanent result cache.

THE FAILURE

The request registry does not distinguish active shared work from a permanent result cache.

Unsuccessful approach: Retaining completed keys suppresses fresh remote work and delivers a stale result to later callers.

Case contract

Events are ['start',key,waiter] or ['complete',key,value]. Distinct waiters share an active job. Completion emits [waiter,value] in registration order and removes that flight. Later starts create new jobs. Return [jobs started,deliveries]; unsolicited completions are ignored.

Why this case matters

Models request coalescing for distributed reads. This is not durable event deduplication: completed requests deliberately do not establish a cache or permanent idempotency record.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    active, deliveries, started = {}, [], 0
    for kind, key, value in events:
        if kind == 'start':
            started += 1
            active.setdefault(key, []).append(value)
        else:
            deliveries.extend([[waiter, value] for waiter in active.pop(key, [])])
    return [started, deliveries]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
starts = [['start', 'k', 'w'+str(i)] for i in range(N+1)]
check('overlapping callers share work', solve(starts+[['complete', 'k', N]]), [1, [['w'+str(i), N] for i in range(N+1)]])
check('later request starts fresh', solve([['start', 'k', 'a'], ['complete', 'k', N], ['start', 'k', 'b'], ['complete', 'k', N+1]]), [2, [['a', N], ['b', N+1]]])
check('separate keys remain separate', solve([['start', 'x', 'a'], ['start', 'y', 'b'], ['complete', 'y', N], ['complete', 'x', N+1]]), [2, [['b', N], ['a', N+1]]])
check('unsolicited completion', solve([['complete', 'unknown', N]]), [0, []])
check('empty arrival stream', solve([]), [0, []])
check('unfinished flight is pending', solve(starts), [1, []])
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 fixtureActualExpectedOutcome
overlapping callers share work[2, [['w0', 1], ['w1', 1]]][1, [['w0', 1], ['w1', 1]]]Failed
later request starts fresh[2, [['a', 1], ['b', 2]]][2, [['a', 1], ['b', 2]]]Passed
separate keys remain separate[2, [['b', 1], ['a', 2]]][2, [['b', 1], ['a', 2]]]Passed
unsolicited completion[0, []][0, []]Passed
empty arrival stream[0, []][0, []]Passed
unfinished flight is pending[2, []][1, []]Failed

SHA-256 / d20810d824ebe15634f61251bc8913dcb8f667425aa5a9ad8c1e13f7514f69c2

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    active, completed, deliveries, started = {}, {}, [], 0
    for kind, key, value in events:
        if kind == 'start':
            if key in completed:
                deliveries.append([value, completed[key]])
            else:
                if key not in active:
                    started += 1
                active.setdefault(key, []).append(value)
        elif key in active:
            deliveries.extend([[waiter, value] for waiter in active.pop(key)])
            completed[key] = value
    return [started, deliveries]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
starts = [['start', 'k', 'w'+str(i)] for i in range(N+1)]
check('overlapping callers share work', solve(starts+[['complete', 'k', N]]), [1, [['w'+str(i), N] for i in range(N+1)]])
check('later request starts fresh', solve([['start', 'k', 'a'], ['complete', 'k', N], ['start', 'k', 'b'], ['complete', 'k', N+1]]), [2, [['a', N], ['b', N+1]]])
check('separate keys remain separate', solve([['start', 'x', 'a'], ['start', 'y', 'b'], ['complete', 'y', N], ['complete', 'x', N+1]]), [2, [['b', N], ['a', N+1]]])
check('unsolicited completion', solve([['complete', 'unknown', N]]), [0, []])
check('empty arrival stream', solve([]), [0, []])
check('unfinished flight is pending', solve(starts), [1, []])
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 fixtureActualExpectedOutcome
overlapping callers share work[1, [['w0', 1], ['w1', 1]]][1, [['w0', 1], ['w1', 1]]]Passed
later request starts fresh[1, [['a', 1], ['b', 1]]][2, [['a', 1], ['b', 2]]]Failed
separate keys remain separate[2, [['b', 1], ['a', 2]]][2, [['b', 1], ['a', 2]]]Passed
unsolicited completion[0, []][0, []]Passed
empty arrival stream[0, []][0, []]Passed
unfinished flight is pending[1, []][1, []]Passed

SHA-256 / c4e02eefbeafe043065b0d6e8a55e0981f6fce2be18b26edc6e2ba715db27da9

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

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:36:50.441720+00:00.

Case digest / aa7e1b868a6a66e02c191d58e98cff08156a3f808231e024711a6ce8b1f55ea6