{"abstract":"Symbols printed at fractional pixel pitches grow or shrink across their width and fail verification.","category":"Barcode symbology encoding","checks":8,"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.","evaluation_group":"w2-barcode-symbology-encoding-device-pixel-rendering","failed_approach":"Truncating the exact position biases every edge to the left.","family":"w2-barcode-symbology-encoding-device-pixel-rendering-cumulative-rounding","id":"FA-79741","implementations":{"attempt":{"sha256":"e4dc36ff17f5030e4e0cc4c992b8f5d2d4199547f2106e73a980a25f8211332b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(mods, xn, xd, bwr, quiet):\n    X = Fraction(xn, xd)\n    def edge(i):\n        return math.floor((quiet + i) * X)\n    bars = []\n    i = 0\n    n = len(mods)\n    while i < n:\n        if mods[i] == '1':\n            j = i\n            while j < n and mods[j] == '1':\n                j += 1\n            s, e = edge(i), edge(j) - bwr\n            if e - s < 1:\n                e = s + 1\n            bars.append([s, e])\n            i = j\n        else:\n            i += 1\n    return bars\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[('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]]], [('00101', 3, 1, 0, 0), [[6, 9], [12, 15]]], [('11111', 2, 1, 2, 3), [[6, 14]]], [('1100111001', 1, 1, 1, 10), [[10, 11], [14, 16], [19, 20]]], [('010111110', 11, 5, 2, 0), [[2, 3], [7, 16]]]], [[('1111', 9, 4, 2, 3), [[7, 14]]], [('0001001', 5, 2, 0, 10), [[33, 35], [40, 43]]], [('0011000', 3, 1, 2, 3), [[15, 19]]], [('1000110000', 2, 1, 1, 0), [[0, 1], [8, 11]]], [('00101', 3, 1, 1, 3), [[15, 17], [21, 23]]], [('110101', 2, 1, 0, 0), [[0, 4], [6, 8], [10, 12]]], [('1', 4, 3, 1, 0), [[0, 1]]], [('1100001111', 9, 4, 0, 0), [[0, 5], [14, 23]]]], [[('00010110011', 7, 3, 2, 3), [[14, 15], [19, 21], [28, 31]]], [('101011110001', 11, 5, 2, 3), [[7, 8], [11, 12], [15, 22], [31, 32]]], [('101110', 4, 3, 0, 1), [[1, 3], [4, 8]]], [('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]]], [('011100100', 1, 1, 2, 10), [[11, 12], [16, 17]]], [('11000100111001', 5, 2, 1, 10), [[25, 29], [38, 39], [45, 52], [58, 59]]]], [[('10111010100111', 5, 2, 0, 1), [[3, 5], [8, 15], [18, 20], [23, 25], [30, 38]]], [('11010', 7, 3, 0, 10), [[23, 28], [30, 33]]], [('101110001000', 9, 4, 2, 0), [[0, 1], [5, 9], [18, 19]]], [('01110000', 2, 1, 0, 3), [[8, 14]]], [('11001111', 2, 1, 2, 0), [[0, 2], [8, 14]]], [('0', 7, 3, 0, 0), []], [('00100111', 1, 1, 0, 10), [[12, 13], [15, 18]]], [('10110', 5, 2, 0, 0), [[0, 3], [5, 10]]]], [[('0111110010101', 7, 3, 0, 10), [[26, 37], [42, 44], [47, 49], [51, 54]]], [('1', 5, 2, 0, 3), [[8, 10]]], [('0110', 7, 3, 2, 10), [[26, 28]]], [('010101111001', 2, 1, 0, 0), [[2, 4], [6, 8], [10, 18], [22, 24]]], [('011111', 2, 1, 2, 3), [[8, 16]]], [('1010110101', 2, 1, 0, 1), [[2, 4], [6, 8], [10, 14], [16, 18], [20, 22]]], [('10010101110', 2, 1, 1, 3), [[6, 7], [12, 13], [16, 17], [20, 25]]], [('011110111', 9, 4, 1, 10), [[25, 33], [36, 42]]]]]\nlabels = [\"regression: module boundary rounding\", \"repair trap\", \"combined fault\", \"control\", \"control\", \"boundary\", \"boundary\", \"control\"]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (labels[i % len(labels)], i), solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"ca038edc91277d1bf5d919a8065faf36633e276dff14583093162ccdbbe5b9f9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(mods, xn, xd, bwr, quiet):\n    X = Fraction(xn, xd)\n    def edge(i):\n        return (quiet + i) * math.floor(X + Fraction(1, 2))\n    bars = []\n    i = 0\n    n = len(mods)\n    while i < n:\n        if mods[i] == '1':\n            j = i\n            while j < n and mods[j] == '1':\n                j += 1\n            s, e = edge(i), edge(j) - bwr\n            if e - s < 1:\n                e = s + 1\n            bars.append([s, e])\n            i = j\n        else:\n            i += 1\n    return bars\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[('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]]], [('00101', 3, 1, 0, 0), [[6, 9], [12, 15]]], [('11111', 2, 1, 2, 3), [[6, 14]]], [('1100111001', 1, 1, 1, 10), [[10, 11], [14, 16], [19, 20]]], [('010111110', 11, 5, 2, 0), [[2, 3], [7, 16]]]], [[('1111', 9, 4, 2, 3), [[7, 14]]], [('0001001', 5, 2, 0, 10), [[33, 35], [40, 43]]], [('0011000', 3, 1, 2, 3), [[15, 19]]], [('1000110000', 2, 1, 1, 0), [[0, 1], [8, 11]]], [('00101', 3, 1, 1, 3), [[15, 17], [21, 23]]], [('110101', 2, 1, 0, 0), [[0, 4], [6, 8], [10, 12]]], [('1', 4, 3, 1, 0), [[0, 1]]], [('1100001111', 9, 4, 0, 0), [[0, 5], [14, 23]]]], [[('00010110011', 7, 3, 2, 3), [[14, 15], [19, 21], [28, 31]]], [('101011110001', 11, 5, 2, 3), [[7, 8], [11, 12], [15, 22], [31, 32]]], [('101110', 4, 3, 0, 1), [[1, 3], [4, 8]]], [('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]]], [('011100100', 1, 1, 2, 10), [[11, 12], [16, 17]]], [('11000100111001', 5, 2, 1, 10), [[25, 29], [38, 39], [45, 52], [58, 59]]]], [[('10111010100111', 5, 2, 0, 1), [[3, 5], [8, 15], [18, 20], [23, 25], [30, 38]]], [('11010', 7, 3, 0, 10), [[23, 28], [30, 33]]], [('101110001000', 9, 4, 2, 0), [[0, 1], [5, 9], [18, 19]]], [('01110000', 2, 1, 0, 3), [[8, 14]]], [('11001111', 2, 1, 2, 0), [[0, 2], [8, 14]]], [('0', 7, 3, 0, 0), []], [('00100111', 1, 1, 0, 10), [[12, 13], [15, 18]]], [('10110', 5, 2, 0, 0), [[0, 3], [5, 10]]]], [[('0111110010101', 7, 3, 0, 10), [[26, 37], [42, 44], [47, 49], [51, 54]]], [('1', 5, 2, 0, 3), [[8, 10]]], [('0110', 7, 3, 2, 10), [[26, 28]]], [('010101111001', 2, 1, 0, 0), [[2, 4], [6, 8], [10, 18], [22, 24]]], [('011111', 2, 1, 2, 3), [[8, 16]]], [('1010110101', 2, 1, 0, 1), [[2, 4], [6, 8], [10, 14], [16, 18], [20, 22]]], [('10010101110', 2, 1, 1, 3), [[6, 7], [12, 13], [16, 17], [20, 25]]], [('011110111', 9, 4, 1, 10), [[25, 33], [36, 42]]]]]\nlabels = [\"regression: module boundary rounding\", \"repair trap\", \"combined fault\", \"control\", \"control\", \"boundary\", \"boundary\", \"control\"]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (labels[i % len(labels)], i), solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"03ff1d2d91abe98d2fb56c0abbe24d4ebd53a1267acd5eeeeeb8e69060c46a4d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(mods, xn, xd, bwr, quiet):\n    X = Fraction(xn, xd)\n    def edge(i):\n        return math.floor((quiet + i) * X + Fraction(1, 2))\n    bars = []\n    i = 0\n    n = len(mods)\n    while i < n:\n        if mods[i] == '1':\n            j = i\n            while j < n and mods[j] == '1':\n                j += 1\n            s, e = edge(i), edge(j) - bwr\n            if e - s < 1:\n                e = s + 1\n            bars.append([s, e])\n            i = j\n        else:\n            i += 1\n    return bars\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[('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]]], [('00101', 3, 1, 0, 0), [[6, 9], [12, 15]]], [('11111', 2, 1, 2, 3), [[6, 14]]], [('1100111001', 1, 1, 1, 10), [[10, 11], [14, 16], [19, 20]]], [('010111110', 11, 5, 2, 0), [[2, 3], [7, 16]]]], [[('1111', 9, 4, 2, 3), [[7, 14]]], [('0001001', 5, 2, 0, 10), [[33, 35], [40, 43]]], [('0011000', 3, 1, 2, 3), [[15, 19]]], [('1000110000', 2, 1, 1, 0), [[0, 1], [8, 11]]], [('00101', 3, 1, 1, 3), [[15, 17], [21, 23]]], [('110101', 2, 1, 0, 0), [[0, 4], [6, 8], [10, 12]]], [('1', 4, 3, 1, 0), [[0, 1]]], [('1100001111', 9, 4, 0, 0), [[0, 5], [14, 23]]]], [[('00010110011', 7, 3, 2, 3), [[14, 15], [19, 21], [28, 31]]], [('101011110001', 11, 5, 2, 3), [[7, 8], [11, 12], [15, 22], [31, 32]]], [('101110', 4, 3, 0, 1), [[1, 3], [4, 8]]], [('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]]], [('011100100', 1, 1, 2, 10), [[11, 12], [16, 17]]], [('11000100111001', 5, 2, 1, 10), [[25, 29], [38, 39], [45, 52], [58, 59]]]], [[('10111010100111', 5, 2, 0, 1), [[3, 5], [8, 15], [18, 20], [23, 25], [30, 38]]], [('11010', 7, 3, 0, 10), [[23, 28], [30, 33]]], [('101110001000', 9, 4, 2, 0), [[0, 1], [5, 9], [18, 19]]], [('01110000', 2, 1, 0, 3), [[8, 14]]], [('11001111', 2, 1, 2, 0), [[0, 2], [8, 14]]], [('0', 7, 3, 0, 0), []], [('00100111', 1, 1, 0, 10), [[12, 13], [15, 18]]], [('10110', 5, 2, 0, 0), [[0, 3], [5, 10]]]], [[('0111110010101', 7, 3, 0, 10), [[26, 37], [42, 44], [47, 49], [51, 54]]], [('1', 5, 2, 0, 3), [[8, 10]]], [('0110', 7, 3, 2, 10), [[26, 28]]], [('010101111001', 2, 1, 0, 0), [[2, 4], [6, 8], [10, 18], [22, 24]]], [('011111', 2, 1, 2, 3), [[8, 16]]], [('1010110101', 2, 1, 0, 1), [[2, 4], [6, 8], [10, 14], [16, 18], [20, 22]]], [('10010101110', 2, 1, 1, 3), [[6, 7], [12, 13], [16, 17], [20, 25]]], [('011110111', 9, 4, 1, 10), [[25, 33], [36, 42]]]]]\nlabels = [\"regression: module boundary rounding\", \"repair trap\", \"combined fault\", \"control\", \"control\", \"boundary\", \"boundary\", \"control\"]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (labels[i % len(labels)], i), solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-barcode-symbology-encoding-device-pixel-rendering-cumulative-rounding","generated_at":"2026-09-29T14:49:47.329782+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"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.","repair":"Round each boundary position computed from the exact fractional pitch.","root_cause":"The module width is rounded to whole pixels before multiplying, so the error accumulates per module.","sha256":"5effefffa859d3c10d96191555e7fbf059be4030cb4b18d65f0d1e973ac03774","title":"Bar edges drift because the module width is rounded first · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.21,"exit_code":1,"observations":[{"actual":[[27,31]],"check":"regression: module boundary rounding 0","expected":[[28,32]],"passed":false},{"actual":[[6,8],[10,15]],"check":"repair trap 1","expected":[[7,8],[11,15]],"passed":false},{"actual":[[8,16]],"check":"combined fault 2","expected":[[8,16]],"passed":true},{"actual":[[5,6],[7,8]],"check":"control 3","expected":[[5,6],[7,8]],"passed":true},{"actual":[[6,9],[12,15]],"check":"control 4","expected":[[6,9],[12,15]],"passed":true},{"actual":[[6,14]],"check":"boundary 5","expected":[[6,14]],"passed":true},{"actual":[[10,11],[14,16],[19,20]],"check":"boundary 6","expected":[[10,11],[14,16],[19,20]],"passed":true},{"actual":[[2,3],[6,15]],"check":"control 7","expected":[[2,3],[7,16]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: module boundary rounding 0\", \"actual\": [[27, 31]], \"expected\": [[28, 32]], \"passed\": false}, {\"check\": \"repair trap 1\", \"actual\": [[6, 8], [10, 15]], \"expected\": [[7, 8], [11, 15]], \"passed\": false}, {\"check\": \"combined fault 2\", \"actual\": [[8, 16]], \"expected\": [[8, 16]], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [[5, 6], [7, 8]], \"expected\": [[5, 6], [7, 8]], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [[6, 9], [12, 15]], \"expected\": [[6, 9], [12, 15]], \"passed\": true}, {\"check\": \"boundary 5\", \"actual\": [[6, 14]], \"expected\": [[6, 14]], \"passed\": true}, {\"check\": \"boundary 6\", \"actual\": [[10, 11], [14, 16], [19, 20]], \"expected\": [[10, 11], [14, 16], [19, 20]], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [[2, 3], [6, 15]], \"expected\": [[2, 3], [7, 16]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.819,"exit_code":1,"observations":[{"actual":[[33,38]],"check":"regression: module boundary rounding 0","expected":[[28,32]],"passed":false},{"actual":[[5,6],[8,11]],"check":"repair trap 1","expected":[[7,8],[11,15]],"passed":false},{"actual":[[8,16]],"check":"combined fault 2","expected":[[8,16]],"passed":true},{"actual":[[5,6],[7,8]],"check":"control 3","expected":[[5,6],[7,8]],"passed":true},{"actual":[[6,9],[12,15]],"check":"control 4","expected":[[6,9],[12,15]],"passed":true},{"actual":[[6,14]],"check":"boundary 5","expected":[[6,14]],"passed":true},{"actual":[[10,11],[14,16],[19,20]],"check":"boundary 6","expected":[[10,11],[14,16],[19,20]],"passed":true},{"actual":[[2,3],[6,14]],"check":"control 7","expected":[[2,3],[7,16]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: module boundary rounding 0\", \"actual\": [[33, 38]], \"expected\": [[28, 32]], \"passed\": false}, {\"check\": \"repair trap 1\", \"actual\": [[5, 6], [8, 11]], \"expected\": [[7, 8], [11, 15]], \"passed\": false}, {\"check\": \"combined fault 2\", \"actual\": [[8, 16]], \"expected\": [[8, 16]], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [[5, 6], [7, 8]], \"expected\": [[5, 6], [7, 8]], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [[6, 9], [12, 15]], \"expected\": [[6, 9], [12, 15]], \"passed\": true}, {\"check\": \"boundary 5\", \"actual\": [[6, 14]], \"expected\": [[6, 14]], \"passed\": true}, {\"check\": \"boundary 6\", \"actual\": [[10, 11], [14, 16], [19, 20]], \"expected\": [[10, 11], [14, 16], [19, 20]], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [[2, 3], [6, 14]], \"expected\": [[2, 3], [7, 16]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.995,"exit_code":0,"observations":[{"actual":[[28,32]],"check":"regression: module boundary rounding 0","expected":[[28,32]],"passed":true},{"actual":[[7,8],[11,15]],"check":"repair trap 1","expected":[[7,8],[11,15]],"passed":true},{"actual":[[8,16]],"check":"combined fault 2","expected":[[8,16]],"passed":true},{"actual":[[5,6],[7,8]],"check":"control 3","expected":[[5,6],[7,8]],"passed":true},{"actual":[[6,9],[12,15]],"check":"control 4","expected":[[6,9],[12,15]],"passed":true},{"actual":[[6,14]],"check":"boundary 5","expected":[[6,14]],"passed":true},{"actual":[[10,11],[14,16],[19,20]],"check":"boundary 6","expected":[[10,11],[14,16],[19,20]],"passed":true},{"actual":[[2,3],[7,16]],"check":"control 7","expected":[[2,3],[7,16]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: module boundary rounding 0\", \"actual\": [[28, 32]], \"expected\": [[28, 32]], \"passed\": true}, {\"check\": \"repair trap 1\", \"actual\": [[7, 8], [11, 15]], \"expected\": [[7, 8], [11, 15]], \"passed\": true}, {\"check\": \"combined fault 2\", \"actual\": [[8, 16]], \"expected\": [[8, 16]], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [[5, 6], [7, 8]], \"expected\": [[5, 6], [7, 8]], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [[6, 9], [12, 15]], \"expected\": [[6, 9], [12, 15]], \"passed\": true}, {\"check\": \"boundary 5\", \"actual\": [[6, 14]], \"expected\": [[6, 14]], \"passed\": true}, {\"check\": \"boundary 6\", \"actual\": [[10, 11], [14, 16], [19, 20]], \"expected\": [[10, 11], [14, 16], [19, 20]], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [[2, 3], [7, 16]], \"expected\": [[2, 3], [7, 16]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}