FA-26446 / HTTP ranges / Open access
The multipart terminator closes the boundary exactly once · case 01
The multipart terminator closes the boundary exactly once.
ROOT CAUSE
The multipart-closing-delimiter decision uses return "".join(chunks)+"--"+boundary+"\r\n".
THE FAILURE
The multipart-closing-delimiter decision uses return "".join(chunks)+"--"+boundary+"\r\n".
Unsuccessful approach: The partial repair uses return "".join(chunks)+("--"+boundary+"--\r\n" if chunks else ""), which still violates the stated contract.
Case contract
Return serialized preframed chunks followed by --boundary-- CRLF, including an empty multipart body.
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(boundary, chunks):
return "".join(chunks)+"--"+boundary+"\r\n"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('multipart-closing-delimiter fixture 0', solve("b"+str(N),[]), "--b"+str(N)+"--\r\n")
check('multipart-closing-delimiter fixture 1', solve("b",["a","c"]), "ac--b--\r\n")
check('multipart-closing-delimiter fixture 2', solve("b",[""]), "--b--\r\n")
check('multipart-closing-delimiter fixture 3', solve("x",["abc"]), "abc--x--\r\n")
check('multipart-closing-delimiter fixture 4', solve("z",["\r\n"]), "\r\n--z--\r\n")
check('multipart-closing-delimiter fixture 5', solve("b",["a"*N]), "a"*N+"--b--\r\n")
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 |
|---|---|---|---|
| multipart-closing-delimiter fixture 0 | --b1
| --b1--
| Failed |
| multipart-closing-delimiter fixture 1 | ac--b
| ac--b--
| Failed |
| multipart-closing-delimiter fixture 2 | --b
| --b--
| Failed |
| multipart-closing-delimiter fixture 3 | abc--x
| abc--x--
| Failed |
| multipart-closing-delimiter fixture 4 |
--z
|
--z--
| Failed |
| multipart-closing-delimiter fixture 5 | a--b
| a--b--
| Failed |
SHA-256 / d50e48d8a7597c7308e74e8c1ece8da396f8692ccb38579333146726becede00
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(boundary, chunks):
return "".join(chunks)+("--"+boundary+"--\r\n" if chunks else "")
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('multipart-closing-delimiter fixture 0', solve("b"+str(N),[]), "--b"+str(N)+"--\r\n")
check('multipart-closing-delimiter fixture 1', solve("b",["a","c"]), "ac--b--\r\n")
check('multipart-closing-delimiter fixture 2', solve("b",[""]), "--b--\r\n")
check('multipart-closing-delimiter fixture 3', solve("x",["abc"]), "abc--x--\r\n")
check('multipart-closing-delimiter fixture 4', solve("z",["\r\n"]), "\r\n--z--\r\n")
check('multipart-closing-delimiter fixture 5', solve("b",["a"*N]), "a"*N+"--b--\r\n")
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 |
|---|---|---|---|
| multipart-closing-delimiter fixture 0 | | --b1--
| Failed |
| multipart-closing-delimiter fixture 1 | ac--b--
| ac--b--
| Passed |
| multipart-closing-delimiter fixture 2 | --b--
| --b--
| Passed |
| multipart-closing-delimiter fixture 3 | abc--x--
| abc--x--
| Passed |
| multipart-closing-delimiter fixture 4 |
--z--
|
--z--
| Passed |
| multipart-closing-delimiter fixture 5 | a--b--
| a--b--
| Passed |
SHA-256 / 047c03488c25938ceeb54fd1cfb21244b086db888559e98c029b8f3c04433c48
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:16.113874+00:00.
Case digest / 0ce1723643bc79a5f333b4efa64b9a41c67f25cdc26895928960679716f51b57