FA-7801 / Connection lifecycle / Open access
Stream eof is terminal only after buffered input is delivered · case 01
Stream eof is terminal only after buffered input is delivered.
ROOT CAUSE
The faulty implementation uses `'closed' if eof else ('deliver' if buffered else 'wait')` for the stream-eof-is-terminal-only-after-buffered-input-is-delivered decision.
THE FAILURE
The faulty implementation uses `'closed' if eof else ('deliver' if buffered else 'wait')` for the stream-eof-is-terminal-only-after-buffered-input-is-delivered decision.
Unsuccessful approach: The attempted repair uses `'deliver' if buffered else 'wait'` and still violates a separate fixture.
Case contract
Bounded offline decision model: stream eof is terminal only after buffered input is delivered. 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 stream-eof-is-terminal-only-after-buffered-input-is-delivered 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(buffered, eof):
return 'closed' if eof else ('deliver' if buffered else 'wait')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(3, True), 'deliver')", "check('fixture 2', solve(0, True), 'closed')", "check('fixture 3', solve(0, False), 'wait')", "check('fixture 4', solve(1, False), 'deliver')"]
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 | closed | closed | Passed |
| fixture 3 | wait | wait | Passed |
| fixture 4 | deliver | deliver | Passed |
| fixture 1 | closed | deliver | Failed |
SHA-256 / f3e9baf119e58d598c1a0470da732180beec25f1bcaf3b295d1dfdb0912e1679
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(buffered, eof):
return 'deliver' if buffered else 'wait'
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(3, True), 'deliver')", "check('fixture 2', solve(0, True), 'closed')", "check('fixture 3', solve(0, False), 'wait')", "check('fixture 4', solve(1, False), 'deliver')"]
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 | wait | closed | Failed |
| fixture 3 | wait | wait | Passed |
| fixture 4 | deliver | deliver | Passed |
| fixture 1 | deliver | deliver | Passed |
SHA-256 / 210682c0b34403e60f1d9d447612e0534db1f9f8636a03a36aab2db5bee75380
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 4 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
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.481011+00:00.
Case digest / 749bf2cb17d71647fd264bee2d46ba64cae58c45888e6dc0935c077ac9b6d1df