FA-4556 / Iterator consumption / Open access
Filterfalse inverts predicate · case 01
The operation returns a result or retained state that violates this contract: Retain values unequal to the sentinel, including other falsy values.
ROOT CAUSE
The predicate is used directly rather than inverted.
THE FAILURE
The predicate is used directly rather than inverted.
Unsuccessful approach: A truthiness condition rejects valid falsy values unrelated to the sentinel.
Case contract
Retain values unequal to the sentinel, including other falsy values. 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
import itertools as it
from collections import deque
N = 1
observations = []
def solve(x, y=None):
return list(filter(lambda v:v==y,x))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('sentinel removed', solve(['a', 's', 'b'], 's'), ['a', 'b'])
check('falsy retained', solve([None, 's', ''], 's'), [None, ''])
check('all removed', solve(['s', 's'], 's'), [])
check('empty', solve([], 's'), [])
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 |
|---|---|---|---|
| sentinel removed | ['s'] | ['a', 'b'] | Failed |
| falsy retained | ['s'] | [None, ''] | Failed |
| all removed | ['s', 's'] | [] | Failed |
| empty | [] | [] | Passed |
SHA-256 / ff1d0139553cf3e76f2279d6feba937f4f1be8d0934257d744829a05f8736fc6
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import itertools as it
from collections import deque
N = 1
observations = []
def solve(x, y=None):
return [v for v in x if v and v!=y]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('sentinel removed', solve(['a', 's', 'b'], 's'), ['a', 'b'])
check('falsy retained', solve([None, 's', ''], 's'), [None, ''])
check('all removed', solve(['s', 's'], 's'), [])
check('empty', solve([], 's'), [])
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 |
|---|---|---|---|
| sentinel removed | ['a', 'b'] | ['a', 'b'] | Passed |
| falsy retained | [] | [None, ''] | Failed |
| all removed | [] | [] | Passed |
| empty | [] | [] | Passed |
SHA-256 / 72891d0b09686d1638e44f4fd989acaf5633e5d3ccb180a4f2315724f2b3d6d5
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:40.530037+00:00.
Case digest / b6fa90502d8eb34acd738ba0f4c7a4a4274e08360b7aaa68f566c7988d7c40a1