FAILURE MAP
← Case archive

FA-9861 / Packaging / Open access

Package file manifest selection: Force-included files remain excluded · case 01

Force-included files remain excluded.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The implementation substitutes | set() for | set(forced), so force-included files remain excluded.

VERIFIED REPAIR

Union forced files after ordinary exclusions.

Unsuccessful approach: The attempted repair substitutes & set(forced). Fixture 2 still yields [] 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()
    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 fixtureActualExpectedOutcome
fixture 1[][]Passed
fixture 2['a']['a']Passed
fixture 3['a']['a', 'b']Failed
fixture 4['a']['a']Passed
fixture 5['a']['a']Passed
fixture 6['a', 'z']['a', 'z']Passed

SHA-256 / ca71d90ede815089cfcfc61dfe8aec6de9d4d40ddae10feff608a813c7786a66

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 fixtureActualExpectedOutcome
fixture 1[][]Passed
fixture 2[]['a']Failed
fixture 3[]['a', 'b']Failed
fixture 4[]['a']Failed
fixture 5[]['a']Failed
fixture 6[]['a', 'z']Failed

SHA-256 / e6b6596116e0b21cee05231c766f5dec5e79d54fa8600b9ef03641a0aa3347ef

3 / The verified repair

Exit 0
"""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 fixtureActualExpectedOutcome
fixture 1[][]Passed
fixture 2['a']['a']Passed
fixture 3['a', 'b']['a', 'b']Passed
fixture 4['a']['a']Passed
fixture 5['a']['a']Passed
fixture 6['a', 'z']['a', 'z']Passed

SHA-256 / a2e0ca92cbfa58fa99bfadde4276acfcfb0cc962c491df3311219a945bffcdfc

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.656072+00:00.

Case digest / a9dc645642762afcfe359802e3e35f0b5d3e3f47c91d23b3f59f68b4742a3ee4