FA-7806 / Connection lifecycle / Open access
Response boundary for fixed length body detects short eof · case 01
Response boundary for fixed length body detects short eof.
ROOT CAUSE
The faulty implementation uses `'complete' if eof or received >= expected else 'wait'` for the response-boundary-for-fixed-length-body-detects-short-eof decision.
VERIFIED REPAIR
Apply the explicit response-boundary-for-fixed-length-body-detects-short-eof contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `'complete' if received >= expected else 'wait'` and still violates a separate fixture.
Case contract
Bounded offline decision model: response boundary for fixed length body detects short eof. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.
Why this case matters
This deterministic connection lifecycle model isolates the response-boundary-for-fixed-length-body-detects-short-eof policy at a network component boundary.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(expected, received, eof):
return 'complete' if eof or received >= expected else 'wait'
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 5, True), 'truncated')", "check('fixture 2', solve(10, 10, False), 'complete')", "check('fixture 3', solve(10, 5, False), 'wait')", "check('fixture 4', solve(0, 0, True), 'complete')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
exec(_line)
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 |
|---|---|---|---|
| fixture 2 | complete | complete | Passed |
| fixture 3 | wait | wait | Passed |
| fixture 4 | complete | complete | Passed |
| fixture 1 | complete | truncated | Failed |
SHA-256 / 6bca84df4493710f5c98de2df2707291af128ff4622567dc2136b3fd05d0e5ec
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(expected, received, eof):
return 'complete' if received >= expected else 'wait'
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 5, True), 'truncated')", "check('fixture 2', solve(10, 10, False), 'complete')", "check('fixture 3', solve(10, 5, False), 'wait')", "check('fixture 4', solve(0, 0, True), 'complete')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
exec(_line)
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 |
|---|---|---|---|
| fixture 2 | complete | complete | Passed |
| fixture 3 | wait | wait | Passed |
| fixture 4 | complete | complete | Passed |
| fixture 1 | wait | truncated | Failed |
SHA-256 / e981b10323d22143fa84ad7d487118a9d783f0ebdc1e31c74d4345bdc148134a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(expected, received, eof):
return 'truncated' if eof and received < expected else ('complete' if received >= expected else 'wait')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 5, True), 'truncated')", "check('fixture 2', solve(10, 10, False), 'complete')", "check('fixture 3', solve(10, 5, False), 'wait')", "check('fixture 4', solve(0, 0, True), 'complete')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
exec(_line)
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 |
|---|---|---|---|
| fixture 2 | complete | complete | Passed |
| fixture 3 | wait | wait | Passed |
| fixture 4 | complete | complete | Passed |
| fixture 1 | truncated | truncated | Passed |
SHA-256 / e76df776f9008229f7c1f1cfbd30f61688026735f6641ed48d99835ace3970b9
Verification & scope
Bounded deterministic policy model over validated inputs; not a complete protocol stack or an interoperability claim. The five variants rotate the same explicit fixture set. 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:38:15.487319+00:00.
Case digest / c0a139bb2c5bff38900e93372ecfcd736d6c9bbb6da00a62b717378e55494b43