FAILURE MAP
← Case archive

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

Websocket pong echoes the entire ping payload · case 01

Websocket pong echoes the entire ping payload.

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

ROOT CAUSE

The faulty implementation uses `None if closing else {"opcode":10,"final":True,"payload":""}` for the websocket-pong-echoes-the-entire-ping-payload decision.

THE FAILURE

The faulty implementation uses `None if closing else {"opcode":10,"final":True,"payload":""}` for the websocket-pong-echoes-the-entire-ping-payload decision.

Unsuccessful approach: The attempted repair uses `{"opcode":10,"final":True,"payload":ping}` and still violates a separate fixture.

Case contract

Given ping, closing, websocket pong echoes the entire ping payload. Return the protocol decision or transformed value; fields are validated and fixtures state boundary outcomes.

Why this case matters

This deterministic websocket and browser transport policies model isolates the websocket-pong-echoes-the-entire-ping-payload 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(ping, closing):
    return None if closing else {"opcode":10,"final":True,"payload":""}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('abc', False), {'opcode': 10, 'final': True, 'payload': 'abc'})", "check('fixture 2', solve('abc', True), None)", "check('fixture 3', solve('', False), {'opcode': 10, 'final': True, 'payload': ''})", "check('fixture 4', solve('', True), None)"]
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 2NoneNonePassed
fixture 3{'final': True, 'opcode': 10, 'payload': ''}{'final': True, 'opcode': 10, 'payload': ''}Passed
fixture 4NoneNonePassed
fixture 1{'final': True, 'opcode': 10, 'payload': ''}{'final': True, 'opcode': 10, 'payload': 'abc'}Failed

SHA-256 / b6a91f40283e4c3b46dbc90080b7a1e883d9664b6970e62d38bac1137808d528

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(ping, closing):
    return {"opcode":10,"final":True,"payload":ping}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('abc', False), {'opcode': 10, 'final': True, 'payload': 'abc'})", "check('fixture 2', solve('abc', True), None)", "check('fixture 3', solve('', False), {'opcode': 10, 'final': True, 'payload': ''})", "check('fixture 4', solve('', True), None)"]
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 2{'final': True, 'opcode': 10, 'payload': 'abc'}NoneFailed
fixture 3{'final': True, 'opcode': 10, 'payload': ''}{'final': True, 'opcode': 10, 'payload': ''}Passed
fixture 4{'final': True, 'opcode': 10, 'payload': ''}NoneFailed
fixture 1{'final': True, 'opcode': 10, 'payload': 'abc'}{'final': True, 'opcode': 10, 'payload': 'abc'}Passed

SHA-256 / a71ac9d81b181ce10b2d2c4c722c8f31770fb879ead4037181a251579a8f0e47

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

Case digest / c2250cad12b468c5346d94dcc6f48effe90424a660c29a101a66fdecbfb43432