FAILURE MAP
← Case archive

FA-26576 / HTTP ranges / Open access

Repeated close events release a range handle only once · case 01

Repeated close events release a range handle only once.

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

ROOT CAUSE

The stream-close-idempotency decision uses return [events.count("close"),"close" not in events].

THE FAILURE

The stream-close-idempotency decision uses return [events.count("close"),"close" not in events].

Unsuccessful approach: The partial repair uses return [1,False], which still violates the stated contract.

Case contract

Events are close or tick. Initially one handle is open. Return [release-count,open]; subsequent close is a no-op.

Why this case matters

Range responses combine representation identity, conditional requests, framing, and partial-object state.

1 / The failure

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

N = 1
observations = []
def solve(events):
    return [events.count("close"),"close" not in events]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('stream-close-idempotency fixture 0', solve( ["close"]*(N+1)), [1,False])
check('stream-close-idempotency fixture 1', solve([]), [0,True])
check('stream-close-idempotency fixture 2', solve(["tick"]*N), [0,True])
check('stream-close-idempotency fixture 3', solve(["close"]), [1,False])
check('stream-close-idempotency fixture 4', solve(["tick","close","tick"]), [1,False])
check('stream-close-idempotency fixture 5', solve(["close","tick","close"]), [1,False])
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
stream-close-idempotency fixture 0[2, False][1, False]Failed
stream-close-idempotency fixture 1[0, True][0, True]Passed
stream-close-idempotency fixture 2[0, True][0, True]Passed
stream-close-idempotency fixture 3[1, False][1, False]Passed
stream-close-idempotency fixture 4[1, False][1, False]Passed
stream-close-idempotency fixture 5[2, False][1, False]Failed

SHA-256 / 2173467e7f0d5847109c2b59a35ec20f9256830639ea60c26318f26b0cbcd0f2

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(events):
    return [1,False]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('stream-close-idempotency fixture 0', solve( ["close"]*(N+1)), [1,False])
check('stream-close-idempotency fixture 1', solve([]), [0,True])
check('stream-close-idempotency fixture 2', solve(["tick"]*N), [0,True])
check('stream-close-idempotency fixture 3', solve(["close"]), [1,False])
check('stream-close-idempotency fixture 4', solve(["tick","close","tick"]), [1,False])
check('stream-close-idempotency fixture 5', solve(["close","tick","close"]), [1,False])
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
stream-close-idempotency fixture 0[1, False][1, False]Passed
stream-close-idempotency fixture 1[1, False][0, True]Failed
stream-close-idempotency fixture 2[1, False][0, True]Failed
stream-close-idempotency fixture 3[1, False][1, False]Passed
stream-close-idempotency fixture 4[1, False][1, False]Passed
stream-close-idempotency fixture 5[1, False][1, False]Passed

SHA-256 / 5bb8068ea686e003290861a3a7dbbf04b91a52b47403ac8c0575cc05b073cb51

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

Deterministic simplified range service, with stipulated local policies and already parsed trusted inputs; not a complete HTTP 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:41:17.193359+00:00.

Case digest / 86d474304c2bcc768139d2906bbcaa181a1fe3476279232acd9b6980ff6bdaf6