FA-9866 / Packaging / Open access
Package file manifest selection: Missing declared files enter manifests · case 01
Missing declared files enter manifests.
ROOT CAUSE
The implementation substitutes pass for names &= set(available), so missing declared files enter manifests.
THE FAILURE
The implementation substitutes pass for names &= set(available), so missing declared files enter manifests.
Unsuccessful approach: The attempted repair substitutes names |= set(available). Fixture 2 still yields ['a', 'b'] instead of ['a'].
Case contract
Include declared files, exclude forbidden files, retain force-included files despite ordinary exclusions, never include missing files, and sort unique names. Force cannot override forbidden.
Why this case matters
An offline model of package file manifest selection, 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(available, declared, excluded, forced, forbidden):
names = (set(declared) - set(excluded)) | set(forced)
pass
names -= set(forbidden)
return sorted(names)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], [], []), [])
check('fixture 2', solve(['a', 'b'], ['a', 'b'], ['b'], [], []), ['a'])
check('fixture 3', solve(['a', 'b'], ['a'], ['b'], ['b'], []), ['a', 'b'])
check('fixture 4', solve(['a'], ['a', 'missing'], [], [], []), ['a'])
check('fixture 5', solve(['a', 'b'], ['a', 'b'], [], ['b'], ['b']), ['a'])
check('fixture 6', solve(['z', 'a'], ['z', 'a', 'z'], [], [], []), ['a', 'z'])
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 | [] | [] | Passed |
| fixture 2 | ['a'] | ['a'] | Passed |
| fixture 3 | ['a', 'b'] | ['a', 'b'] | Passed |
| fixture 4 | ['a', 'missing'] | ['a'] | Failed |
| fixture 5 | ['a'] | ['a'] | Passed |
| fixture 6 | ['a', 'z'] | ['a', 'z'] | Passed |
SHA-256 / 63430c20be7c237b48be78848ba9cfc3814e4048db5dccdb1b9e7a5eedda2497
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(available, declared, excluded, forced, forbidden):
names = (set(declared) - set(excluded)) | set(forced)
names |= set(available)
names -= set(forbidden)
return sorted(names)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], [], []), [])
check('fixture 2', solve(['a', 'b'], ['a', 'b'], ['b'], [], []), ['a'])
check('fixture 3', solve(['a', 'b'], ['a'], ['b'], ['b'], []), ['a', 'b'])
check('fixture 4', solve(['a'], ['a', 'missing'], [], [], []), ['a'])
check('fixture 5', solve(['a', 'b'], ['a', 'b'], [], ['b'], ['b']), ['a'])
check('fixture 6', solve(['z', 'a'], ['z', 'a', 'z'], [], [], []), ['a', 'z'])
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 | [] | [] | Passed |
| fixture 2 | ['a', 'b'] | ['a'] | Failed |
| fixture 3 | ['a', 'b'] | ['a', 'b'] | Passed |
| fixture 4 | ['a', 'missing'] | ['a'] | Failed |
| fixture 5 | ['a'] | ['a'] | Passed |
| fixture 6 | ['a', 'z'] | ['a', 'z'] | Passed |
SHA-256 / 3d19bb25103e987e9a3259ced47a9424e59e3738b72371b38496938b44affe1b
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 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:33.899861+00:00.
Case digest / e4998e07a510c673ceb66f9ad362b89918825d362fc16a82a95b3bd9fa84fd2b