FA-7596 / WebSocket and browser transport policies / Open access
Websocket control frames must be final and at most 125 bytes · case 01
Websocket control frames must be final and at most 125 bytes.
ROOT CAUSE
The faulty implementation uses `not control or final` for the websocket-control-frames-must-be-final-and-at-most-125-bytes decision.
VERIFIED REPAIR
Apply the explicit websocket-control-frames-must-be-final-and-at-most-125-bytes contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `not control or length <= 125` and still violates a separate fixture.
Case contract
Bounded offline decision model: websocket control frames must be final and at most 125 bytes. 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-control-frames-must-be-final-and-at-most-125-bytes 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(control, final, length):
return not control or final
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False, 1), False)", "check('fixture 2', solve(True, True, 126), False)", "check('fixture 3', solve(True, True, 125), True)", "check('fixture 4', solve(False, False, 1000), 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 | False | Failed |
| fixture 3 | True | True | Passed |
| fixture 4 | True | True | Passed |
| fixture 1 | False | False | Passed |
SHA-256 / dee9c5ec261c4ed8244ee9e977bc7d2099a1f106fee7fbce63d5ea04c0f4b45c
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(control, final, length):
return not control or length <= 125
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False, 1), False)", "check('fixture 2', solve(True, True, 126), False)", "check('fixture 3', solve(True, True, 125), True)", "check('fixture 4', solve(False, False, 1000), 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 | False | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | True | True | Passed |
| fixture 1 | True | False | Failed |
SHA-256 / be467755293e17f930f834cf8620d54915bb60c6681095ecd250c26887f69428
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(control, final, length):
return not control or (final and length <= 125)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False, 1), False)", "check('fixture 2', solve(True, True, 126), False)", "check('fixture 3', solve(True, True, 125), True)", "check('fixture 4', solve(False, False, 1000), 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 | False | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | True | True | Passed |
| fixture 1 | False | False | Passed |
SHA-256 / feff96e3ceca3865147e312b0e857ed008b5cd35c97027b47cacd1c25ca551d7
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.545984+00:00.
Case digest / 70e2652e57bd1072022f62c5a1b4bbbd20d4db4494fc368bcb5f54dacacd90e2