FAILURE MAP
← Case archive

FA-7306 / Transport flow control / Open access

Udp zero length datagram is data not stream eof · case 01

Udp zero length datagram is data not stream eof.

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

ROOT CAUSE

The faulty implementation uses `'data' if length else 'eof'` for the udp-zero-length-datagram-is-data-not-stream-eof decision.

VERIFIED REPAIR

Apply the explicit udp-zero-length-datagram-is-data-not-stream-eof contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `'data'` and still violates a separate fixture.

Case contract

Bounded offline decision model: udp zero length datagram is data not stream 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 transport flow control model isolates the udp-zero-length-datagram-is-data-not-stream-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(length, datagram):
    return 'data' if length else 'eof'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, True), 'data')", "check('fixture 2', solve(0, False), 'eof')", "check('fixture 3', solve(3, True), 'data')", "check('fixture 4', solve(3, False), 'data')"]
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 fixtureActualExpectedOutcome
fixture 2eofeofPassed
fixture 3datadataPassed
fixture 4datadataPassed
fixture 1eofdataFailed

SHA-256 / 87bab9d3a84bce6fe75305c2c684ace0fd3e93cbb9e2dd67edb1fc75f658c9d4

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(length, datagram):
    return 'data'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, True), 'data')", "check('fixture 2', solve(0, False), 'eof')", "check('fixture 3', solve(3, True), 'data')", "check('fixture 4', solve(3, False), 'data')"]
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 fixtureActualExpectedOutcome
fixture 2dataeofFailed
fixture 3datadataPassed
fixture 4datadataPassed
fixture 1datadataPassed

SHA-256 / 6981154bc4d9defd6ce51bd5a063e5e3150a14a6779f4d32583b808d9f4afaf0

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(length, datagram):
    return 'data' if length > 0 or datagram else 'eof'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, True), 'data')", "check('fixture 2', solve(0, False), 'eof')", "check('fixture 3', solve(3, True), 'data')", "check('fixture 4', solve(3, False), 'data')"]
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 fixtureActualExpectedOutcome
fixture 2eofeofPassed
fixture 3datadataPassed
fixture 4datadataPassed
fixture 1datadataPassed

SHA-256 / 1b235942fa249f3a923ea8aadca2760aa8219632a3eb318e477de96dee1873f5

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

Case digest / fac0a352842013dd85d20cff84f1bd08fb626394635d149fd8f1a5fbf1bddd72