{"abstract":"A malformed LONG orientation entry shadows a later valid SHORT entry.","category":"Image orientation metadata","checks":8,"contract":"Parse the orientation from an APP1 Exif payload given as a list of byte values: a 6-byte \"Exif\\0\\0\" header, then a TIFF header (II little-endian or MM big-endian, magic 42 as a 16-bit value, 32-bit IFD0 offset relative to the TIFF header). Scan IFD0 12-byte entries; the first entry with tag 0x0112, type SHORT (3) and count 1 supplies the value from the first two bytes of its value field. Values outside 1..8 and a missing entry yield 1; structural problems (short payload, bad header, byte order, magic, truncated entry) yield \"malformed\".","evaluation_group":"w2-image-orientation-metadata-tiff-ifd0-parse","failed_approach":"Accepting any non-zero type admits ASCII and RATIONAL entries too.","family":"w2-image-orientation-metadata-tiff-ifd0-parse-entry-type","id":"FA-78926","implementations":{"attempt":{"sha256":"6c187bfedc3750016952dad38f67377db738d16229ca4b8fcf64d5853764d5c3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    b = data\n    if len(b) < 14 or b[:6] != [69, 120, 105, 102, 0, 0]:\n        return 'malformed'\n    t = b[6:]\n    if t[:2] == [73, 73]:\n        le = True\n    elif t[:2] == [77, 77]:\n        le = False\n    else:\n        return 'malformed'\n    def u16(o):\n        if o + 2 > len(t):\n            return None\n        return t[o] | (t[o + 1] << 8) if le else (t[o] << 8) | t[o + 1]\n    def u32(o):\n        if o + 4 > len(t):\n            return None\n        v = t[o:o + 4]\n        if le:\n            v = v[::-1]\n        return (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3]\n    if u16(2) != 42:\n        return 'malformed'\n    ifd = u32(4)\n    count = u16(ifd)\n    if count is None:\n        return 'malformed'\n    for i in range(count):\n        e = ifd + 2 + 12 * i\n        if e + 12 > len(t):\n            return 'malformed'\n        tag = u16(e)\n        typ = u16(e + 2)\n        cnt = u32(e + 4)\n        if tag == 0x0112 and typ != 0 and cnt == 1:\n            val = u16(e + 8)\n            return val if 1 <= val <= 8 else 1\n    return 1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 4, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 8, 1, 16, 0, 3, 0, 0, 0, 1, 1, 77, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 3, 0, 0, 1, 26, 0, 3, 0, 0, 0, 1, 1, 10, 0, 0, 0, 0, 0, 0], 3], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 6, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 164, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 152, 0, 0, 0, 0, 0, 0, 0], 6], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 3, 1, 15, 0, 3, 0, 0, 0, 1, 0, 7, 0, 0, 1, 26, 0, 3, 0, 0, 0, 1, 0, 114, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 26, 1, 3, 0, 1, 0, 0, 0, 126, 1, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 43, 0, 0, 0, 8, 0, 1, 1, 18, 0, 3, 0, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 10, 0, 0, 0, 0, 0, 2, 0, 15, 1, 3, 0, 1, 0, 0, 0, 73, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 2, 0, 16, 1, 3, 0, 1, 0, 0, 0, 247, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 124, 1, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 3, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 3, 1, 18, 0, 3, 0, 0, 0, 1, 0, 8, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 0, 253, 0, 0, 0, 0, 0, 0], 8]], [[[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 3, 0, 18, 1, 4, 0, 1, 0, 0, 0, 8, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 77, 1, 0, 0, 16, 1, 3, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 10, 0, 0, 0, 0, 0, 3, 0, 18, 1, 4, 0, 1, 0, 0, 0, 6, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 41, 1, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 174, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 255, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 2, 1, 18, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 1, 26, 0, 3, 0, 0, 0, 1, 0, 46, 0, 0, 0, 0, 0, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 3, 1, 15, 0, 3, 0, 0, 0, 1, 1, 96, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 150], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 10, 0, 0, 0, 0, 0, 3, 0, 26, 1, 3, 0, 1, 0, 0, 0, 115, 1, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 111, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0], 8], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 10, 0, 0, 0, 5, 1, 18, 0, 4, 0, 0, 0, 2, 0, 0, 0, 8, 1, 26, 0, 3, 0, 0, 0, 1, 1, 15, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 0, 190, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 6, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 77, 0, 0, 0, 0, 0, 0], 6], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 1, 0, 18, 1, 3, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0], 4], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 4, 0, 1, 0, 0, 0, 8, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 6, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 68, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 35, 1, 0, 0, 0, 0, 0, 0], 6]], [[[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 171, 1, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 106, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0], 4], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 3, 0, 18, 1, 4, 0, 1, 0, 0, 0, 8, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 108, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 4, 1, 18, 0, 3, 0, 0, 0, 1, 0, 9, 0, 0, 1, 26, 0, 3, 0, 0, 0, 1, 1, 115, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 1, 244, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 186, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 10, 0, 0, 0, 1, 1, 18, 0, 4, 0, 0, 0, 2, 0, 0, 0, 6], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 18, 1, 3, 0, 1, 0, 0, 0, 8, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 202, 0, 0, 0, 15, 1, 3, 0, 1], 8], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 4, 1, 18, 0, 3, 0, 0, 0, 2, 0, 8, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 0, 242, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 8, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 1, 214, 0, 0, 0, 0, 0, 0], 8], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 5, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 6, 1, 15, 0, 3, 0, 0, 0, 1, 0, 102, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 141, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 8, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 73, 0, 0, 0, 0, 0, 0], 8]], [[[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 2, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 6, 1, 18, 0, 3, 0, 0, 0, 1, 0, 8, 0, 0, 0, 0, 0, 0], 8], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 3, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 7, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 189, 0, 0, 0, 0, 0, 0, 0], 7], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 3, 1, 26, 0, 3, 0, 0, 0, 1, 1, 79, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 1, 177, 0, 0, 1, 26, 0, 3, 0, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 3, 0, 26, 1, 3, 0, 1, 0, 0, 0, 17, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 37, 1, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 233, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 1, 1, 15, 0, 3], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 3, 0, 1, 0, 0, 0, 6, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 147, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 88, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 151, 1, 0, 0, 0, 0, 0, 0], 6], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 18, 1, 3, 0, 2, 0, 0, 0, 8, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 6, 1, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 125, 1, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 225, 1, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0], 5], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 4, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 8, 1, 18, 0, 3, 0, 0, 0, 1, 0, 2, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 0, 127, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 0, 210, 0, 0, 0, 0, 0, 0], 2]], [[[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 10, 0, 0, 0, 2, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 8, 1, 18, 0, 3, 0, 0, 0, 1, 0, 6, 0, 0, 0, 0, 0, 0], 6], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 37, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 74, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 176], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 241, 0, 0, 0, 0, 0, 0, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 15, 1, 3, 0, 1, 0, 0, 0, 51, 1, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 8, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 55], 8], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 2, 0, 15, 1, 3, 0, 1, 0, 0, 0, 215, 1, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0], 7], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 4, 1, 18, 0, 3, 0, 0, 0, 2, 0, 8, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 0, 173, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 1, 83, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 181, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 3, 1, 16, 0, 3, 0, 0, 0, 1, 0, 196, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 0, 141, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 30, 0, 0], 'malformed']]]\nlabels = [\"regression: orientation entry type filter\", \"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":"322bc6d1328c8d1b5b38ccd48bc5e4b7e9be22475a235afaf245168221041217","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    b = data\n    if len(b) < 14 or b[:6] != [69, 120, 105, 102, 0, 0]:\n        return 'malformed'\n    t = b[6:]\n    if t[:2] == [73, 73]:\n        le = True\n    elif t[:2] == [77, 77]:\n        le = False\n    else:\n        return 'malformed'\n    def u16(o):\n        if o + 2 > len(t):\n            return None\n        return t[o] | (t[o + 1] << 8) if le else (t[o] << 8) | t[o + 1]\n    def u32(o):\n        if o + 4 > len(t):\n            return None\n        v = t[o:o + 4]\n        if le:\n            v = v[::-1]\n        return (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3]\n    if u16(2) != 42:\n        return 'malformed'\n    ifd = u32(4)\n    count = u16(ifd)\n    if count is None:\n        return 'malformed'\n    for i in range(count):\n        e = ifd + 2 + 12 * i\n        if e + 12 > len(t):\n            return 'malformed'\n        tag = u16(e)\n        typ = u16(e + 2)\n        cnt = u32(e + 4)\n        if tag == 0x0112 and typ in (3, 4) and cnt == 1:\n            val = u16(e + 8)\n            return val if 1 <= val <= 8 else 1\n    return 1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 4, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 8, 1, 16, 0, 3, 0, 0, 0, 1, 1, 77, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 3, 0, 0, 1, 26, 0, 3, 0, 0, 0, 1, 1, 10, 0, 0, 0, 0, 0, 0], 3], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 6, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 164, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 152, 0, 0, 0, 0, 0, 0, 0], 6], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 3, 1, 15, 0, 3, 0, 0, 0, 1, 0, 7, 0, 0, 1, 26, 0, 3, 0, 0, 0, 1, 0, 114, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 26, 1, 3, 0, 1, 0, 0, 0, 126, 1, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 43, 0, 0, 0, 8, 0, 1, 1, 18, 0, 3, 0, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 10, 0, 0, 0, 0, 0, 2, 0, 15, 1, 3, 0, 1, 0, 0, 0, 73, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 2, 0, 16, 1, 3, 0, 1, 0, 0, 0, 247, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 124, 1, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 3, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 3, 1, 18, 0, 3, 0, 0, 0, 1, 0, 8, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 0, 253, 0, 0, 0, 0, 0, 0], 8]], [[[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 3, 0, 18, 1, 4, 0, 1, 0, 0, 0, 8, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 77, 1, 0, 0, 16, 1, 3, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 10, 0, 0, 0, 0, 0, 3, 0, 18, 1, 4, 0, 1, 0, 0, 0, 6, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 41, 1, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 174, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 255, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 2, 1, 18, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 1, 26, 0, 3, 0, 0, 0, 1, 0, 46, 0, 0, 0, 0, 0, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 3, 1, 15, 0, 3, 0, 0, 0, 1, 1, 96, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 150], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 10, 0, 0, 0, 0, 0, 3, 0, 26, 1, 3, 0, 1, 0, 0, 0, 115, 1, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 111, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0], 8], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 10, 0, 0, 0, 5, 1, 18, 0, 4, 0, 0, 0, 2, 0, 0, 0, 8, 1, 26, 0, 3, 0, 0, 0, 1, 1, 15, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 0, 190, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 6, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 77, 0, 0, 0, 0, 0, 0], 6], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 1, 0, 18, 1, 3, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0], 4], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 4, 0, 1, 0, 0, 0, 8, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 6, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 68, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 35, 1, 0, 0, 0, 0, 0, 0], 6]], [[[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 171, 1, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 106, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0], 4], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 3, 0, 18, 1, 4, 0, 1, 0, 0, 0, 8, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 108, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 4, 1, 18, 0, 3, 0, 0, 0, 1, 0, 9, 0, 0, 1, 26, 0, 3, 0, 0, 0, 1, 1, 115, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 1, 244, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 186, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 10, 0, 0, 0, 1, 1, 18, 0, 4, 0, 0, 0, 2, 0, 0, 0, 6], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 18, 1, 3, 0, 1, 0, 0, 0, 8, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 202, 0, 0, 0, 15, 1, 3, 0, 1], 8], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 4, 1, 18, 0, 3, 0, 0, 0, 2, 0, 8, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 0, 242, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 8, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 1, 214, 0, 0, 0, 0, 0, 0], 8], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 5, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 6, 1, 15, 0, 3, 0, 0, 0, 1, 0, 102, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 141, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 8, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 73, 0, 0, 0, 0, 0, 0], 8]], [[[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 2, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 6, 1, 18, 0, 3, 0, 0, 0, 1, 0, 8, 0, 0, 0, 0, 0, 0], 8], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 3, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 7, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 189, 0, 0, 0, 0, 0, 0, 0], 7], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 3, 1, 26, 0, 3, 0, 0, 0, 1, 1, 79, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 1, 177, 0, 0, 1, 26, 0, 3, 0, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 3, 0, 26, 1, 3, 0, 1, 0, 0, 0, 17, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 37, 1, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 233, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 1, 1, 15, 0, 3], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 3, 0, 1, 0, 0, 0, 6, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 147, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 88, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 151, 1, 0, 0, 0, 0, 0, 0], 6], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 18, 1, 3, 0, 2, 0, 0, 0, 8, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 6, 1, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 125, 1, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 225, 1, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0], 5], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 4, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 8, 1, 18, 0, 3, 0, 0, 0, 1, 0, 2, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 0, 127, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 0, 210, 0, 0, 0, 0, 0, 0], 2]], [[[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 10, 0, 0, 0, 2, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 8, 1, 18, 0, 3, 0, 0, 0, 1, 0, 6, 0, 0, 0, 0, 0, 0], 6], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 37, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 74, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 176], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 241, 0, 0, 0, 0, 0, 0, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 15, 1, 3, 0, 1, 0, 0, 0, 51, 1, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 8, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 55], 8], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 2, 0, 15, 1, 3, 0, 1, 0, 0, 0, 215, 1, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0], 7], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 4, 1, 18, 0, 3, 0, 0, 0, 2, 0, 8, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 0, 173, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 1, 83, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 181, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 3, 1, 16, 0, 3, 0, 0, 0, 1, 0, 196, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 0, 141, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 30, 0, 0], 'malformed']]]\nlabels = [\"regression: orientation entry type filter\", \"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":"31bc97b0924a553da8988a0cbc18bc3b10a04f60ff5496615613cf9072ebaceb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    b = data\n    if len(b) < 14 or b[:6] != [69, 120, 105, 102, 0, 0]:\n        return 'malformed'\n    t = b[6:]\n    if t[:2] == [73, 73]:\n        le = True\n    elif t[:2] == [77, 77]:\n        le = False\n    else:\n        return 'malformed'\n    def u16(o):\n        if o + 2 > len(t):\n            return None\n        return t[o] | (t[o + 1] << 8) if le else (t[o] << 8) | t[o + 1]\n    def u32(o):\n        if o + 4 > len(t):\n            return None\n        v = t[o:o + 4]\n        if le:\n            v = v[::-1]\n        return (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3]\n    if u16(2) != 42:\n        return 'malformed'\n    ifd = u32(4)\n    count = u16(ifd)\n    if count is None:\n        return 'malformed'\n    for i in range(count):\n        e = ifd + 2 + 12 * i\n        if e + 12 > len(t):\n            return 'malformed'\n        tag = u16(e)\n        typ = u16(e + 2)\n        cnt = u32(e + 4)\n        if tag == 0x0112 and typ == 3 and cnt == 1:\n            val = u16(e + 8)\n            return val if 1 <= val <= 8 else 1\n    return 1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 4, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 8, 1, 16, 0, 3, 0, 0, 0, 1, 1, 77, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 3, 0, 0, 1, 26, 0, 3, 0, 0, 0, 1, 1, 10, 0, 0, 0, 0, 0, 0], 3], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 6, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 164, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 152, 0, 0, 0, 0, 0, 0, 0], 6], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 3, 1, 15, 0, 3, 0, 0, 0, 1, 0, 7, 0, 0, 1, 26, 0, 3, 0, 0, 0, 1, 0, 114, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 26, 1, 3, 0, 1, 0, 0, 0, 126, 1, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 43, 0, 0, 0, 8, 0, 1, 1, 18, 0, 3, 0, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 10, 0, 0, 0, 0, 0, 2, 0, 15, 1, 3, 0, 1, 0, 0, 0, 73, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 2, 0, 16, 1, 3, 0, 1, 0, 0, 0, 247, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 124, 1, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 3, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 3, 1, 18, 0, 3, 0, 0, 0, 1, 0, 8, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 0, 253, 0, 0, 0, 0, 0, 0], 8]], [[[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 3, 0, 18, 1, 4, 0, 1, 0, 0, 0, 8, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 77, 1, 0, 0, 16, 1, 3, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 10, 0, 0, 0, 0, 0, 3, 0, 18, 1, 4, 0, 1, 0, 0, 0, 6, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 41, 1, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 174, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 255, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 2, 1, 18, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 1, 26, 0, 3, 0, 0, 0, 1, 0, 46, 0, 0, 0, 0, 0, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 3, 1, 15, 0, 3, 0, 0, 0, 1, 1, 96, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 150], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 10, 0, 0, 0, 0, 0, 3, 0, 26, 1, 3, 0, 1, 0, 0, 0, 115, 1, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 111, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0], 8], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 10, 0, 0, 0, 5, 1, 18, 0, 4, 0, 0, 0, 2, 0, 0, 0, 8, 1, 26, 0, 3, 0, 0, 0, 1, 1, 15, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 0, 190, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 6, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 77, 0, 0, 0, 0, 0, 0], 6], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 1, 0, 18, 1, 3, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0], 4], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 4, 0, 1, 0, 0, 0, 8, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 6, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 68, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 35, 1, 0, 0, 0, 0, 0, 0], 6]], [[[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 171, 1, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 106, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0], 4], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 3, 0, 18, 1, 4, 0, 1, 0, 0, 0, 8, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 108, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 4, 1, 18, 0, 3, 0, 0, 0, 1, 0, 9, 0, 0, 1, 26, 0, 3, 0, 0, 0, 1, 1, 115, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 1, 244, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 186, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 10, 0, 0, 0, 1, 1, 18, 0, 4, 0, 0, 0, 2, 0, 0, 0, 6], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 18, 1, 3, 0, 1, 0, 0, 0, 8, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 202, 0, 0, 0, 15, 1, 3, 0, 1], 8], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 4, 1, 18, 0, 3, 0, 0, 0, 2, 0, 8, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 0, 242, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 8, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 1, 214, 0, 0, 0, 0, 0, 0], 8], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 5, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 6, 1, 15, 0, 3, 0, 0, 0, 1, 0, 102, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 141, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 8, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 73, 0, 0, 0, 0, 0, 0], 8]], [[[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 2, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 6, 1, 18, 0, 3, 0, 0, 0, 1, 0, 8, 0, 0, 0, 0, 0, 0], 8], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 3, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 7, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 189, 0, 0, 0, 0, 0, 0, 0], 7], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 3, 1, 26, 0, 3, 0, 0, 0, 1, 1, 79, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 1, 177, 0, 0, 1, 26, 0, 3, 0, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 3, 0, 26, 1, 3, 0, 1, 0, 0, 0, 17, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 37, 1, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 233, 0, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 1, 1, 15, 0, 3], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 3, 0, 1, 0, 0, 0, 6, 0, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 147, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 88, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 151, 1, 0, 0, 0, 0, 0, 0], 6], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 18, 1, 3, 0, 2, 0, 0, 0, 8, 0, 0, 0, 26, 1, 3, 0, 1, 0, 0, 0, 6, 1, 0, 0, 15, 1, 3, 0, 1, 0, 0, 0, 125, 1, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 225, 1, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0], 5], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 4, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 8, 1, 18, 0, 3, 0, 0, 0, 1, 0, 2, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 0, 127, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 0, 210, 0, 0, 0, 0, 0, 0], 2]], [[[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 10, 0, 0, 0, 2, 1, 18, 0, 4, 0, 0, 0, 1, 0, 0, 0, 8, 1, 18, 0, 3, 0, 0, 0, 1, 0, 6, 0, 0, 0, 0, 0, 0], 6], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 4, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 37, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 74, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 176], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 241, 0, 0, 0, 0, 0, 0, 0], 'malformed'], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 15, 1, 3, 0, 1, 0, 0, 0, 51, 1, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 8, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 55], 8], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 8, 0, 0, 0, 2, 0, 15, 1, 3, 0, 1, 0, 0, 0, 215, 1, 0, 0, 18, 1, 3, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0], 7], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 4, 1, 18, 0, 3, 0, 0, 0, 2, 0, 8, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 0, 173, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 1, 83, 0, 0, 1, 15, 0, 3, 0, 0, 0, 1, 1, 181, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 3, 1, 16, 0, 3, 0, 0, 0, 1, 0, 196, 0, 0, 1, 18, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 1, 16, 0, 3, 0, 0, 0, 1, 0, 141, 0, 0, 0, 0, 0, 0], 1], [[69, 120, 105, 102, 0, 0, 73, 73, 42, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 18, 1, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 16, 1, 3, 0, 1, 0, 0, 0, 30, 0, 0], 'malformed']]]\nlabels = [\"regression: orientation entry type filter\", \"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-image-orientation-metadata-tiff-ifd0-parse-entry-type","generated_at":"2026-09-29T14:49:39.857600+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Camera, phone and scanner images carry an orientation hint separately from the stored pixels; galleries, thumbnailers, editors and upload pipelines must interpret it consistently or photos appear sideways, mirrored or doubly rotated.","repair":"Accept only SHORT (type 3) orientation entries and keep scanning otherwise.","root_cause":"The type filter accepts LONG (4), and the SHORT reader then returns only half of the long value.","sha256":"de8814a8578383c372c22d80b2a7128aebb952c8461fc49d43987cae8dbe2b16","title":"Orientation entries of type LONG are trusted · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.567,"exit_code":1,"observations":[{"actual":1,"check":"regression: orientation entry type filter 0","expected":3,"passed":false},{"actual":3,"check":"repair trap 1","expected":6,"passed":false},{"actual":1,"check":"combined fault 2","expected":1,"passed":true},{"actual":"malformed","check":"control 3","expected":"malformed","passed":true},{"actual":"malformed","check":"control 4","expected":"malformed","passed":true},{"actual":1,"check":"boundary 5","expected":1,"passed":true},{"actual":1,"check":"boundary 6","expected":1,"passed":true},{"actual":1,"check":"control 7","expected":8,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: orientation entry type filter 0\", \"actual\": 1, \"expected\": 3, \"passed\": false}, {\"check\": \"repair trap 1\", \"actual\": 3, \"expected\": 6, \"passed\": false}, {\"check\": \"combined fault 2\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"control 3\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control 4\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"boundary 5\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"boundary 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"control 7\", \"actual\": 1, \"expected\": 8, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.404,"exit_code":1,"observations":[{"actual":1,"check":"regression: orientation entry type filter 0","expected":3,"passed":false},{"actual":3,"check":"repair trap 1","expected":6,"passed":false},{"actual":1,"check":"combined fault 2","expected":1,"passed":true},{"actual":"malformed","check":"control 3","expected":"malformed","passed":true},{"actual":"malformed","check":"control 4","expected":"malformed","passed":true},{"actual":1,"check":"boundary 5","expected":1,"passed":true},{"actual":1,"check":"boundary 6","expected":1,"passed":true},{"actual":1,"check":"control 7","expected":8,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: orientation entry type filter 0\", \"actual\": 1, \"expected\": 3, \"passed\": false}, {\"check\": \"repair trap 1\", \"actual\": 3, \"expected\": 6, \"passed\": false}, {\"check\": \"combined fault 2\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"control 3\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control 4\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"boundary 5\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"boundary 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"control 7\", \"actual\": 1, \"expected\": 8, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.735,"exit_code":0,"observations":[{"actual":3,"check":"regression: orientation entry type filter 0","expected":3,"passed":true},{"actual":6,"check":"repair trap 1","expected":6,"passed":true},{"actual":1,"check":"combined fault 2","expected":1,"passed":true},{"actual":"malformed","check":"control 3","expected":"malformed","passed":true},{"actual":"malformed","check":"control 4","expected":"malformed","passed":true},{"actual":1,"check":"boundary 5","expected":1,"passed":true},{"actual":1,"check":"boundary 6","expected":1,"passed":true},{"actual":8,"check":"control 7","expected":8,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: orientation entry type filter 0\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"repair trap 1\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"combined fault 2\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"control 3\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control 4\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"boundary 5\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"boundary 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"control 7\", \"actual\": 8, \"expected\": 8, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}