FA-4241 / Collection algebra / Open access
Stable set intersection · case 01
The operation returns a result or retained state that violates this contract: Return unique left values also present in right, preserving left first-appearance order.
ROOT CAUSE
The output preserves duplicate left occurrences despite set semantics.
THE FAILURE
The output preserves duplicate left occurrences despite set semantics.
Unsuccessful approach: Taking right encounter order changes the required left-side ordering.
Case contract
Return unique left values also present in right, preserving left first-appearance order. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.
Why this case matters
A controlled local-runtime regression for collection APIs, language semantics, or ownership wrappers. Fixtures include boundary and interaction cases.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x, y=None):
return [v for v in x if v in y]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('both empty', solve([], []), [])
check('empty right operand', solve(['a'], []), [])
check('empty left operand', solve([], ['b']), [])
check('overlap and multiplicity', solve(['b', 'a', 'b'], ['b', 'c', 'c']), ['b'])
check('operand ordering differs', solve(['b','a'], ['a','b']), ['b','a'])
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 |
|---|---|---|---|
| both empty | [] | [] | Passed |
| empty right operand | [] | [] | Passed |
| empty left operand | [] | [] | Passed |
| overlap and multiplicity | ['b', 'b'] | ['b'] | Failed |
| operand ordering differs | ['b', 'a'] | ['b', 'a'] | Passed |
SHA-256 / f6928380137c646d15ec0ff62ff6fe5bcb3ea8df39d2cf14efd15217de9b9fbe
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x, y=None):
return [v for v in dict.fromkeys(y) if v in x]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('both empty', solve([], []), [])
check('empty right operand', solve(['a'], []), [])
check('empty left operand', solve([], ['b']), [])
check('overlap and multiplicity', solve(['b', 'a', 'b'], ['b', 'c', 'c']), ['b'])
check('operand ordering differs', solve(['b','a'], ['a','b']), ['b','a'])
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 |
|---|---|---|---|
| both empty | [] | [] | Passed |
| empty right operand | [] | [] | Passed |
| empty left operand | [] | [] | Passed |
| overlap and multiplicity | ['b'] | ['b'] | Passed |
| operand ordering differs | ['a', 'b'] | ['b', 'a'] | Failed |
SHA-256 / d036586e7dc3431b7364a4b02c84ece38b492bed2fa57265ab650bcb8124d6a2
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:37:37.141408+00:00.
Case digest / df0bbd7f59519b75cc8836908baeea9678f1d98faa11e4a0543bf7aa9f1f6132