FAILURE MAP
← Case archive

FA-3716 / Binary formats / Open access

Escaped frame markers are decoded as delimiters · case 01

Escaped frame markers are decoded as delimiters.

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

ROOT CAUSE

The implementation applies an operation whose text or grammar semantics violate this contract: Decode 0x7D escapes by XOR 0x20; other bytes are literal, dangling escape rejects.

VERIFIED REPAIR

Implement the complete stated contract, including the boundary fixtures: Decode 0x7D escapes by XOR 0x20; other bytes are literal, dangling escape rejects.

Unsuccessful approach: The attempted repair handles the primary example but still violates a separate boundary of the same contract.

Case contract

Decode 0x7D escapes by XOR 0x20; other bytes are literal, dangling escape rejects.

Why this case matters

A local executable model for consumers of structured text; oracle values are authored literals, not outputs copied from the repaired implementation.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        return [v for v in x if v!=125]
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve([125, 125, 65]), [93, 65])
check('boundary 2', solve([125]), None)
check('boundary 3', solve([125, 94]), [126])
check('boundary 4', solve([]), [])
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
boundary 1[65][93, 65]Failed
boundary 2[]NoneFailed
boundary 3[94][126]Failed
boundary 4[][]Passed

SHA-256 / c4b893bbb2ee4758da6b69df9aa8708cc769515f1e8e6a5ad8e4ec1662be39df

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        return [x[i+1]^32 if v==125 and i+1<len(x) else v for i,v in enumerate(x) if i==0 or x[i-1]!=125]
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve([125, 125, 65]), [93, 65])
check('boundary 2', solve([125]), None)
check('boundary 3', solve([125, 94]), [126])
check('boundary 4', solve([]), [])
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
boundary 1[93][93, 65]Failed
boundary 2[125]NoneFailed
boundary 3[126][126]Passed
boundary 4[][]Passed

SHA-256 / 963c67c6aff7b75a4fbcbd62e4c15f20032de39c7415d19df6eb1564e80cd193

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        out=[]
        i=0
        while i<len(x):
            if x[i]==125:
                if i+1==len(x): return None
                out.append(x[i+1]^32)
                i+=2
            else:
                out.append(x[i])
                i+=1
        return out
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve([125, 125, 65]), [93, 65])
check('boundary 2', solve([125]), None)
check('boundary 3', solve([125, 94]), [126])
check('boundary 4', solve([]), [])
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
boundary 1[93, 65][93, 65]Passed
boundary 2NoneNonePassed
boundary 3[126][126]Passed
boundary 4[][]Passed

SHA-256 / f25ae45447a2c5512b7e170889753770037c32d21ee89237e64608f022aa82ba

Verification & scope

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

Case digest / 3656df4e7db8e8650fa379b320432ac666b20adb61e0f3da5952a149c614cd02