FAILURE MAP
← Case archive

FA-7656 / WebSocket and browser transport policies / Open access

Sse dispatch requires at least one data field · case 01

Sse dispatch requires at least one data field.

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

ROOT CAUSE

The faulty implementation uses `bool(event_type)` for the sse-dispatch-requires-at-least-one-data-field decision.

VERIFIED REPAIR

Apply the explicit sse-dispatch-requires-at-least-one-data-field contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `any(data_fields)` and still violates a separate fixture.

Case contract

Bounded offline decision model: sse dispatch requires at least one data field. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

Why this case matters

This deterministic websocket and browser transport policies model isolates the sse-dispatch-requires-at-least-one-data-field 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(data_fields, event_type):
    return bool(event_type)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([], 'message'), False)", "check('fixture 2', solve([''], ''), True)", "check('fixture 3', solve(['a'], 'x'), True)", "check('fixture 4', solve([], ''), False)"]
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 2FalseTrueFailed
fixture 3TrueTruePassed
fixture 4FalseFalsePassed
fixture 1TrueFalseFailed

SHA-256 / 747f037ac8c6bc85ba23b671f114603607402133db72b317bb9ba56d036d23c9

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(data_fields, event_type):
    return any(data_fields)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([], 'message'), False)", "check('fixture 2', solve([''], ''), True)", "check('fixture 3', solve(['a'], 'x'), True)", "check('fixture 4', solve([], ''), False)"]
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 2FalseTrueFailed
fixture 3TrueTruePassed
fixture 4FalseFalsePassed
fixture 1FalseFalsePassed

SHA-256 / 94fefc0c57c274b58fc1efee7eefae5c559b1c18d4b1d13d1475945df4353c93

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(data_fields, event_type):
    return bool(data_fields)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([], 'message'), False)", "check('fixture 2', solve([''], ''), True)", "check('fixture 3', solve(['a'], 'x'), True)", "check('fixture 4', solve([], ''), False)"]
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 2TrueTruePassed
fixture 3TrueTruePassed
fixture 4FalseFalsePassed
fixture 1FalseFalsePassed

SHA-256 / ec5f6ecd86e906a55e17158a1dbce2bae52587b29e90f6bbd775d8246728259d

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

Case digest / edcda3f7d3c356e94e9d856d792460b92a71e73537b5f26208e1be102e86c724