FA-9886 / Packaging / Open access
Installed distribution record validation: Unexpected installed files pass validation · case 01
Unexpected installed files pass validation.
ROOT CAUSE
The implementation substitutes [] for sorted(set(installed)-set(manifest)), so unexpected installed files pass validation.
THE FAILURE
The implementation substitutes [] for sorted(set(installed)-set(manifest)), so unexpected installed files pass validation.
Unsuccessful approach: The attempted repair substitutes sorted(set(manifest)-set(installed)). Fixture 2 still yields {'missing': ['a'], 'extra': ['a'], 'digest': [], 'size': [], 'executable': []} instead of {'missing': ['a'], 'extra': [], 'digest': [], 'size': [], 'executable': []}.
Case contract
Report missing files, unexpected files, digest mismatches, size mismatches, and forbidden executables independently. Metadata is a digest-size-executable tuple.
Why this case matters
An offline model of installed distribution record validation, 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(manifest, installed, executable_allowed):
common = set(manifest) & set(installed)
return {'missing': sorted(set(manifest)-set(installed)), 'extra': [], 'digest': sorted(k for k in common if manifest[k][0] != installed[k][0]), 'size': sorted(k for k in common if manifest[k][1] != installed[k][1]), 'executable': sorted(k for k in installed if installed[k][2] and k not in executable_allowed)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, {}, []), {'missing': [], 'extra': [], 'digest': [], 'size': [], 'executable': []})
check('fixture 2', solve({'a': ('x', 1, False)}, {}, []), {'missing': ['a'], 'extra': [], 'digest': [], 'size': [], 'executable': []})
check('fixture 3', solve({}, {'a': ('x', 1, False)}, []), {'missing': [], 'extra': ['a'], 'digest': [], 'size': [], 'executable': []})
check('fixture 4', solve({'a': ('x', 1, False)}, {'a': ('y', 1, False)}, []), {'missing': [], 'extra': [], 'digest': ['a'], 'size': [], 'executable': []})
check('fixture 5', solve({'a': ('x', 1, False)}, {'a': ('x', 2, False)}, []), {'missing': [], 'extra': [], 'digest': [], 'size': ['a'], 'executable': []})
check('fixture 6', solve({'a': ('x', 1, False)}, {'a': ('x', 1, True)}, []), {'missing': [], 'extra': [], 'digest': [], 'size': [], 'executable': ['a']})
check('fixture 7', solve({'a': ('x', 1, False)}, {'a': ('x', 1, True)}, ['a']), {'missing': [], 'extra': [], 'digest': [], 'size': [], 'executable': []})
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 | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': []} | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': []} | Passed |
| fixture 2 | {'digest': [], 'executable': [], 'extra': [], 'missing': ['a'], 'size': []} | {'digest': [], 'executable': [], 'extra': [], 'missing': ['a'], 'size': []} | Passed |
| fixture 3 | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': []} | {'digest': [], 'executable': [], 'extra': ['a'], 'missing': [], 'size': []} | Failed |
| fixture 4 | {'digest': ['a'], 'executable': [], 'extra': [], 'missing': [], 'size': []} | {'digest': ['a'], 'executable': [], 'extra': [], 'missing': [], 'size': []} | Passed |
| fixture 5 | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': ['a']} | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': ['a']} | Passed |
| fixture 6 | {'digest': [], 'executable': ['a'], 'extra': [], 'missing': [], 'size': []} | {'digest': [], 'executable': ['a'], 'extra': [], 'missing': [], 'size': []} | Passed |
| fixture 7 | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': []} | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': []} | Passed |
SHA-256 / 029e515edc88edcc4d049dbde1b83dcf44943d1bce5b0ea0faa3550efcc21e0c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(manifest, installed, executable_allowed):
common = set(manifest) & set(installed)
return {'missing': sorted(set(manifest)-set(installed)), 'extra': sorted(set(manifest)-set(installed)), 'digest': sorted(k for k in common if manifest[k][0] != installed[k][0]), 'size': sorted(k for k in common if manifest[k][1] != installed[k][1]), 'executable': sorted(k for k in installed if installed[k][2] and k not in executable_allowed)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, {}, []), {'missing': [], 'extra': [], 'digest': [], 'size': [], 'executable': []})
check('fixture 2', solve({'a': ('x', 1, False)}, {}, []), {'missing': ['a'], 'extra': [], 'digest': [], 'size': [], 'executable': []})
check('fixture 3', solve({}, {'a': ('x', 1, False)}, []), {'missing': [], 'extra': ['a'], 'digest': [], 'size': [], 'executable': []})
check('fixture 4', solve({'a': ('x', 1, False)}, {'a': ('y', 1, False)}, []), {'missing': [], 'extra': [], 'digest': ['a'], 'size': [], 'executable': []})
check('fixture 5', solve({'a': ('x', 1, False)}, {'a': ('x', 2, False)}, []), {'missing': [], 'extra': [], 'digest': [], 'size': ['a'], 'executable': []})
check('fixture 6', solve({'a': ('x', 1, False)}, {'a': ('x', 1, True)}, []), {'missing': [], 'extra': [], 'digest': [], 'size': [], 'executable': ['a']})
check('fixture 7', solve({'a': ('x', 1, False)}, {'a': ('x', 1, True)}, ['a']), {'missing': [], 'extra': [], 'digest': [], 'size': [], 'executable': []})
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 | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': []} | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': []} | Passed |
| fixture 2 | {'digest': [], 'executable': [], 'extra': ['a'], 'missing': ['a'], 'size': []} | {'digest': [], 'executable': [], 'extra': [], 'missing': ['a'], 'size': []} | Failed |
| fixture 3 | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': []} | {'digest': [], 'executable': [], 'extra': ['a'], 'missing': [], 'size': []} | Failed |
| fixture 4 | {'digest': ['a'], 'executable': [], 'extra': [], 'missing': [], 'size': []} | {'digest': ['a'], 'executable': [], 'extra': [], 'missing': [], 'size': []} | Passed |
| fixture 5 | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': ['a']} | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': ['a']} | Passed |
| fixture 6 | {'digest': [], 'executable': ['a'], 'extra': [], 'missing': [], 'size': []} | {'digest': [], 'executable': ['a'], 'extra': [], 'missing': [], 'size': []} | Passed |
| fixture 7 | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': []} | {'digest': [], 'executable': [], 'extra': [], 'missing': [], 'size': []} | Passed |
SHA-256 / 132efafc3a3793aa4b44886be4b99c02b0ea945f73c85c178bbfe85c959eb510
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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:34.158435+00:00.
Case digest / 58e02d4e1992e598b95d3ed957751f191556074cd65ae615bd3253bdb77d278a