FA-7661 / WebSocket and browser transport policies / Open access
Sse comments do not change data buffer · case 01
Sse comments do not change data buffer.
ROOT CAUSE
The faulty implementation uses `buffer+[line]` for the sse-comments-do-not-change-data-buffer decision.
VERIFIED REPAIR
Apply the explicit sse-comments-do-not-change-data-buffer contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `buffer` and still violates a separate fixture.
Case contract
Bounded offline decision model: sse comments do not change data buffer. 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-comments-do-not-change-data-buffer 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(buffer, line):
return buffer+[line]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a'], ':keepalive'), ['a'])", "check('fixture 2', solve(['a'], 'b'), ['a', 'b'])", "check('fixture 3', solve([], ':'), [])", "check('fixture 4', solve([], 'a'), ['a'])"]
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 | ['a', 'b'] | ['a', 'b'] | Passed |
| fixture 3 | [':'] | [] | Failed |
| fixture 4 | ['a'] | ['a'] | Passed |
| fixture 1 | ['a', ':keepalive'] | ['a'] | Failed |
SHA-256 / 4e5b42cb57cbced7ca38e001a35975eafaf5fe068231bc145f4954a47c9ec95b
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(buffer, line):
return buffer
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a'], ':keepalive'), ['a'])", "check('fixture 2', solve(['a'], 'b'), ['a', 'b'])", "check('fixture 3', solve([], ':'), [])", "check('fixture 4', solve([], 'a'), ['a'])"]
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 | ['a'] | ['a', 'b'] | Failed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [] | ['a'] | Failed |
| fixture 1 | ['a'] | ['a'] | Passed |
SHA-256 / b3dcfb578c15a8dda030d8204b651b0642c4568c73948e31626e7d38324c9d52
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(buffer, line):
return buffer if line.startswith(":") else buffer+[line]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a'], ':keepalive'), ['a'])", "check('fixture 2', solve(['a'], 'b'), ['a', 'b'])", "check('fixture 3', solve([], ':'), [])", "check('fixture 4', solve([], 'a'), ['a'])"]
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 | ['a', 'b'] | ['a', 'b'] | Passed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | ['a'] | ['a'] | Passed |
| fixture 1 | ['a'] | ['a'] | Passed |
SHA-256 / 3061f40f9a002e3589901822ca367ffc177c126f24422381df2baf68fd4bbed1
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.158059+00:00.
Case digest / 68dea87066fcd7e0f7dfaf7310e4f3ca935460703d586cf1d98b855801acbbf5