{"abstract":"New dependencies prepend in reverse order.","category":"Build systems","checks":6,"contract":"Merge prerequisite lists by target, preserving first occurrence order, retaining previous prerequisites, ignoring self references, and retaining empty targets.","evaluation_group":"xt-depfile-merge","failed_approach":"The attempted repair substitutes result[target] = sorted(result[target] + [dep]). Fixture 6 still yields {'old': ['x'], 'new': ['a', 'z']} instead of {'old': ['x'], 'new': ['z', 'a']}.","family":"xt-depfile-merge-dependency-order","id":"FA-9201","implementations":{"attempt":{"sha256":"3041c09f102692b2c0fda896aa284dbb04145e7909112c1b5742013885c3e190","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(previous, updates):\n    result = {name: list(deps) for name, deps in previous.items()}\n    for target, deps in updates:\n        result.setdefault(target, [])\n        for dep in deps:\n            if dep != target and dep not in result[target]:\n                result[target] = sorted(result[target] + [dep])\n    return result\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve({}, []), {})\ncheck('fixture 2', solve({'a': ['b']}, [('a', ['c'])]), {'a': ['b', 'c']})\ncheck('fixture 3', solve({}, [('a', ['a', 'b', 'b', 'c', 'b'])]), {'a': ['b', 'c']})\ncheck('fixture 4', solve({}, [('z', [])]), {'z': []})\ncheck('fixture 5', solve({'a': ['b']}, [('a', ['b', 'c']), ('a', ['d'])]), {'a': ['b', 'c', 'd']})\ncheck('fixture 6', solve({'old': ['x']}, [('new', ['z', 'a'])]), {'old': ['x'], 'new': ['z', 'a']})\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":"35d6ab45b32558fc7476d20433e1a7be2ba887c91d7514dc3ed6c2ff5e66b350","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(previous, updates):\n    result = {name: list(deps) for name, deps in previous.items()}\n    for target, deps in updates:\n        result.setdefault(target, [])\n        for dep in deps:\n            if dep != target and dep not in result[target]:\n                result[target].insert(0, dep)\n    return result\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve({}, []), {})\ncheck('fixture 2', solve({'a': ['b']}, [('a', ['c'])]), {'a': ['b', 'c']})\ncheck('fixture 3', solve({}, [('a', ['a', 'b', 'b', 'c', 'b'])]), {'a': ['b', 'c']})\ncheck('fixture 4', solve({}, [('z', [])]), {'z': []})\ncheck('fixture 5', solve({'a': ['b']}, [('a', ['b', 'c']), ('a', ['d'])]), {'a': ['b', 'c', 'd']})\ncheck('fixture 6', solve({'old': ['x']}, [('new', ['z', 'a'])]), {'old': ['x'], 'new': ['z', 'a']})\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":"a6328c86dae56e4f1ea99d519b6c0a1368c33f3c341f63c7d2c733635c8b744d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(previous, updates):\n    result = {name: list(deps) for name, deps in previous.items()}\n    for target, deps in updates:\n        result.setdefault(target, [])\n        for dep in deps:\n            if dep != target and dep not in result[target]:\n                result[target].append(dep)\n    return result\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve({}, []), {})\ncheck('fixture 2', solve({'a': ['b']}, [('a', ['c'])]), {'a': ['b', 'c']})\ncheck('fixture 3', solve({}, [('a', ['a', 'b', 'b', 'c', 'b'])]), {'a': ['b', 'c']})\ncheck('fixture 4', solve({}, [('z', [])]), {'z': []})\ncheck('fixture 5', solve({'a': ['b']}, [('a', ['b', 'c']), ('a', ['d'])]), {'a': ['b', 'c', 'd']})\ncheck('fixture 6', solve({'old': ['x']}, [('new', ['z', 'a'])]), {'old': ['x'], 'new': ['z', 'a']})\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":" 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":"xt-depfile-merge-dependency-order","generated_at":"2026-09-29T14:38:27.967687+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"An offline model of prerequisite manifest merge, suitable for testing build and release tooling without external services.","repair":"Append each first-seen dependency in declaration order.","root_cause":"The implementation substitutes result[target].insert(0, dep) for result[target].append(dep), so new dependencies prepend in reverse order.","sha256":"690b56ac44ad172662cb24ed1652d15938fc077846f3134200d375f4d0a0df14","title":"Prerequisite manifest merge: New dependencies prepend in reverse order · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.598,"exit_code":1,"observations":[{"actual":{},"check":"fixture 1","expected":{},"passed":true},{"actual":{"a":["b","c"]},"check":"fixture 2","expected":{"a":["b","c"]},"passed":true},{"actual":{"a":["b","c"]},"check":"fixture 3","expected":{"a":["b","c"]},"passed":true},{"actual":{"z":[]},"check":"fixture 4","expected":{"z":[]},"passed":true},{"actual":{"a":["b","c","d"]},"check":"fixture 5","expected":{"a":["b","c","d"]},"passed":true},{"actual":{"new":["a","z"],"old":["x"]},"check":"fixture 6","expected":{"new":["z","a"],"old":["x"]},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": {\"a\": [\"b\", \"c\"]}, \"expected\": {\"a\": [\"b\", \"c\"]}, \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": {\"a\": [\"b\", \"c\"]}, \"expected\": {\"a\": [\"b\", \"c\"]}, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": {\"z\": []}, \"expected\": {\"z\": []}, \"passed\": true}, {\"check\": \"fixture 5\", \"actual\": {\"a\": [\"b\", \"c\", \"d\"]}, \"expected\": {\"a\": [\"b\", \"c\", \"d\"]}, \"passed\": true}, {\"check\": \"fixture 6\", \"actual\": {\"old\": [\"x\"], \"new\": [\"a\", \"z\"]}, \"expected\": {\"old\": [\"x\"], \"new\": [\"z\", \"a\"]}, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":35.224,"exit_code":1,"observations":[{"actual":{},"check":"fixture 1","expected":{},"passed":true},{"actual":{"a":["c","b"]},"check":"fixture 2","expected":{"a":["b","c"]},"passed":false},{"actual":{"a":["c","b"]},"check":"fixture 3","expected":{"a":["b","c"]},"passed":false},{"actual":{"z":[]},"check":"fixture 4","expected":{"z":[]},"passed":true},{"actual":{"a":["d","c","b"]},"check":"fixture 5","expected":{"a":["b","c","d"]},"passed":false},{"actual":{"new":["a","z"],"old":["x"]},"check":"fixture 6","expected":{"new":["z","a"],"old":["x"]},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": {\"a\": [\"c\", \"b\"]}, \"expected\": {\"a\": [\"b\", \"c\"]}, \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": {\"a\": [\"c\", \"b\"]}, \"expected\": {\"a\": [\"b\", \"c\"]}, \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": {\"z\": []}, \"expected\": {\"z\": []}, \"passed\": true}, {\"check\": \"fixture 5\", \"actual\": {\"a\": [\"d\", \"c\", \"b\"]}, \"expected\": {\"a\": [\"b\", \"c\", \"d\"]}, \"passed\": false}, {\"check\": \"fixture 6\", \"actual\": {\"old\": [\"x\"], \"new\": [\"a\", \"z\"]}, \"expected\": {\"old\": [\"x\"], \"new\": [\"z\", \"a\"]}, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.53,"exit_code":0,"observations":[{"actual":{},"check":"fixture 1","expected":{},"passed":true},{"actual":{"a":["b","c"]},"check":"fixture 2","expected":{"a":["b","c"]},"passed":true},{"actual":{"a":["b","c"]},"check":"fixture 3","expected":{"a":["b","c"]},"passed":true},{"actual":{"z":[]},"check":"fixture 4","expected":{"z":[]},"passed":true},{"actual":{"a":["b","c","d"]},"check":"fixture 5","expected":{"a":["b","c","d"]},"passed":true},{"actual":{"new":["z","a"],"old":["x"]},"check":"fixture 6","expected":{"new":["z","a"],"old":["x"]},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": {\"a\": [\"b\", \"c\"]}, \"expected\": {\"a\": [\"b\", \"c\"]}, \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": {\"a\": [\"b\", \"c\"]}, \"expected\": {\"a\": [\"b\", \"c\"]}, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": {\"z\": []}, \"expected\": {\"z\": []}, \"passed\": true}, {\"check\": \"fixture 5\", \"actual\": {\"a\": [\"b\", \"c\", \"d\"]}, \"expected\": {\"a\": [\"b\", \"c\", \"d\"]}, \"passed\": true}, {\"check\": \"fixture 6\", \"actual\": {\"old\": [\"x\"], \"new\": [\"z\", \"a\"]}, \"expected\": {\"old\": [\"x\"], \"new\": [\"z\", \"a\"]}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}