FA-79756 / Barcode symbology encoding / Open access
Bar width reduction is applied on both edges · case 01
Bars lose twice the intended ink-spread compensation and read as too narrow.
ROOT CAUSE
The reduction is subtracted from both sides of every bar.
THE FAILURE
The reduction is subtracted from both sides of every bar.
Unsuccessful approach: Removing 2*bwr from one edge over-reduces just the same.
Case contract
Render a module string ("1" bar, "0" space) at xn/xd device pixels per module after `quiet` leading quiet-zone modules. Module boundary k lies at round-half-up((quiet + k) * X), computed from the exact fraction so errors do not accumulate. Adjacent bar modules merge into one bar [start, end); bar width reduction shaves `bwr` pixels from the right edge of each bar, but a bar is never narrower than 1 pixel.
Why this case matters
Retail, logistics, pharmacy and document workflows depend on encoders that produce exactly the module pattern, code-set switches, separators and quiet zones scanners expect; one misplaced module or separator makes a label unreadable or, worse, scan as different data.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(mods, xn, xd, bwr, quiet):
X = Fraction(xn, xd)
def edge(i):
return math.floor((quiet + i) * X + Fraction(1, 2))
bars = []
i = 0
n = len(mods)
while i < n:
if mods[i] == '1':
j = i
while j < n and mods[j] == '1':
j += 1
s, e = edge(i) + bwr, edge(j) - bwr
if e - s < 1:
e = s + 1
bars.append([s, e])
i = j
else:
i += 1
return bars
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[('011', 5, 2, 1, 10), [[28, 32]]], [('000011011110', 4, 3, 1, 1), [[7, 8], [11, 15]]], [('0001111', 2, 1, 0, 1), [[8, 16]]], [('00001010', 1, 1, 0, 1), [[5, 6], [7, 8]]], [('101100101', 11, 5, 0, 0), [[0, 2], [4, 9], [13, 15], [18, 20]]], [('00101', 3, 1, 0, 0), [[6, 9], [12, 15]]], [('100011111000', 7, 3, 0, 1), [[2, 5], [12, 23]]], [('010111110', 11, 5, 2, 0), [[2, 3], [7, 16]]]], [[('000010010001', 9, 4, 1, 0), [[9, 10], [16, 17], [25, 26]]], [('0011000', 3, 1, 2, 3), [[15, 19]]], [('10000111', 9, 4, 2, 3), [[7, 8], [18, 23]]], [('0010101000110', 7, 3, 0, 0), [[5, 7], [9, 12], [14, 16], [23, 28]]], [('1100001111', 9, 4, 0, 0), [[0, 5], [14, 23]]], [('110', 11, 5, 0, 3), [[7, 11]]], [('110101', 2, 1, 0, 0), [[0, 4], [6, 8], [10, 12]]], [('1000110000', 2, 1, 1, 0), [[0, 1], [8, 11]]]], [[('00010110011', 7, 3, 2, 3), [[14, 15], [19, 21], [28, 31]]], [('101011110001', 11, 5, 2, 3), [[7, 8], [11, 12], [15, 22], [31, 32]]], [('11', 5, 2, 1, 3), [[8, 12]]], [('1101101001', 3, 1, 0, 3), [[9, 15], [18, 24], [27, 30], [36, 39]]], [('100110010100', 1, 1, 0, 1), [[1, 2], [4, 6], [8, 9], [10, 11]]], [('0110001110', 2, 1, 0, 10), [[22, 26], [32, 38]]], [('01011', 3, 1, 0, 0), [[3, 6], [9, 15]]], [('11000100111001', 5, 2, 1, 10), [[25, 29], [38, 39], [45, 52], [58, 59]]]], [[('1', 5, 2, 1, 0), [[0, 2]]], [('0100001000101', 3, 1, 1, 3), [[12, 14], [27, 29], [39, 41], [45, 47]]], [('10110', 5, 2, 0, 0), [[0, 3], [5, 10]]], [('01110000', 2, 1, 0, 3), [[8, 14]]], [('10111010100111', 5, 2, 0, 1), [[3, 5], [8, 15], [18, 20], [23, 25], [30, 38]]], [('11010', 7, 3, 0, 10), [[23, 28], [30, 33]]], [('1000010110000', 7, 3, 0, 1), [[2, 5], [14, 16], [19, 23]]], [('00101011101', 7, 3, 1, 10), [[28, 29], [33, 34], [37, 43], [47, 48]]]], [[('011111', 2, 1, 2, 3), [[8, 16]]], [('1000110111010', 2, 1, 1, 1), [[2, 3], [10, 13], [16, 21], [24, 25]]], [('0111110010101', 7, 3, 0, 10), [[26, 37], [42, 44], [47, 49], [51, 54]]], [('1', 5, 2, 0, 3), [[8, 10]]], [('1011111001100', 2, 1, 0, 3), [[6, 8], [10, 20], [24, 28]]], [('010101111001', 2, 1, 0, 0), [[2, 4], [6, 8], [10, 18], [22, 24]]], [('01110011', 5, 2, 0, 10), [[28, 35], [40, 45]]], [('011110111', 9, 4, 1, 10), [[25, 33], [36, 42]]]]]
labels = ["regression: bar width reduction side", "repair trap", "combined fault", "control", "control", "boundary", "boundary", "control"]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("%s %d" % (labels[i % len(labels)], i), solve(*args), expected)
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 |
|---|---|---|---|
| regression: bar width reduction side 0 | [[29, 32]] | [[28, 32]] | Failed |
| repair trap 1 | [[8, 9], [12, 15]] | [[7, 8], [11, 15]] | Failed |
| combined fault 2 | [[8, 16]] | [[8, 16]] | Passed |
| control 3 | [[5, 6], [7, 8]] | [[5, 6], [7, 8]] | Passed |
| control 4 | [[0, 2], [4, 9], [13, 15], [18, 20]] | [[0, 2], [4, 9], [13, 15], [18, 20]] | Passed |
| boundary 5 | [[6, 9], [12, 15]] | [[6, 9], [12, 15]] | Passed |
| boundary 6 | [[2, 5], [12, 23]] | [[2, 5], [12, 23]] | Passed |
| control 7 | [[4, 5], [9, 16]] | [[2, 3], [7, 16]] | Failed |
SHA-256 / f56e035e7efd71b99e430a66d0df4cbe46eeb36c0bbc1046ee427c9739fa49ed
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(mods, xn, xd, bwr, quiet):
X = Fraction(xn, xd)
def edge(i):
return math.floor((quiet + i) * X + Fraction(1, 2))
bars = []
i = 0
n = len(mods)
while i < n:
if mods[i] == '1':
j = i
while j < n and mods[j] == '1':
j += 1
s, e = edge(i), edge(j) - 2 * bwr
if e - s < 1:
e = s + 1
bars.append([s, e])
i = j
else:
i += 1
return bars
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[('011', 5, 2, 1, 10), [[28, 32]]], [('000011011110', 4, 3, 1, 1), [[7, 8], [11, 15]]], [('0001111', 2, 1, 0, 1), [[8, 16]]], [('00001010', 1, 1, 0, 1), [[5, 6], [7, 8]]], [('101100101', 11, 5, 0, 0), [[0, 2], [4, 9], [13, 15], [18, 20]]], [('00101', 3, 1, 0, 0), [[6, 9], [12, 15]]], [('100011111000', 7, 3, 0, 1), [[2, 5], [12, 23]]], [('010111110', 11, 5, 2, 0), [[2, 3], [7, 16]]]], [[('000010010001', 9, 4, 1, 0), [[9, 10], [16, 17], [25, 26]]], [('0011000', 3, 1, 2, 3), [[15, 19]]], [('10000111', 9, 4, 2, 3), [[7, 8], [18, 23]]], [('0010101000110', 7, 3, 0, 0), [[5, 7], [9, 12], [14, 16], [23, 28]]], [('1100001111', 9, 4, 0, 0), [[0, 5], [14, 23]]], [('110', 11, 5, 0, 3), [[7, 11]]], [('110101', 2, 1, 0, 0), [[0, 4], [6, 8], [10, 12]]], [('1000110000', 2, 1, 1, 0), [[0, 1], [8, 11]]]], [[('00010110011', 7, 3, 2, 3), [[14, 15], [19, 21], [28, 31]]], [('101011110001', 11, 5, 2, 3), [[7, 8], [11, 12], [15, 22], [31, 32]]], [('11', 5, 2, 1, 3), [[8, 12]]], [('1101101001', 3, 1, 0, 3), [[9, 15], [18, 24], [27, 30], [36, 39]]], [('100110010100', 1, 1, 0, 1), [[1, 2], [4, 6], [8, 9], [10, 11]]], [('0110001110', 2, 1, 0, 10), [[22, 26], [32, 38]]], [('01011', 3, 1, 0, 0), [[3, 6], [9, 15]]], [('11000100111001', 5, 2, 1, 10), [[25, 29], [38, 39], [45, 52], [58, 59]]]], [[('1', 5, 2, 1, 0), [[0, 2]]], [('0100001000101', 3, 1, 1, 3), [[12, 14], [27, 29], [39, 41], [45, 47]]], [('10110', 5, 2, 0, 0), [[0, 3], [5, 10]]], [('01110000', 2, 1, 0, 3), [[8, 14]]], [('10111010100111', 5, 2, 0, 1), [[3, 5], [8, 15], [18, 20], [23, 25], [30, 38]]], [('11010', 7, 3, 0, 10), [[23, 28], [30, 33]]], [('1000010110000', 7, 3, 0, 1), [[2, 5], [14, 16], [19, 23]]], [('00101011101', 7, 3, 1, 10), [[28, 29], [33, 34], [37, 43], [47, 48]]]], [[('011111', 2, 1, 2, 3), [[8, 16]]], [('1000110111010', 2, 1, 1, 1), [[2, 3], [10, 13], [16, 21], [24, 25]]], [('0111110010101', 7, 3, 0, 10), [[26, 37], [42, 44], [47, 49], [51, 54]]], [('1', 5, 2, 0, 3), [[8, 10]]], [('1011111001100', 2, 1, 0, 3), [[6, 8], [10, 20], [24, 28]]], [('010101111001', 2, 1, 0, 0), [[2, 4], [6, 8], [10, 18], [22, 24]]], [('01110011', 5, 2, 0, 10), [[28, 35], [40, 45]]], [('011110111', 9, 4, 1, 10), [[25, 33], [36, 42]]]]]
labels = ["regression: bar width reduction side", "repair trap", "combined fault", "control", "control", "boundary", "boundary", "control"]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("%s %d" % (labels[i % len(labels)], i), solve(*args), expected)
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 |
|---|---|---|---|
| regression: bar width reduction side 0 | [[28, 31]] | [[28, 32]] | Failed |
| repair trap 1 | [[7, 8], [11, 14]] | [[7, 8], [11, 15]] | Failed |
| combined fault 2 | [[8, 16]] | [[8, 16]] | Passed |
| control 3 | [[5, 6], [7, 8]] | [[5, 6], [7, 8]] | Passed |
| control 4 | [[0, 2], [4, 9], [13, 15], [18, 20]] | [[0, 2], [4, 9], [13, 15], [18, 20]] | Passed |
| boundary 5 | [[6, 9], [12, 15]] | [[6, 9], [12, 15]] | Passed |
| boundary 6 | [[2, 5], [12, 23]] | [[2, 5], [12, 23]] | Passed |
| control 7 | [[2, 3], [7, 14]] | [[2, 3], [7, 16]] | Failed |
SHA-256 / 41328ec83535f75c449a0730897dcb00a2e42a579ff5532ef1742b71ce0495cb
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
A deterministic bounded teaching model with a stipulated contract; it makes no claim of conformance to any published specification. 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:49:47.533064+00:00.
Case digest / b2493c5ef49aadc5185d108a62ddfbbee11d2858aa2e1c7e50842745111708d2