FAILURE MAP
← Case archive

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

Websocket application data is disallowed after close starts · case 01

Websocket application data is disallowed after close starts.

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

ROOT CAUSE

The faulty implementation uses `not received_close` for the websocket-application-data-is-disallowed-after-close-starts decision.

VERIFIED REPAIR

Apply the explicit websocket-application-data-is-disallowed-after-close-starts contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `not (sent_close and received_close)` and still violates a separate fixture.

Case contract

Bounded offline decision model: websocket application data is disallowed after close starts. 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 websocket-application-data-is-disallowed-after-close-starts 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(sent_close, received_close):
    return not received_close
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False), False)", "check('fixture 2', solve(False, True), False)", "check('fixture 3', solve(False, False), True)", "check('fixture 4', solve(True, True), 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 2FalseFalsePassed
fixture 3TrueTruePassed
fixture 4FalseFalsePassed
fixture 1TrueFalseFailed

SHA-256 / d1c49190c360f7de0644c1ac2201dfa1add0590e286636f002670eded587bfda

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(sent_close, received_close):
    return not (sent_close and received_close)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False), False)", "check('fixture 2', solve(False, True), False)", "check('fixture 3', solve(False, False), True)", "check('fixture 4', solve(True, True), 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 2TrueFalseFailed
fixture 3TrueTruePassed
fixture 4FalseFalsePassed
fixture 1TrueFalseFailed

SHA-256 / efb5c10ab06b49e34af87341964fa8b402606eb01b89b24e05e9941d3a493948

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(sent_close, received_close):
    return not sent_close and not received_close
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False), False)", "check('fixture 2', solve(False, True), False)", "check('fixture 3', solve(False, False), True)", "check('fixture 4', solve(True, True), 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 2FalseFalsePassed
fixture 3TrueTruePassed
fixture 4FalseFalsePassed
fixture 1FalseFalsePassed

SHA-256 / 29959643378862cfb9ea12653f6f351c4f4970d9550e8e8df4555579df48d3af

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

Case digest / d6b7cf555c8f4a45656329d913045adfdbcc98556c71924e4019d4feebf53f69