{"abstract":"Duplicate declarations schedule duplicate jobs.","category":"Build systems","checks":7,"contract":"Return declaration-order unique targets whose non-order prerequisites changed, whose output is missing, or which are phony. Keep targets with no prerequisites when phony or missing.","evaluation_group":"xt-dirty-targets","failed_approach":"The attempted repair substitutes name not in result[-1:]. Fixture 6 still yields ['z', 'a', 'z'] instead of ['z', 'a'].","family":"xt-dirty-targets-target-dedup","id":"FA-9301","implementations":{"attempt":{"sha256":"b17002984e60e2cc343c0c755884959b712ec6ffc168dd7940f0cdc9c266daf3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rules, changed, outputs):\n    result = []\n    for name, deps, order_only, phony in rules:\n        dirty = phony or name not in outputs or bool((set(deps) - set(order_only)) & set(changed))\n        if dirty and name not in result[-1:]:\n            result.append(name)\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', [], [], True)], [], ['a']), ['a'])\ncheck('fixture 3', solve([('a', [], [], False)], [], []), ['a'])\ncheck('fixture 4', solve([('a', ['b'], [], False)], ['b'], ['a']), ['a'])\ncheck('fixture 5', solve([('a', ['b'], ['b'], False)], ['b'], ['a']), [])\ncheck('fixture 6', solve([('z', [], [], True), ('a', [], [], True), ('z', [], [], True)], [], []), ['z', 'a'])\ncheck('fixture 7', solve([('a', ['b', 'c'], ['c'], False)], ['b'], ['a']), ['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":"452f7c308a04cc788ed17d4be73f936b5c72df7fad841fb4b4a5aea2ea7d2b75","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rules, changed, outputs):\n    result = []\n    for name, deps, order_only, phony in rules:\n        dirty = phony or name not in outputs or bool((set(deps) - set(order_only)) & set(changed))\n        if dirty and True:\n            result.append(name)\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', [], [], True)], [], ['a']), ['a'])\ncheck('fixture 3', solve([('a', [], [], False)], [], []), ['a'])\ncheck('fixture 4', solve([('a', ['b'], [], False)], ['b'], ['a']), ['a'])\ncheck('fixture 5', solve([('a', ['b'], ['b'], False)], ['b'], ['a']), [])\ncheck('fixture 6', solve([('z', [], [], True), ('a', [], [], True), ('z', [], [], True)], [], []), ['z', 'a'])\ncheck('fixture 7', solve([('a', ['b', 'c'], ['c'], False)], ['b'], ['a']), ['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":"e55e80f67fb13465df0cdea039239784b31023cf478f7a2007356ff79b098364","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rules, changed, outputs):\n    result = []\n    for name, deps, order_only, phony in rules:\n        dirty = phony or name not in outputs or bool((set(deps) - set(order_only)) & set(changed))\n        if dirty and name not in result:\n            result.append(name)\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', [], [], True)], [], ['a']), ['a'])\ncheck('fixture 3', solve([('a', [], [], False)], [], []), ['a'])\ncheck('fixture 4', solve([('a', ['b'], [], False)], ['b'], ['a']), ['a'])\ncheck('fixture 5', solve([('a', ['b'], ['b'], False)], ['b'], ['a']), [])\ncheck('fixture 6', solve([('z', [], [], True), ('a', [], [], True), ('z', [], [], True)], [], []), ['z', 'a'])\ncheck('fixture 7', solve([('a', ['b', 'c'], ['c'], False)], ['b'], ['a']), ['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-dirty-targets-target-dedup","generated_at":"2026-09-29T14:38:28.724809+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"An offline model of direct rebuild trigger selection, suitable for testing build and release tooling without external services.","repair":"Schedule each dirty target once.","root_cause":"The implementation substitutes True for name not in result, so duplicate declarations schedule duplicate jobs.","sha256":"1e3ea5d8a8d66c563febcc0801cc06cae742c4ec63783d09b18bd82a0838f36a","title":"Direct rebuild trigger selection: Duplicate declarations schedule duplicate jobs · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.864,"exit_code":1,"observations":[{"actual":[],"check":"fixture 1","expected":[],"passed":true},{"actual":["a"],"check":"fixture 2","expected":["a"],"passed":true},{"actual":["a"],"check":"fixture 3","expected":["a"],"passed":true},{"actual":["a"],"check":"fixture 4","expected":["a"],"passed":true},{"actual":[],"check":"fixture 5","expected":[],"passed":true},{"actual":["z","a","z"],"check":"fixture 6","expected":["z","a"],"passed":false},{"actual":["a"],"check":"fixture 7","expected":["a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"fixture 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"fixture 6\", \"actual\": [\"z\", \"a\", \"z\"], \"expected\": [\"z\", \"a\"], \"passed\": false}, {\"check\": \"fixture 7\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.377,"exit_code":1,"observations":[{"actual":[],"check":"fixture 1","expected":[],"passed":true},{"actual":["a"],"check":"fixture 2","expected":["a"],"passed":true},{"actual":["a"],"check":"fixture 3","expected":["a"],"passed":true},{"actual":["a"],"check":"fixture 4","expected":["a"],"passed":true},{"actual":[],"check":"fixture 5","expected":[],"passed":true},{"actual":["z","a","z"],"check":"fixture 6","expected":["z","a"],"passed":false},{"actual":["a"],"check":"fixture 7","expected":["a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"fixture 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"fixture 6\", \"actual\": [\"z\", \"a\", \"z\"], \"expected\": [\"z\", \"a\"], \"passed\": false}, {\"check\": \"fixture 7\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.132,"exit_code":0,"observations":[{"actual":[],"check":"fixture 1","expected":[],"passed":true},{"actual":["a"],"check":"fixture 2","expected":["a"],"passed":true},{"actual":["a"],"check":"fixture 3","expected":["a"],"passed":true},{"actual":["a"],"check":"fixture 4","expected":["a"],"passed":true},{"actual":[],"check":"fixture 5","expected":[],"passed":true},{"actual":["z","a"],"check":"fixture 6","expected":["z","a"],"passed":true},{"actual":["a"],"check":"fixture 7","expected":["a"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"fixture 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"fixture 6\", \"actual\": [\"z\", \"a\"], \"expected\": [\"z\", \"a\"], \"passed\": true}, {\"check\": \"fixture 7\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}