FA-9236 / Packaging / Open access
Artifact identity tuple: Patch versions collide · case 01
Patch versions collide.
ROOT CAUSE
The implementation substitutes tuple(version[:2]) for tuple(version), so patch versions collide.
THE FAILURE
The implementation substitutes tuple(version[:2]) for tuple(version), so patch versions collide.
Unsuccessful approach: The attempted repair substitutes tuple(version[:1]). Fixture 1 still yields ('my-pkg', (1,), 'cp311', 'debug', None) instead of ('my-pkg', (1, 2, 3), 'cp311', 'debug', None).
Case contract
An artifact identity consists of project, version tuple, target ABI, build flavor, and optional classifier; preserve all fields including empty classifier.
Why this case matters
An offline model of artifact identity tuple, 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(project, version, abi, flavor, classifier):
return (project.casefold().replace('_', '-'), tuple(version[:2]), abi, flavor, classifier)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('My_Pkg', (1, 2, 3), 'cp311', 'debug', None), ('my-pkg', (1, 2, 3), 'cp311', 'debug', None))
check('fixture 2', solve('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'), ('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'))
check('fixture 3', solve('A_B', (2, 0, 1), 'abi3', 'release', ''), ('a-b', (2, 0, 1), 'abi3', 'release', ''))
check('fixture 4', solve('A_B', (2, 0, 2), 'abi3', 'debug', 'docs'), ('a-b', (2, 0, 2), 'abi3', 'debug', 'docs'))
check('fixture 5', solve('a_b', (2, 1, 0), 'none', 'release', None), ('a-b', (2, 1, 0), 'none', 'release', None))
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 | ['my-pkg', [1, 2], 'cp311', 'debug', None] | ['my-pkg', [1, 2, 3], 'cp311', 'debug', None] | Failed |
| fixture 2 | ['my-pkg', [1, 2], 'cp312', 'release', 'tests'] | ['my-pkg', [1, 2, 3], 'cp312', 'release', 'tests'] | Failed |
| fixture 3 | ['a-b', [2, 0], 'abi3', 'release', ''] | ['a-b', [2, 0, 1], 'abi3', 'release', ''] | Failed |
| fixture 4 | ['a-b', [2, 0], 'abi3', 'debug', 'docs'] | ['a-b', [2, 0, 2], 'abi3', 'debug', 'docs'] | Failed |
| fixture 5 | ['a-b', [2, 1], 'none', 'release', None] | ['a-b', [2, 1, 0], 'none', 'release', None] | Failed |
SHA-256 / 3126cae1bc50bab6b2a8eead62707baade1ef48bd795748dfbb963c058237038
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(project, version, abi, flavor, classifier):
return (project.casefold().replace('_', '-'), tuple(version[:1]), abi, flavor, classifier)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('My_Pkg', (1, 2, 3), 'cp311', 'debug', None), ('my-pkg', (1, 2, 3), 'cp311', 'debug', None))
check('fixture 2', solve('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'), ('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'))
check('fixture 3', solve('A_B', (2, 0, 1), 'abi3', 'release', ''), ('a-b', (2, 0, 1), 'abi3', 'release', ''))
check('fixture 4', solve('A_B', (2, 0, 2), 'abi3', 'debug', 'docs'), ('a-b', (2, 0, 2), 'abi3', 'debug', 'docs'))
check('fixture 5', solve('a_b', (2, 1, 0), 'none', 'release', None), ('a-b', (2, 1, 0), 'none', 'release', None))
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 | ['my-pkg', [1], 'cp311', 'debug', None] | ['my-pkg', [1, 2, 3], 'cp311', 'debug', None] | Failed |
| fixture 2 | ['my-pkg', [1], 'cp312', 'release', 'tests'] | ['my-pkg', [1, 2, 3], 'cp312', 'release', 'tests'] | Failed |
| fixture 3 | ['a-b', [2], 'abi3', 'release', ''] | ['a-b', [2, 0, 1], 'abi3', 'release', ''] | Failed |
| fixture 4 | ['a-b', [2], 'abi3', 'debug', 'docs'] | ['a-b', [2, 0, 2], 'abi3', 'debug', 'docs'] | Failed |
| fixture 5 | ['a-b', [2], 'none', 'release', None] | ['a-b', [2, 1, 0], 'none', 'release', None] | Failed |
SHA-256 / 1e6e14d46784b69f7fd576b900a25a7420d913c5ef3e48367adc76361df39255
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 5 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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:28.406583+00:00.
Case digest / d59fafaed28dc3701bce95e74001227a80109e77bf8dedadd985959b3e645d54