{"abstract":"Carton labels are printed with bars too thin for distribution-centre scanners.","category":"Barcode symbology encoding","checks":8,"contract":"Input {sym, modules, x_um, addon?}. Quiet zones in X: ean13 11 left / 7 right, upca 9/9, ean8 7/7, code128, code39 and itf14 10/10. Allowed X-dimensions in micrometres: EAN/UPC 264..660 inclusive, code128/code39 >= 190, itf14 >= 495. An EAN-2 (20 modules) or EAN-5 (47 modules) add-on is only allowed on EAN/UPC; it replaces the right quiet zone by a 7-module gap, the add-on and a 5-module trailing quiet zone. Return [total_um, left_quiet_um] or unknown/x-out-of-range/bad-addon.","contract_signature":"spec","evaluation_group":"w2-barcode-symbology-encoding-quiet-zone-width","failed_approach":"Adding an upper bound rejects legitimately large ITF-14 symbols.","family":"w2-barcode-symbology-encoding-quiet-zone-width-itf14-minimum","id":"FA-79501","implementations":{"attempt":{"sha256":"b5070b03e2af6578a56523ee8a300dd1c74a0194908f389c1c15e79b8bc8d987","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(spec):\n    qz = {'ean13': (11, 7), 'upca': (9, 9), 'ean8': (7, 7), 'code128': (10, 10), 'code39': (10, 10), 'itf14': (10, 10)}\n    xr = {'ean13': (264, 660), 'upca': (264, 660), 'ean8': (264, 660), 'code128': (190, None), 'code39': (190, None), 'itf14': (495, 1016)}\n    sym = spec['sym']\n    if sym not in qz:\n        return 'unknown'\n    lo, hi = xr[sym]\n    x = spec['x_um']\n    if x < lo or (hi is not None and x > hi):\n        return 'x-out-of-range'\n    left, right = qz[sym]\n    addon = spec.get('addon', 0)\n    if addon:\n        if sym not in ('ean13', 'upca', 'ean8') or addon not in (2, 5):\n            return 'bad-addon'\n        right = 7 + (20 if addon == 2 else 47) + 5\n    total = left + spec['modules'] + right\n    return [total * x, left * x]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[{'sym': 'itf14', 'modules': 95, 'x_um': 250, 'addon': 2}, 'x-out-of-range'], [{'sym': 'itf14', 'modules': 95, 'x_um': 1100}, [126500, 11000]], [{'sym': 'code39', 'modules': 200, 'x_um': 661}, [145420, 6610]], [{'sym': 'ean13', 'modules': 67, 'x_um': 330}, [28050, 3630]], [{'sym': 'qr', 'modules': 200, 'x_um': 250, 'addon': 2}, 'unknown'], [{'sym': 'ean8', 'modules': 101, 'x_um': 1100, 'addon': 5}, 'x-out-of-range'], [{'sym': 'code128', 'modules': 200, 'x_um': 1000, 'addon': 5}, 'bad-addon'], [{'sym': 'itf14', 'modules': 142, 'x_um': 400, 'addon': 5}, 'x-out-of-range']], [[{'sym': 'itf14', 'modules': 142, 'x_um': 263}, 'x-out-of-range'], [{'sym': 'itf14', 'modules': 95, 'x_um': 1100}, [126500, 11000]], [{'sym': 'itf14', 'modules': 67, 'x_um': 1000}, [87000, 10000]], [{'sym': 'code128', 'modules': 200, 'x_um': 660}, [145200, 6600]], [{'sym': 'ean13', 'modules': 95, 'x_um': 661}, 'x-out-of-range'], [{'sym': 'ean13', 'modules': 95, 'x_um': 190}, 'x-out-of-range'], [{'sym': 'ean8', 'modules': 95, 'x_um': 330, 'addon': 5}, [53130, 2310]], [{'sym': 'itf14', 'modules': 101, 'x_um': 400}, 'x-out-of-range']], [[{'sym': 'itf14', 'modules': 101, 'x_um': 250}, 'x-out-of-range'], [{'sym': 'itf14', 'modules': 200, 'x_um': 1100, 'addon': 2}, 'bad-addon'], [{'sym': 'ean13', 'modules': 200, 'x_um': 190}, 'x-out-of-range'], [{'sym': 'code39', 'modules': 101, 'x_um': 400}, [48400, 4000]], [{'sym': 'code39', 'modules': 101, 'x_um': 190, 'addon': 3}, 'bad-addon'], [{'sym': 'upca', 'modules': 101, 'x_um': 1000}, 'x-out-of-range'], [{'sym': 'code39', 'modules': 95, 'x_um': 495, 'addon': 5}, 'bad-addon'], [{'sym': 'itf14', 'modules': 200, 'x_um': 263}, 'x-out-of-range']], [[{'sym': 'itf14', 'modules': 200, 'x_um': 263, 'addon': 2}, 'x-out-of-range'], [{'sym': 'itf14', 'modules': 67, 'x_um': 1100}, [95700, 11000]], [{'sym': 'ean8', 'modules': 142, 'x_um': 400, 'addon': 5}, [83200, 2800]], [{'sym': 'code39', 'modules': 67, 'x_um': 330, 'addon': 2}, 'bad-addon'], [{'sym': 'ean13', 'modules': 101, 'x_um': 1100}, 'x-out-of-range'], [{'sym': 'ean13', 'modules': 67, 'x_um': 661}, 'x-out-of-range'], [{'sym': 'upca', 'modules': 67, 'x_um': 330}, [28050, 2970]], [{'sym': 'itf14', 'modules': 67, 'x_um': 300}, 'x-out-of-range']], [[{'sym': 'itf14', 'modules': 67, 'x_um': 263}, 'x-out-of-range'], [{'sym': 'itf14', 'modules': 101, 'x_um': 1100}, [133100, 11000]], [{'sym': 'ean13', 'modules': 67, 'x_um': 330}, [28050, 3630]], [{'sym': 'ean13', 'modules': 101, 'x_um': 264}, [31416, 2904]], [{'sym': 'ean13', 'modules': 67, 'x_um': 264, 'addon': 2}, [29040, 2904]], [{'sym': 'code128', 'modules': 101, 'x_um': 400}, [48400, 4000]], [{'sym': 'ean13', 'modules': 101, 'x_um': 660}, [78540, 7260]], [{'sym': 'itf14', 'modules': 200, 'x_um': 264}, 'x-out-of-range']]]\nlabels = [\"regression: ITF-14 minimum X-dimension\", \"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":"7d7bd485460ef92f23ea84bcc1b8649cbe8a46b76d399463bf8ee8affe6bf58b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(spec):\n    qz = {'ean13': (11, 7), 'upca': (9, 9), 'ean8': (7, 7), 'code128': (10, 10), 'code39': (10, 10), 'itf14': (10, 10)}\n    xr = {'ean13': (264, 660), 'upca': (264, 660), 'ean8': (264, 660), 'code128': (190, None), 'code39': (190, None), 'itf14': (190, None)}\n    sym = spec['sym']\n    if sym not in qz:\n        return 'unknown'\n    lo, hi = xr[sym]\n    x = spec['x_um']\n    if x < lo or (hi is not None and x > hi):\n        return 'x-out-of-range'\n    left, right = qz[sym]\n    addon = spec.get('addon', 0)\n    if addon:\n        if sym not in ('ean13', 'upca', 'ean8') or addon not in (2, 5):\n            return 'bad-addon'\n        right = 7 + (20 if addon == 2 else 47) + 5\n    total = left + spec['modules'] + right\n    return [total * x, left * x]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[{'sym': 'itf14', 'modules': 95, 'x_um': 250, 'addon': 2}, 'x-out-of-range'], [{'sym': 'itf14', 'modules': 95, 'x_um': 1100}, [126500, 11000]], [{'sym': 'code39', 'modules': 200, 'x_um': 661}, [145420, 6610]], [{'sym': 'ean13', 'modules': 67, 'x_um': 330}, [28050, 3630]], [{'sym': 'qr', 'modules': 200, 'x_um': 250, 'addon': 2}, 'unknown'], [{'sym': 'ean8', 'modules': 101, 'x_um': 1100, 'addon': 5}, 'x-out-of-range'], [{'sym': 'code128', 'modules': 200, 'x_um': 1000, 'addon': 5}, 'bad-addon'], [{'sym': 'itf14', 'modules': 142, 'x_um': 400, 'addon': 5}, 'x-out-of-range']], [[{'sym': 'itf14', 'modules': 142, 'x_um': 263}, 'x-out-of-range'], [{'sym': 'itf14', 'modules': 95, 'x_um': 1100}, [126500, 11000]], [{'sym': 'itf14', 'modules': 67, 'x_um': 1000}, [87000, 10000]], [{'sym': 'code128', 'modules': 200, 'x_um': 660}, [145200, 6600]], [{'sym': 'ean13', 'modules': 95, 'x_um': 661}, 'x-out-of-range'], [{'sym': 'ean13', 'modules': 95, 'x_um': 190}, 'x-out-of-range'], [{'sym': 'ean8', 'modules': 95, 'x_um': 330, 'addon': 5}, [53130, 2310]], [{'sym': 'itf14', 'modules': 101, 'x_um': 400}, 'x-out-of-range']], [[{'sym': 'itf14', 'modules': 101, 'x_um': 250}, 'x-out-of-range'], [{'sym': 'itf14', 'modules': 200, 'x_um': 1100, 'addon': 2}, 'bad-addon'], [{'sym': 'ean13', 'modules': 200, 'x_um': 190}, 'x-out-of-range'], [{'sym': 'code39', 'modules': 101, 'x_um': 400}, [48400, 4000]], [{'sym': 'code39', 'modules': 101, 'x_um': 190, 'addon': 3}, 'bad-addon'], [{'sym': 'upca', 'modules': 101, 'x_um': 1000}, 'x-out-of-range'], [{'sym': 'code39', 'modules': 95, 'x_um': 495, 'addon': 5}, 'bad-addon'], [{'sym': 'itf14', 'modules': 200, 'x_um': 263}, 'x-out-of-range']], [[{'sym': 'itf14', 'modules': 200, 'x_um': 263, 'addon': 2}, 'x-out-of-range'], [{'sym': 'itf14', 'modules': 67, 'x_um': 1100}, [95700, 11000]], [{'sym': 'ean8', 'modules': 142, 'x_um': 400, 'addon': 5}, [83200, 2800]], [{'sym': 'code39', 'modules': 67, 'x_um': 330, 'addon': 2}, 'bad-addon'], [{'sym': 'ean13', 'modules': 101, 'x_um': 1100}, 'x-out-of-range'], [{'sym': 'ean13', 'modules': 67, 'x_um': 661}, 'x-out-of-range'], [{'sym': 'upca', 'modules': 67, 'x_um': 330}, [28050, 2970]], [{'sym': 'itf14', 'modules': 67, 'x_um': 300}, 'x-out-of-range']], [[{'sym': 'itf14', 'modules': 67, 'x_um': 263}, 'x-out-of-range'], [{'sym': 'itf14', 'modules': 101, 'x_um': 1100}, [133100, 11000]], [{'sym': 'ean13', 'modules': 67, 'x_um': 330}, [28050, 3630]], [{'sym': 'ean13', 'modules': 101, 'x_um': 264}, [31416, 2904]], [{'sym': 'ean13', 'modules': 67, 'x_um': 264, 'addon': 2}, [29040, 2904]], [{'sym': 'code128', 'modules': 101, 'x_um': 400}, [48400, 4000]], [{'sym': 'ean13', 'modules': 101, 'x_um': 660}, [78540, 7260]], [{'sym': 'itf14', 'modules': 200, 'x_um': 264}, 'x-out-of-range']]]\nlabels = [\"regression: ITF-14 minimum X-dimension\", \"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-quiet-zone-width-itf14-minimum","generated_at":"2026-09-29T14:49:45.077949+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.","root_cause":"ITF-14 shares the generic 190 micrometre minimum instead of its own 495.","sha256":"333f4975cd3863c6bf68bd634ce26b6303ca3c9b64b091521a0cde806810bdb1","title":"ITF-14 accepts the Code 128 minimum X-dimension · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":41.048,"exit_code":1,"observations":[{"actual":"x-out-of-range","check":"regression: ITF-14 minimum X-dimension 0","expected":"x-out-of-range","passed":true},{"actual":"x-out-of-range","check":"repair trap 1","expected":[126500,11000],"passed":false},{"actual":[145420,6610],"check":"combined fault 2","expected":[145420,6610],"passed":true},{"actual":[28050,3630],"check":"control 3","expected":[28050,3630],"passed":true},{"actual":"unknown","check":"control 4","expected":"unknown","passed":true},{"actual":"x-out-of-range","check":"boundary 5","expected":"x-out-of-range","passed":true},{"actual":"bad-addon","check":"boundary 6","expected":"bad-addon","passed":true},{"actual":"x-out-of-range","check":"control 7","expected":"x-out-of-range","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: ITF-14 minimum X-dimension 0\", \"actual\": \"x-out-of-range\", \"expected\": \"x-out-of-range\", \"passed\": true}, {\"check\": \"repair trap 1\", \"actual\": \"x-out-of-range\", \"expected\": [126500, 11000], \"passed\": false}, {\"check\": \"combined fault 2\", \"actual\": [145420, 6610], \"expected\": [145420, 6610], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [28050, 3630], \"expected\": [28050, 3630], \"passed\": true}, {\"check\": \"control 4\", \"actual\": \"unknown\", \"expected\": \"unknown\", \"passed\": true}, {\"check\": \"boundary 5\", \"actual\": \"x-out-of-range\", \"expected\": \"x-out-of-range\", \"passed\": true}, {\"check\": \"boundary 6\", \"actual\": \"bad-addon\", \"expected\": \"bad-addon\", \"passed\": true}, {\"check\": \"control 7\", \"actual\": \"x-out-of-range\", \"expected\": \"x-out-of-range\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.24,"exit_code":1,"observations":[{"actual":"bad-addon","check":"regression: ITF-14 minimum X-dimension 0","expected":"x-out-of-range","passed":false},{"actual":[126500,11000],"check":"repair trap 1","expected":[126500,11000],"passed":true},{"actual":[145420,6610],"check":"combined fault 2","expected":[145420,6610],"passed":true},{"actual":[28050,3630],"check":"control 3","expected":[28050,3630],"passed":true},{"actual":"unknown","check":"control 4","expected":"unknown","passed":true},{"actual":"x-out-of-range","check":"boundary 5","expected":"x-out-of-range","passed":true},{"actual":"bad-addon","check":"boundary 6","expected":"bad-addon","passed":true},{"actual":"bad-addon","check":"control 7","expected":"x-out-of-range","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: ITF-14 minimum X-dimension 0\", \"actual\": \"bad-addon\", \"expected\": \"x-out-of-range\", \"passed\": false}, {\"check\": \"repair trap 1\", \"actual\": [126500, 11000], \"expected\": [126500, 11000], \"passed\": true}, {\"check\": \"combined fault 2\", \"actual\": [145420, 6610], \"expected\": [145420, 6610], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [28050, 3630], \"expected\": [28050, 3630], \"passed\": true}, {\"check\": \"control 4\", \"actual\": \"unknown\", \"expected\": \"unknown\", \"passed\": true}, {\"check\": \"boundary 5\", \"actual\": \"x-out-of-range\", \"expected\": \"x-out-of-range\", \"passed\": true}, {\"check\": \"boundary 6\", \"actual\": \"bad-addon\", \"expected\": \"bad-addon\", \"passed\": true}, {\"check\": \"control 7\", \"actual\": \"bad-addon\", \"expected\": \"x-out-of-range\", \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}