{"abstract":"Content drift at an equal version is ignored.","category":"Dependency resolution","checks":7,"contract":"For each desired package, emit install if missing, upgrade or downgrade for version movement, reinstall for digest drift, and remove installed packages absent from desired. Output actions sorted by package name.","evaluation_group":"xt-package-actions","failed_approach":"The attempted repair substitutes desired[name][1] == installed[name][1]. Fixture 6 still yields [] instead of [('a', 'reinstall')].","family":"xt-package-actions-digest-reinstall","id":"FA-9576","implementations":{"attempt":{"sha256":"06e900b86b879391ae20ee63f24bc3ddbcf01a80ed2b4a324e14cc37c345a5cc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(desired, installed):\n    actions = []\n    for name in sorted(set(desired) | set(installed)):\n        if name not in desired: actions.append((name, 'remove'))\n        elif name not in installed: actions.append((name, 'install'))\n        elif desired[name][0] > installed[name][0]: actions.append((name, 'upgrade'))\n        elif desired[name][0] < installed[name][0]: actions.append((name, 'downgrade'))\n        elif desired[name][1] == installed[name][1]: actions.append((name, 'reinstall'))\n    return actions\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': (1, 'x')}, {}), [('a', 'install')])\ncheck('fixture 3', solve({}, {'a': (1, 'x')}), [('a', 'remove')])\ncheck('fixture 4', solve({'a': (2, 'x')}, {'a': (1, 'x')}), [('a', 'upgrade')])\ncheck('fixture 5', solve({'a': (1, 'x')}, {'a': (2, 'x')}), [('a', 'downgrade')])\ncheck('fixture 6', solve({'a': (1, 'x')}, {'a': (1, 'y')}), [('a', 'reinstall')])\ncheck('fixture 7', solve({'a': (1, 'x')}, {'a': (1, 'x')}), [])\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":"aa8fd8336587f6dec09750250f98d63e5b67b407a3828067757c9122944d3927","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(desired, installed):\n    actions = []\n    for name in sorted(set(desired) | set(installed)):\n        if name not in desired: actions.append((name, 'remove'))\n        elif name not in installed: actions.append((name, 'install'))\n        elif desired[name][0] > installed[name][0]: actions.append((name, 'upgrade'))\n        elif desired[name][0] < installed[name][0]: actions.append((name, 'downgrade'))\n        elif False: actions.append((name, 'reinstall'))\n    return actions\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': (1, 'x')}, {}), [('a', 'install')])\ncheck('fixture 3', solve({}, {'a': (1, 'x')}), [('a', 'remove')])\ncheck('fixture 4', solve({'a': (2, 'x')}, {'a': (1, 'x')}), [('a', 'upgrade')])\ncheck('fixture 5', solve({'a': (1, 'x')}, {'a': (2, 'x')}), [('a', 'downgrade')])\ncheck('fixture 6', solve({'a': (1, 'x')}, {'a': (1, 'y')}), [('a', 'reinstall')])\ncheck('fixture 7', solve({'a': (1, 'x')}, {'a': (1, 'x')}), [])\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":"2e56a3a777c168b4268bd463a24b625da992cd0fcf930e016882646dc5893ceb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(desired, installed):\n    actions = []\n    for name in sorted(set(desired) | set(installed)):\n        if name not in desired: actions.append((name, 'remove'))\n        elif name not in installed: actions.append((name, 'install'))\n        elif desired[name][0] > installed[name][0]: actions.append((name, 'upgrade'))\n        elif desired[name][0] < installed[name][0]: actions.append((name, 'downgrade'))\n        elif desired[name][1] != installed[name][1]: actions.append((name, 'reinstall'))\n    return actions\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': (1, 'x')}, {}), [('a', 'install')])\ncheck('fixture 3', solve({}, {'a': (1, 'x')}), [('a', 'remove')])\ncheck('fixture 4', solve({'a': (2, 'x')}, {'a': (1, 'x')}), [('a', 'upgrade')])\ncheck('fixture 5', solve({'a': (1, 'x')}, {'a': (2, 'x')}), [('a', 'downgrade')])\ncheck('fixture 6', solve({'a': (1, 'x')}, {'a': (1, 'y')}), [('a', 'reinstall')])\ncheck('fixture 7', solve({'a': (1, 'x')}, {'a': (1, 'x')}), [])\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-package-actions-digest-reinstall","generated_at":"2026-09-29T14:38:31.120940+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"An offline model of installed package reconciliation, suitable for testing build and release tooling without external services.","repair":"Reinstall when equal versions have different digests.","root_cause":"The implementation substitutes False for desired[name][1] != installed[name][1], so content drift at an equal version is ignored.","sha256":"a3a1e25d0d1df7241f7dcd396ad84afbc88673018c951033b53dc981fc573a0b","title":"Installed package reconciliation: Content drift at an equal version is ignored · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.21,"exit_code":1,"observations":[{"actual":[],"check":"fixture 1","expected":[],"passed":true},{"actual":[["a","install"]],"check":"fixture 2","expected":[["a","install"]],"passed":true},{"actual":[["a","remove"]],"check":"fixture 3","expected":[["a","remove"]],"passed":true},{"actual":[["a","upgrade"]],"check":"fixture 4","expected":[["a","upgrade"]],"passed":true},{"actual":[["a","downgrade"]],"check":"fixture 5","expected":[["a","downgrade"]],"passed":true},{"actual":[],"check":"fixture 6","expected":[["a","reinstall"]],"passed":false},{"actual":[["a","reinstall"]],"check":"fixture 7","expected":[],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [[\"a\", \"install\"]], \"expected\": [[\"a\", \"install\"]], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [[\"a\", \"remove\"]], \"expected\": [[\"a\", \"remove\"]], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [[\"a\", \"upgrade\"]], \"expected\": [[\"a\", \"upgrade\"]], \"passed\": true}, {\"check\": \"fixture 5\", \"actual\": [[\"a\", \"downgrade\"]], \"expected\": [[\"a\", \"downgrade\"]], \"passed\": true}, {\"check\": \"fixture 6\", \"actual\": [], \"expected\": [[\"a\", \"reinstall\"]], \"passed\": false}, {\"check\": \"fixture 7\", \"actual\": [[\"a\", \"reinstall\"]], \"expected\": [], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.981,"exit_code":1,"observations":[{"actual":[],"check":"fixture 1","expected":[],"passed":true},{"actual":[["a","install"]],"check":"fixture 2","expected":[["a","install"]],"passed":true},{"actual":[["a","remove"]],"check":"fixture 3","expected":[["a","remove"]],"passed":true},{"actual":[["a","upgrade"]],"check":"fixture 4","expected":[["a","upgrade"]],"passed":true},{"actual":[["a","downgrade"]],"check":"fixture 5","expected":[["a","downgrade"]],"passed":true},{"actual":[],"check":"fixture 6","expected":[["a","reinstall"]],"passed":false},{"actual":[],"check":"fixture 7","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [[\"a\", \"install\"]], \"expected\": [[\"a\", \"install\"]], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [[\"a\", \"remove\"]], \"expected\": [[\"a\", \"remove\"]], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [[\"a\", \"upgrade\"]], \"expected\": [[\"a\", \"upgrade\"]], \"passed\": true}, {\"check\": \"fixture 5\", \"actual\": [[\"a\", \"downgrade\"]], \"expected\": [[\"a\", \"downgrade\"]], \"passed\": true}, {\"check\": \"fixture 6\", \"actual\": [], \"expected\": [[\"a\", \"reinstall\"]], \"passed\": false}, {\"check\": \"fixture 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.174,"exit_code":0,"observations":[{"actual":[],"check":"fixture 1","expected":[],"passed":true},{"actual":[["a","install"]],"check":"fixture 2","expected":[["a","install"]],"passed":true},{"actual":[["a","remove"]],"check":"fixture 3","expected":[["a","remove"]],"passed":true},{"actual":[["a","upgrade"]],"check":"fixture 4","expected":[["a","upgrade"]],"passed":true},{"actual":[["a","downgrade"]],"check":"fixture 5","expected":[["a","downgrade"]],"passed":true},{"actual":[["a","reinstall"]],"check":"fixture 6","expected":[["a","reinstall"]],"passed":true},{"actual":[],"check":"fixture 7","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [[\"a\", \"install\"]], \"expected\": [[\"a\", \"install\"]], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [[\"a\", \"remove\"]], \"expected\": [[\"a\", \"remove\"]], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [[\"a\", \"upgrade\"]], \"expected\": [[\"a\", \"upgrade\"]], \"passed\": true}, {\"check\": \"fixture 5\", \"actual\": [[\"a\", \"downgrade\"]], \"expected\": [[\"a\", \"downgrade\"]], \"passed\": true}, {\"check\": \"fixture 6\", \"actual\": [[\"a\", \"reinstall\"]], \"expected\": [[\"a\", \"reinstall\"]], \"passed\": true}, {\"check\": \"fixture 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}