{"abstract":"Detected faces on portrait phone shots are highlighted on the opposite side of the frame.","category":"Image orientation metadata","checks":8,"contract":"Map a half-open face/crop region [x, y, width, height] given in stored pixel space of an image of size [w, h] into displayed space for orientation tag 1..8. The region is first clipped to the stored image; an empty clipped region returns None, and an unknown tag returns None. Mirroring a half-open interval [a, b) over extent e gives [e-b, e-a); tags 5..8 exchange axes after the flips.","contract_signature":"size, tag, box","evaluation_group":"w2-image-orientation-metadata-region-box","failed_approach":"Flipping both axes before transposing is the transverse tag 7, not a clockwise quarter turn.","family":"w2-image-orientation-metadata-region-box-tag6-flip-axis","id":"FA-78876","implementations":{"attempt":{"sha256":"88d8d526d41882840b56df049184c0ff83014a70ac8dcb67f49cce1047647859","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(size, tag, box):\n    w, h = size\n    x0, y0, bw, bh = box\n    x1 = min(x0 + bw, w)\n    y1 = min(y0 + bh, h)\n    x0 = max(x0, 0)\n    y0 = max(y0, 0)\n    if x1 <= x0 or y1 <= y0:\n        return None\n    table = {1: (0, 0, 0), 2: (1, 0, 0), 3: (1, 1, 0), 4: (0, 1, 0), 5: (0, 0, 1), 6: (1, 1, 1), 7: (1, 1, 1), 8: (1, 0, 1)}\n    if tag not in table:\n        return None\n    fx, fy, tr = table[tag]\n    if fx:\n        x0, x1 = w - x1, w - x0\n    if fy:\n        y0, y1 = h - y1, h - y0\n    if tr:\n        x0, y0, x1, y1 = y0, x0, y1, x1\n    return [x0, y0, x1 - x0, y1 - y0]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[([5, 1], 6, [-3, -2, 5, 4]), [0, 0, 1, 2]], [([3, 7], 6, [-3, 6, 4, 5]), [0, 0, 1, 1]], [([7, 5], 1, [6, -1, 4, 0]), None], [([3, 4], 3, [-2, 3, 0, 2]), None], [([2, 4], 8, [2, 1, 3, 3]), None], [([2, 4], 7, [1, -3, 3, 3]), None], [([2, 6], 6, [4, -1, 1, 4]), None], [([6, 7], 6, [-1, 1, 4, 3]), [3, 0, 3, 3]]], [[([6, 3], 6, [3, 0, 1, 5]), [0, 3, 3, 1]], [([7, 7], 6, [1, 1, 4, 5]), [1, 1, 5, 4]], [([3, 5], 0, [-3, -2, 2, 4]), None], [([3, 1], 1, [2, 2, 2, 0]), None], [([4, 1], 3, [6, 3, 2, 4]), None], [([5, 5], 6, [6, 3, 5, 0]), None], [([4, 5], 1, [1, 2, 5, 4]), [1, 2, 3, 3]], [([6, 6], 6, [4, 4, 3, 3]), [0, 4, 2, 2]]], [[([6, 6], 6, [1, 5, 2, 5]), [0, 1, 1, 2]], [([4, 2], 6, [-2, -2, 5, 4]), [0, 0, 2, 3]], [([1, 7], 6, [3, 6, 1, 4]), None], [([4, 5], 8, [2, -2, 0, 2]), None], [([1, 5], 9, [2, 3, 4, 4]), None], [([6, 1], 2, [2, 1, 3, 0]), None], [([1, 2], 9, [-2, 1, 1, 3]), None], [([5, 4], 6, [4, 3, 3, 3]), [0, 4, 1, 1]]], [[([5, 5], 6, [1, 1, 2, 5]), [0, 1, 4, 2]], [([4, 1], 6, [1, -2, 4, 5]), [0, 1, 1, 3]], [([6, 4], 6, [-1, 3, 2, 2]), [0, 0, 1, 1]], [([3, 6], 8, [6, -2, 2, 3]), None], [([7, 7], 2, [-2, 0, 0, 4]), None], [([2, 5], 1, [1, 6, 5, 2]), None], [([5, 5], 1, [6, 1, 5, 4]), None], [([3, 4], 6, [0, 3, 4, 4]), [0, 0, 1, 3]]], [[([5, 3], 6, [-2, -2, 5, 4]), [1, 0, 2, 3]], [([7, 5], 6, [1, 0, 2, 4]), [1, 1, 4, 2]], [([7, 3], 6, [4, -2, 1, 3]), [2, 4, 1, 1]], [([1, 1], 7, [1, -3, 2, 0]), None], [([4, 5], 6, [1, 3, 0, 5]), None], [([4, 1], 0, [2, 4, 5, 5]), None], [([6, 7], 7, [6, 0, 3, 1]), None], [([7, 7], 6, [0, 5, 4, 3]), [0, 0, 2, 4]]]]\nlabels = [\"regression: tag 6 decomposition entry\", \"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":"21ae94380fde01557b9c2a3808b0ab130e87fb9ee8a6971ceb8416ae7efb91df","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(size, tag, box):\n    w, h = size\n    x0, y0, bw, bh = box\n    x1 = min(x0 + bw, w)\n    y1 = min(y0 + bh, h)\n    x0 = max(x0, 0)\n    y0 = max(y0, 0)\n    if x1 <= x0 or y1 <= y0:\n        return None\n    table = {1: (0, 0, 0), 2: (1, 0, 0), 3: (1, 1, 0), 4: (0, 1, 0), 5: (0, 0, 1), 6: (1, 0, 1), 7: (1, 1, 1), 8: (1, 0, 1)}\n    if tag not in table:\n        return None\n    fx, fy, tr = table[tag]\n    if fx:\n        x0, x1 = w - x1, w - x0\n    if fy:\n        y0, y1 = h - y1, h - y0\n    if tr:\n        x0, y0, x1, y1 = y0, x0, y1, x1\n    return [x0, y0, x1 - x0, y1 - y0]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[([5, 1], 6, [-3, -2, 5, 4]), [0, 0, 1, 2]], [([3, 7], 6, [-3, 6, 4, 5]), [0, 0, 1, 1]], [([7, 5], 1, [6, -1, 4, 0]), None], [([3, 4], 3, [-2, 3, 0, 2]), None], [([2, 4], 8, [2, 1, 3, 3]), None], [([2, 4], 7, [1, -3, 3, 3]), None], [([2, 6], 6, [4, -1, 1, 4]), None], [([6, 7], 6, [-1, 1, 4, 3]), [3, 0, 3, 3]]], [[([6, 3], 6, [3, 0, 1, 5]), [0, 3, 3, 1]], [([7, 7], 6, [1, 1, 4, 5]), [1, 1, 5, 4]], [([3, 5], 0, [-3, -2, 2, 4]), None], [([3, 1], 1, [2, 2, 2, 0]), None], [([4, 1], 3, [6, 3, 2, 4]), None], [([5, 5], 6, [6, 3, 5, 0]), None], [([4, 5], 1, [1, 2, 5, 4]), [1, 2, 3, 3]], [([6, 6], 6, [4, 4, 3, 3]), [0, 4, 2, 2]]], [[([6, 6], 6, [1, 5, 2, 5]), [0, 1, 1, 2]], [([4, 2], 6, [-2, -2, 5, 4]), [0, 0, 2, 3]], [([1, 7], 6, [3, 6, 1, 4]), None], [([4, 5], 8, [2, -2, 0, 2]), None], [([1, 5], 9, [2, 3, 4, 4]), None], [([6, 1], 2, [2, 1, 3, 0]), None], [([1, 2], 9, [-2, 1, 1, 3]), None], [([5, 4], 6, [4, 3, 3, 3]), [0, 4, 1, 1]]], [[([5, 5], 6, [1, 1, 2, 5]), [0, 1, 4, 2]], [([4, 1], 6, [1, -2, 4, 5]), [0, 1, 1, 3]], [([6, 4], 6, [-1, 3, 2, 2]), [0, 0, 1, 1]], [([3, 6], 8, [6, -2, 2, 3]), None], [([7, 7], 2, [-2, 0, 0, 4]), None], [([2, 5], 1, [1, 6, 5, 2]), None], [([5, 5], 1, [6, 1, 5, 4]), None], [([3, 4], 6, [0, 3, 4, 4]), [0, 0, 1, 3]]], [[([5, 3], 6, [-2, -2, 5, 4]), [1, 0, 2, 3]], [([7, 5], 6, [1, 0, 2, 4]), [1, 1, 4, 2]], [([7, 3], 6, [4, -2, 1, 3]), [2, 4, 1, 1]], [([1, 1], 7, [1, -3, 2, 0]), None], [([4, 5], 6, [1, 3, 0, 5]), None], [([4, 1], 0, [2, 4, 5, 5]), None], [([6, 7], 7, [6, 0, 3, 1]), None], [([7, 7], 6, [0, 5, 4, 3]), [0, 0, 2, 4]]]]\nlabels = [\"regression: tag 6 decomposition entry\", \"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-region-box-tag6-flip-axis","generated_at":"2026-09-29T14:49:39.247729+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.","root_cause":"Tag 6 is decomposed as flip-x then transpose, which is the tag-8 rotation.","sha256":"d3362e37d8f62c16eecc1c1b4779ef8cbb26e5fd65ab032b1640879c1804da3e","title":"Face boxes on clockwise-rotated photos land on the mirrored side · 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":37.657,"exit_code":1,"observations":[{"actual":[0,3,1,2],"check":"regression: tag 6 decomposition entry 0","expected":[0,0,1,2],"passed":false},{"actual":[0,2,1,1],"check":"repair trap 1","expected":[0,0,1,1],"passed":false},{"actual":null,"check":"combined fault 2","expected":null,"passed":true},{"actual":null,"check":"control 3","expected":null,"passed":true},{"actual":null,"check":"control 4","expected":null,"passed":true},{"actual":null,"check":"boundary 5","expected":null,"passed":true},{"actual":null,"check":"boundary 6","expected":null,"passed":true},{"actual":[3,3,3,3],"check":"control 7","expected":[3,0,3,3],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: tag 6 decomposition entry 0\", \"actual\": [0, 3, 1, 2], \"expected\": [0, 0, 1, 2], \"passed\": false}, {\"check\": \"repair trap 1\", \"actual\": [0, 2, 1, 1], \"expected\": [0, 0, 1, 1], \"passed\": false}, {\"check\": \"combined fault 2\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control 4\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"boundary 5\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"boundary 6\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control 7\", \"actual\": [3, 3, 3, 3], \"expected\": [3, 0, 3, 3], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.15,"exit_code":1,"observations":[{"actual":[0,3,1,2],"check":"regression: tag 6 decomposition entry 0","expected":[0,0,1,2],"passed":false},{"actual":[6,2,1,1],"check":"repair trap 1","expected":[0,0,1,1],"passed":false},{"actual":null,"check":"combined fault 2","expected":null,"passed":true},{"actual":null,"check":"control 3","expected":null,"passed":true},{"actual":null,"check":"control 4","expected":null,"passed":true},{"actual":null,"check":"boundary 5","expected":null,"passed":true},{"actual":null,"check":"boundary 6","expected":null,"passed":true},{"actual":[1,3,3,3],"check":"control 7","expected":[3,0,3,3],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: tag 6 decomposition entry 0\", \"actual\": [0, 3, 1, 2], \"expected\": [0, 0, 1, 2], \"passed\": false}, {\"check\": \"repair trap 1\", \"actual\": [6, 2, 1, 1], \"expected\": [0, 0, 1, 1], \"passed\": false}, {\"check\": \"combined fault 2\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control 4\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"boundary 5\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"boundary 6\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control 7\", \"actual\": [1, 3, 3, 3], \"expected\": [3, 0, 3, 3], \"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."}}