FA-4336 / Container mutation / Open access
List remove first equal only · case 01
The operation returns a result or retained state that violates this contract: Remove the first equal value, leaving later equal occurrences intact; missing value is a no-op.
ROOT CAUSE
Filtering by inequality removes every equal value rather than one occurrence.
THE FAILURE
Filtering by inequality removes every equal value rather than one occurrence.
Unsuccessful approach: Removing the last equal value changes the surviving positional order.
Case contract
Remove the first equal value, leaving later equal occurrences intact; missing value is a no-op. 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 != y]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('separated duplicates', solve(['a', 'b', 'a'], 'a'), ['b', 'a'])
check('missing', solve(['a'], 'z'), ['a'])
check('empty', solve([], 'z'), [])
check('only match', solve(['a'], '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 |
|---|---|---|---|
| separated duplicates | ['b'] | ['b', 'a'] | Failed |
| missing | ['a'] | ['a'] | Passed |
| empty | [] | [] | Passed |
| only match | [] | [] | Passed |
SHA-256 / 197432a8948ad59540a45826c89ffa59e1e71877912a0187b1d3d7d53b4da393
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x, y=None):
a=list(x)
if y in a: a.pop(len(a)-1-a[::-1].index(y))
return a
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('separated duplicates', solve(['a', 'b', 'a'], 'a'), ['b', 'a'])
check('missing', solve(['a'], 'z'), ['a'])
check('empty', solve([], 'z'), [])
check('only match', solve(['a'], '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 |
|---|---|---|---|
| separated duplicates | ['a', 'b'] | ['b', 'a'] | Failed |
| missing | ['a'] | ['a'] | Passed |
| empty | [] | [] | Passed |
| only match | [] | [] | Passed |
SHA-256 / dc6ba11c87abe6dd1c92217bc02e2aaeee0fab2051b8e98a4d3cf78020757e2e
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 4 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:38.066045+00:00.
Case digest / 2ab1a549f52cca5185aebe10ae623e8f417812b8dc50b81f14099bbcea8b7443