{"abstract":"Newer requested versions are 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 actions.append((name, 'downgrade')). Fixture 4 still yields [('a', 'downgrade')] instead of [('a', 'upgrade')].","family":"xt-package-actions-upgrade-action","id":"FA-9566","implementations":{"attempt":{"sha256":"d4a46b6d809c2370dc26344626f759cf4ce2f38dc6bcd5c35d8b09c878898fda","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, 'downgrade'))\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":"5d5e1d214a3aee94c3428ef533fe5f107d9625c32d0358a7ed50246e2f08105c","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]: pass\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"},"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-upgrade-action","generated_at":"2026-09-29T14:38:31.035417+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":"Upgrade when desired version exceeds installed version.","root_cause":"The implementation substitutes pass for actions.append((name, 'upgrade')), so newer requested versions are ignored.","sha256":"b530fc8d2f6882feaec5f9af2c9f4e69f73ef77c3464cb06feb688f43695dfcf","title":"Installed package reconciliation: Newer requested versions are ignored · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.172,"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","downgrade"]],"check":"fixture 4","expected":[["a","upgrade"]],"passed":false},{"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":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\", \"downgrade\"]], \"expected\": [[\"a\", \"upgrade\"]], \"passed\": false}, {\"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\": false}\n"},"broken":{"elapsed_ms":39.624,"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":[],"check":"fixture 4","expected":[["a","upgrade"]],"passed":false},{"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":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\": [], \"expected\": [[\"a\", \"upgrade\"]], \"passed\": false}, {\"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\": false}\n"},"fixed":{"elapsed_ms":44.539,"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"}