FA-7616 / WebSocket and browser transport policies / Open access
Websocket close payload cannot contain a single byte · case 01
Websocket close payload cannot contain a single byte.
ROOT CAUSE
The faulty implementation uses `True` for the websocket-close-payload-cannot-contain-a-single-byte decision.
VERIFIED REPAIR
Apply the explicit websocket-close-payload-cannot-contain-a-single-byte contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `length >= 2` and still violates a separate fixture.
Case contract
Bounded offline decision model: websocket close payload cannot contain a single byte. 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-close-payload-cannot-contain-a-single-byte 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):
return True
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1), False)", "check('fixture 2', solve(0), True)", "check('fixture 3', solve(2), True)", "check('fixture 4', solve(125), True)"]
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 | True | True | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | True | True | Passed |
| fixture 1 | True | False | Failed |
SHA-256 / b79378f58c79295b0e7fe49c810831cfa4ab5c5884806bfffff0b601fa676439
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):
return length >= 2
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1), False)", "check('fixture 2', solve(0), True)", "check('fixture 3', solve(2), True)", "check('fixture 4', solve(125), True)"]
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 | False | True | Failed |
| fixture 3 | True | True | Passed |
| fixture 4 | True | True | Passed |
| fixture 1 | False | False | Passed |
SHA-256 / ededde161571855ac87f6d3298e4f222dceb855634e209095e68bbcb17feee78
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):
return length != 1
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1), False)", "check('fixture 2', solve(0), True)", "check('fixture 3', solve(2), True)", "check('fixture 4', solve(125), True)"]
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 | True | True | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | True | True | Passed |
| fixture 1 | False | False | Passed |
SHA-256 / 55eb76fec03a06b8d31d1fc7983524b017006a61242554a73f39610ade410e56
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.670802+00:00.
Case digest / c10f42b7e26ace111b1e498c8825f3f79fc626121fae59607b756fc8a3a14ef9