{"abstract":"At pitches above one pixel per module the quiet zone is too small and the symbol starts too close to the label edge.","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":"Rounding the quiet offset separately breaks the single rounding step for each edge.","family":"w2-barcode-symbology-encoding-device-pixel-rendering-quiet-units","id":"FA-79746","implementations":{"attempt":{"sha256":"fc6388747337aac7df9883410e6b947ab1da9fa61aae770552019a013b7d7c70","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(i * X + Fraction(1, 2)) + math.floor(quiet * 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 = [[[('0001111', 2, 1, 0, 1), [[8, 16]]], [('000011011110', 4, 3, 1, 1), [[7, 8], [11, 15]]], [('11011', 5, 2, 2, 1), [[3, 6], [10, 13]]], [('010111110', 11, 5, 2, 0), [[2, 3], [7, 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]]], [('011', 5, 2, 1, 10), [[28, 32]]]], [[('0011000', 3, 1, 2, 3), [[15, 19]]], [('110', 11, 5, 0, 3), [[7, 11]]], [('11010001011', 11, 5, 1, 1), [[2, 6], [9, 10], [18, 19], [22, 25]]], [('0010101000110', 7, 3, 0, 0), [[5, 7], [9, 12], [14, 16], [23, 28]]], [('1100001111', 9, 4, 0, 0), [[0, 5], [14, 23]]], [('000010010001', 9, 4, 1, 0), [[9, 10], [16, 17], [25, 26]]], [('1000110000', 2, 1, 1, 0), [[0, 1], [8, 11]]], [('00101', 3, 1, 1, 3), [[15, 17], [21, 23]]]], [[('00010110011', 7, 3, 2, 3), [[14, 15], [19, 21], [28, 31]]], [('01001111110', 5, 2, 1, 3), [[10, 12], [18, 32]]], [('111000011001', 11, 5, 0, 1), [[2, 9], [18, 22], [26, 29]]], [('100110010100', 1, 1, 0, 1), [[1, 2], [4, 6], [8, 9], [10, 11]]], [('011100100', 1, 1, 2, 10), [[11, 12], [16, 17]]], [('01011', 3, 1, 0, 0), [[3, 6], [9, 15]]], [('100000010', 9, 4, 1, 0), [[0, 1], [16, 17]]], [('11000100111001', 5, 2, 1, 10), [[25, 29], [38, 39], [45, 52], [58, 59]]]], [[('00101011101', 7, 3, 1, 10), [[28, 29], [33, 34], [37, 43], [47, 48]]], [('1000010110000', 7, 3, 0, 1), [[2, 5], [14, 16], [19, 23]]], [('010110111001', 11, 5, 1, 1), [[4, 6], [9, 12], [15, 21], [26, 28]]], [('11001111', 2, 1, 2, 0), [[0, 2], [8, 14]]], [('1', 5, 2, 1, 0), [[0, 2]]], [('010011110', 7, 3, 2, 0), [[2, 3], [9, 17]]], [('0', 7, 3, 0, 0), []], [('0000001100111', 2, 1, 2, 3), [[18, 20], [26, 30]]]], [[('10111101000110', 7, 3, 0, 3), [[7, 9], [12, 21], [23, 26], [33, 37]]], [('00101011000', 9, 4, 0, 1), [[7, 9], [11, 14], [16, 20]]], [('0100100100', 4, 3, 0, 10), [[15, 16], [19, 20], [23, 24]]], [('0001011111001', 1, 1, 0, 1), [[4, 5], [6, 11], [13, 14]]], [('100011111110', 11, 5, 0, 0), [[0, 2], [9, 24]]], [('000011', 9, 4, 0, 0), [[9, 14]]], [('1110011100111', 1, 1, 2, 10), [[10, 11], [15, 16], [20, 21]]], [('0010110011101', 3, 1, 1, 1), [[9, 11], [15, 20], [27, 35], [39, 41]]]]]\nlabels = [\"regression: quiet zone units\", \"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":"51a14ca792f695346f87e2da4b5ed17e405adfd5aeced625438e15d2df523afa","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(i * X + Fraction(1, 2)) + quiet\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 = [[[('0001111', 2, 1, 0, 1), [[8, 16]]], [('000011011110', 4, 3, 1, 1), [[7, 8], [11, 15]]], [('11011', 5, 2, 2, 1), [[3, 6], [10, 13]]], [('010111110', 11, 5, 2, 0), [[2, 3], [7, 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]]], [('011', 5, 2, 1, 10), [[28, 32]]]], [[('0011000', 3, 1, 2, 3), [[15, 19]]], [('110', 11, 5, 0, 3), [[7, 11]]], [('11010001011', 11, 5, 1, 1), [[2, 6], [9, 10], [18, 19], [22, 25]]], [('0010101000110', 7, 3, 0, 0), [[5, 7], [9, 12], [14, 16], [23, 28]]], [('1100001111', 9, 4, 0, 0), [[0, 5], [14, 23]]], [('000010010001', 9, 4, 1, 0), [[9, 10], [16, 17], [25, 26]]], [('1000110000', 2, 1, 1, 0), [[0, 1], [8, 11]]], [('00101', 3, 1, 1, 3), [[15, 17], [21, 23]]]], [[('00010110011', 7, 3, 2, 3), [[14, 15], [19, 21], [28, 31]]], [('01001111110', 5, 2, 1, 3), [[10, 12], [18, 32]]], [('111000011001', 11, 5, 0, 1), [[2, 9], [18, 22], [26, 29]]], [('100110010100', 1, 1, 0, 1), [[1, 2], [4, 6], [8, 9], [10, 11]]], [('011100100', 1, 1, 2, 10), [[11, 12], [16, 17]]], [('01011', 3, 1, 0, 0), [[3, 6], [9, 15]]], [('100000010', 9, 4, 1, 0), [[0, 1], [16, 17]]], [('11000100111001', 5, 2, 1, 10), [[25, 29], [38, 39], [45, 52], [58, 59]]]], [[('00101011101', 7, 3, 1, 10), [[28, 29], [33, 34], [37, 43], [47, 48]]], [('1000010110000', 7, 3, 0, 1), [[2, 5], [14, 16], [19, 23]]], [('010110111001', 11, 5, 1, 1), [[4, 6], [9, 12], [15, 21], [26, 28]]], [('11001111', 2, 1, 2, 0), [[0, 2], [8, 14]]], [('1', 5, 2, 1, 0), [[0, 2]]], [('010011110', 7, 3, 2, 0), [[2, 3], [9, 17]]], [('0', 7, 3, 0, 0), []], [('0000001100111', 2, 1, 2, 3), [[18, 20], [26, 30]]]], [[('10111101000110', 7, 3, 0, 3), [[7, 9], [12, 21], [23, 26], [33, 37]]], [('00101011000', 9, 4, 0, 1), [[7, 9], [11, 14], [16, 20]]], [('0100100100', 4, 3, 0, 10), [[15, 16], [19, 20], [23, 24]]], [('0001011111001', 1, 1, 0, 1), [[4, 5], [6, 11], [13, 14]]], [('100011111110', 11, 5, 0, 0), [[0, 2], [9, 24]]], [('000011', 9, 4, 0, 0), [[9, 14]]], [('1110011100111', 1, 1, 2, 10), [[10, 11], [15, 16], [20, 21]]], [('0010110011101', 3, 1, 1, 1), [[9, 11], [15, 20], [27, 35], [39, 41]]]]]\nlabels = [\"regression: quiet zone units\", \"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":"b60fd8a0c3e87df5e0f0fe551a68090de7ef19361806e30703394bfe80f1588c","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 = [[[('0001111', 2, 1, 0, 1), [[8, 16]]], [('000011011110', 4, 3, 1, 1), [[7, 8], [11, 15]]], [('11011', 5, 2, 2, 1), [[3, 6], [10, 13]]], [('010111110', 11, 5, 2, 0), [[2, 3], [7, 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]]], [('011', 5, 2, 1, 10), [[28, 32]]]], [[('0011000', 3, 1, 2, 3), [[15, 19]]], [('110', 11, 5, 0, 3), [[7, 11]]], [('11010001011', 11, 5, 1, 1), [[2, 6], [9, 10], [18, 19], [22, 25]]], [('0010101000110', 7, 3, 0, 0), [[5, 7], [9, 12], [14, 16], [23, 28]]], [('1100001111', 9, 4, 0, 0), [[0, 5], [14, 23]]], [('000010010001', 9, 4, 1, 0), [[9, 10], [16, 17], [25, 26]]], [('1000110000', 2, 1, 1, 0), [[0, 1], [8, 11]]], [('00101', 3, 1, 1, 3), [[15, 17], [21, 23]]]], [[('00010110011', 7, 3, 2, 3), [[14, 15], [19, 21], [28, 31]]], [('01001111110', 5, 2, 1, 3), [[10, 12], [18, 32]]], [('111000011001', 11, 5, 0, 1), [[2, 9], [18, 22], [26, 29]]], [('100110010100', 1, 1, 0, 1), [[1, 2], [4, 6], [8, 9], [10, 11]]], [('011100100', 1, 1, 2, 10), [[11, 12], [16, 17]]], [('01011', 3, 1, 0, 0), [[3, 6], [9, 15]]], [('100000010', 9, 4, 1, 0), [[0, 1], [16, 17]]], [('11000100111001', 5, 2, 1, 10), [[25, 29], [38, 39], [45, 52], [58, 59]]]], [[('00101011101', 7, 3, 1, 10), [[28, 29], [33, 34], [37, 43], [47, 48]]], [('1000010110000', 7, 3, 0, 1), [[2, 5], [14, 16], [19, 23]]], [('010110111001', 11, 5, 1, 1), [[4, 6], [9, 12], [15, 21], [26, 28]]], [('11001111', 2, 1, 2, 0), [[0, 2], [8, 14]]], [('1', 5, 2, 1, 0), [[0, 2]]], [('010011110', 7, 3, 2, 0), [[2, 3], [9, 17]]], [('0', 7, 3, 0, 0), []], [('0000001100111', 2, 1, 2, 3), [[18, 20], [26, 30]]]], [[('10111101000110', 7, 3, 0, 3), [[7, 9], [12, 21], [23, 26], [33, 37]]], [('00101011000', 9, 4, 0, 1), [[7, 9], [11, 14], [16, 20]]], [('0100100100', 4, 3, 0, 10), [[15, 16], [19, 20], [23, 24]]], [('0001011111001', 1, 1, 0, 1), [[4, 5], [6, 11], [13, 14]]], [('100011111110', 11, 5, 0, 0), [[0, 2], [9, 24]]], [('000011', 9, 4, 0, 0), [[9, 14]]], [('1110011100111', 1, 1, 2, 10), [[10, 11], [15, 16], [20, 21]]], [('0010110011101', 3, 1, 1, 1), [[9, 11], [15, 20], [27, 35], [39, 41]]]]]\nlabels = [\"regression: quiet zone units\", \"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-quiet-units","generated_at":"2026-09-29T14:49:47.533309+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":"Offset by quiet modules at the module pitch before rounding.","root_cause":"The quiet zone count is added as pixels instead of modules.","sha256":"a70d1a413736564bd3d4d5216399b86d78d784dd1e5d8c8e24a06a73da9407e6","title":"Quiet zone offset is counted in pixels · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.062,"exit_code":1,"observations":[{"actual":[[8,16]],"check":"regression: quiet zone units 0","expected":[[8,16]],"passed":true},{"actual":[[6,8],[10,15]],"check":"repair trap 1","expected":[[7,8],[11,15]],"passed":false},{"actual":[[2,5],[10,13]],"check":"combined fault 2","expected":[[3,6],[10,13]],"passed":false},{"actual":[[2,3],[7,16]],"check":"control 3","expected":[[2,3],[7,16]],"passed":true},{"actual":[[5,6],[7,8]],"check":"control 4","expected":[[5,6],[7,8]],"passed":true},{"actual":[[0,2],[4,9],[13,15],[18,20]],"check":"boundary 5","expected":[[0,2],[4,9],[13,15],[18,20]],"passed":true},{"actual":[[6,9],[12,15]],"check":"boundary 6","expected":[[6,9],[12,15]],"passed":true},{"actual":[[28,32]],"check":"control 7","expected":[[28,32]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: quiet zone units 0\", \"actual\": [[8, 16]], \"expected\": [[8, 16]], \"passed\": true}, {\"check\": \"repair trap 1\", \"actual\": [[6, 8], [10, 15]], \"expected\": [[7, 8], [11, 15]], \"passed\": false}, {\"check\": \"combined fault 2\", \"actual\": [[2, 5], [10, 13]], \"expected\": [[3, 6], [10, 13]], \"passed\": false}, {\"check\": \"control 3\", \"actual\": [[2, 3], [7, 16]], \"expected\": [[2, 3], [7, 16]], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [[5, 6], [7, 8]], \"expected\": [[5, 6], [7, 8]], \"passed\": true}, {\"check\": \"boundary 5\", \"actual\": [[0, 2], [4, 9], [13, 15], [18, 20]], \"expected\": [[0, 2], [4, 9], [13, 15], [18, 20]], \"passed\": true}, {\"check\": \"boundary 6\", \"actual\": [[6, 9], [12, 15]], \"expected\": [[6, 9], [12, 15]], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [[28, 32]], \"expected\": [[28, 32]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.63,"exit_code":1,"observations":[{"actual":[[7,15]],"check":"regression: quiet zone units 0","expected":[[8,16]],"passed":false},{"actual":[[6,8],[10,15]],"check":"repair trap 1","expected":[[7,8],[11,15]],"passed":false},{"actual":[[1,4],[9,12]],"check":"combined fault 2","expected":[[3,6],[10,13]],"passed":false},{"actual":[[2,3],[7,16]],"check":"control 3","expected":[[2,3],[7,16]],"passed":true},{"actual":[[5,6],[7,8]],"check":"control 4","expected":[[5,6],[7,8]],"passed":true},{"actual":[[0,2],[4,9],[13,15],[18,20]],"check":"boundary 5","expected":[[0,2],[4,9],[13,15],[18,20]],"passed":true},{"actual":[[6,9],[12,15]],"check":"boundary 6","expected":[[6,9],[12,15]],"passed":true},{"actual":[[13,17]],"check":"control 7","expected":[[28,32]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: quiet zone units 0\", \"actual\": [[7, 15]], \"expected\": [[8, 16]], \"passed\": false}, {\"check\": \"repair trap 1\", \"actual\": [[6, 8], [10, 15]], \"expected\": [[7, 8], [11, 15]], \"passed\": false}, {\"check\": \"combined fault 2\", \"actual\": [[1, 4], [9, 12]], \"expected\": [[3, 6], [10, 13]], \"passed\": false}, {\"check\": \"control 3\", \"actual\": [[2, 3], [7, 16]], \"expected\": [[2, 3], [7, 16]], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [[5, 6], [7, 8]], \"expected\": [[5, 6], [7, 8]], \"passed\": true}, {\"check\": \"boundary 5\", \"actual\": [[0, 2], [4, 9], [13, 15], [18, 20]], \"expected\": [[0, 2], [4, 9], [13, 15], [18, 20]], \"passed\": true}, {\"check\": \"boundary 6\", \"actual\": [[6, 9], [12, 15]], \"expected\": [[6, 9], [12, 15]], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [[13, 17]], \"expected\": [[28, 32]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.537,"exit_code":0,"observations":[{"actual":[[8,16]],"check":"regression: quiet zone units 0","expected":[[8,16]],"passed":true},{"actual":[[7,8],[11,15]],"check":"repair trap 1","expected":[[7,8],[11,15]],"passed":true},{"actual":[[3,6],[10,13]],"check":"combined fault 2","expected":[[3,6],[10,13]],"passed":true},{"actual":[[2,3],[7,16]],"check":"control 3","expected":[[2,3],[7,16]],"passed":true},{"actual":[[5,6],[7,8]],"check":"control 4","expected":[[5,6],[7,8]],"passed":true},{"actual":[[0,2],[4,9],[13,15],[18,20]],"check":"boundary 5","expected":[[0,2],[4,9],[13,15],[18,20]],"passed":true},{"actual":[[6,9],[12,15]],"check":"boundary 6","expected":[[6,9],[12,15]],"passed":true},{"actual":[[28,32]],"check":"control 7","expected":[[28,32]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: quiet zone units 0\", \"actual\": [[8, 16]], \"expected\": [[8, 16]], \"passed\": true}, {\"check\": \"repair trap 1\", \"actual\": [[7, 8], [11, 15]], \"expected\": [[7, 8], [11, 15]], \"passed\": true}, {\"check\": \"combined fault 2\", \"actual\": [[3, 6], [10, 13]], \"expected\": [[3, 6], [10, 13]], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [[2, 3], [7, 16]], \"expected\": [[2, 3], [7, 16]], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [[5, 6], [7, 8]], \"expected\": [[5, 6], [7, 8]], \"passed\": true}, {\"check\": \"boundary 5\", \"actual\": [[0, 2], [4, 9], [13, 15], [18, 20]], \"expected\": [[0, 2], [4, 9], [13, 15], [18, 20]], \"passed\": true}, {\"check\": \"boundary 6\", \"actual\": [[6, 9], [12, 15]], \"expected\": [[6, 9], [12, 15]], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [[28, 32]], \"expected\": [[28, 32]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}