FA-9846 / Packaging / Open access
Wheel compatibility admission: Foreign-platform wheels install locally · case 01
Foreign-platform wheels install locally.
ROOT CAUSE
The implementation substitutes True for bool(set(wheel['platform']) & (set(platforms) | {'any'})), so foreign-platform wheels install locally.
VERIFIED REPAIR
Match supported platforms or the platform-independent tag.
Unsuccessful approach: The attempted repair substitutes bool(set(wheel['platform']) & set(platforms)). Fixture 7 still yields False instead of True.
Case contract
Accept a wheel when at least one Python tag, ABI tag, and platform tag is supported; universal tags py3, none, and any have explicit support. Reject yanked wheels and incompatible minimum interpreter versions.
Why this case matters
An offline model of wheel compatibility admission, suitable for testing build and release tooling without external services.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(wheel, python, abis, platforms, version):
return (not wheel['yanked'] and bool(set(wheel['python']) & (set(python) | {'py3'})) and bool(set(wheel['abi']) & (set(abis) | {'none'})) and True and version >= wheel['minimum'])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 2', solve({'yanked': True, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
check('fixture 3', solve({'yanked': False, 'python': ['py3'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 4', solve({'yanked': False, 'python': ['cp312'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
check('fixture 5', solve({'yanked': False, 'python': ['cp311'], 'abi': ['none'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 6', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp312'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
check('fixture 7', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['any'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 8', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['win'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
check('fixture 9', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 10)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 10', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 12)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | True | True | Passed |
| fixture 2 | False | False | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | False | False | Passed |
| fixture 5 | True | True | Passed |
| fixture 6 | False | False | Passed |
| fixture 7 | True | True | Passed |
| fixture 8 | True | False | Failed |
| fixture 9 | True | True | Passed |
| fixture 10 | False | False | Passed |
SHA-256 / 6f3bd34c138a70678db6136e465a2364b90fa8b4fa252ead6c6abe793718e394
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(wheel, python, abis, platforms, version):
return (not wheel['yanked'] and bool(set(wheel['python']) & (set(python) | {'py3'})) and bool(set(wheel['abi']) & (set(abis) | {'none'})) and bool(set(wheel['platform']) & set(platforms)) and version >= wheel['minimum'])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 2', solve({'yanked': True, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
check('fixture 3', solve({'yanked': False, 'python': ['py3'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 4', solve({'yanked': False, 'python': ['cp312'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
check('fixture 5', solve({'yanked': False, 'python': ['cp311'], 'abi': ['none'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 6', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp312'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
check('fixture 7', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['any'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 8', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['win'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
check('fixture 9', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 10)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 10', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 12)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | True | True | Passed |
| fixture 2 | False | False | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | False | False | Passed |
| fixture 5 | True | True | Passed |
| fixture 6 | False | False | Passed |
| fixture 7 | False | True | Failed |
| fixture 8 | False | False | Passed |
| fixture 9 | True | True | Passed |
| fixture 10 | False | False | Passed |
SHA-256 / 6d41aefc9ffa4951b5357442cfd8f7d52478ec3cba10459efe0642c7dbd7175f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(wheel, python, abis, platforms, version):
return (not wheel['yanked'] and bool(set(wheel['python']) & (set(python) | {'py3'})) and bool(set(wheel['abi']) & (set(abis) | {'none'})) and bool(set(wheel['platform']) & (set(platforms) | {'any'})) and version >= wheel['minimum'])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 2', solve({'yanked': True, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
check('fixture 3', solve({'yanked': False, 'python': ['py3'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 4', solve({'yanked': False, 'python': ['cp312'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
check('fixture 5', solve({'yanked': False, 'python': ['cp311'], 'abi': ['none'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 6', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp312'], 'platform': ['linux'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
check('fixture 7', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['any'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 8', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['win'], 'minimum': (3, 11)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
check('fixture 9', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 10)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), True)
check('fixture 10', solve({'yanked': False, 'python': ['cp311'], 'abi': ['cp311'], 'platform': ['linux'], 'minimum': (3, 12)}, ['cp311'], ['cp311'], ['linux'], (3, 11)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | True | True | Passed |
| fixture 2 | False | False | Passed |
| fixture 3 | True | True | Passed |
| fixture 4 | False | False | Passed |
| fixture 5 | True | True | Passed |
| fixture 6 | False | False | Passed |
| fixture 7 | True | True | Passed |
| fixture 8 | False | False | Passed |
| fixture 9 | True | True | Passed |
| fixture 10 | False | False | Passed |
SHA-256 / 53f34d0ee272132809003bdc4b8964e7c79eaa0130e806af2554540e33a6f88e
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:38:33.549241+00:00.
Case digest / c4099905eadb4a4d5e7975829f9aaa80504d3bcf8b8a51b72bf4bf75cb4adf9a