FA-3666 / Binary formats / Open access
A terminated field consumes padding after the first zero · case 01
A terminated field consumes padding after the first zero.
ROOT CAUSE
The implementation applies an operation whose text or grammar semantics violate this contract: Return bytes before the first zero; reject input without a zero.
VERIFIED REPAIR
Implement the complete stated contract, including the boundary fixtures: Return bytes before the first zero; reject input without a zero.
Unsuccessful approach: The attempted repair handles the primary example but still violates a separate boundary of the same contract.
Case contract
Return bytes before the first zero; reject input without a zero.
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 x
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([65, 0, 66]), [65])
check('boundary 2', solve([0, 65]), [])
check('boundary 3', solve([65]), None)
check('boundary 4', solve([65, 66, 0]), [65, 66])
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 |
|---|---|---|---|
| boundary 1 | [65, 0, 66] | [65] | Failed |
| boundary 2 | [0, 65] | [] | Failed |
| boundary 3 | [65] | None | Failed |
| boundary 4 | [65, 66, 0] | [65, 66] | Failed |
SHA-256 / 63f1210c7a66e3141d1dfd72e3dc7e0809562a73c8c2b0ccb680256b62927cdc
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 [v for v in x if v]
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([65, 0, 66]), [65])
check('boundary 2', solve([0, 65]), [])
check('boundary 3', solve([65]), None)
check('boundary 4', solve([65, 66, 0]), [65, 66])
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 |
|---|---|---|---|
| boundary 1 | [65, 66] | [65] | Failed |
| boundary 2 | [65] | [] | Failed |
| boundary 3 | [65] | None | Failed |
| boundary 4 | [65, 66] | [65, 66] | Passed |
SHA-256 / d58902202a8e3d9292d76e028a206b4c032d928b40c792b235ff592cefb75b47
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:
return x[:x.index(0)] if 0 in x else None
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([65, 0, 66]), [65])
check('boundary 2', solve([0, 65]), [])
check('boundary 3', solve([65]), None)
check('boundary 4', solve([65, 66, 0]), [65, 66])
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 |
|---|---|---|---|
| boundary 1 | [65] | [65] | Passed |
| boundary 2 | [] | [] | Passed |
| boundary 3 | None | None | Passed |
| boundary 4 | [65, 66] | [65, 66] | Passed |
SHA-256 / 0741b3ca3bcdccc15baccfbe110d98594ab1fc9fc91561f8c777f83241e0a897
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:29.173934+00:00.
Case digest / 044fa9e8333dc8da126b8a81d74db072e126dfd59c8122ccc9ed3781ac10cadb