FAILURE MAP
← Case archive

FA-8971 / Filter interfaces / Open access

Filter-chip identity and removal: Clearing one field clears every filter · case 01

Clearing one field clears every filter.

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

ROOT CAUSE

The clear field operation uses `elif event == 'clear-field': chips = []` where the contract requires `elif event == 'clear-field': chips = [(f,v) for f,v in chips if f != field]`.

VERIFIED REPAIR

Implement the clear field operation as `elif event == 'clear-field': chips = [(f,v) for f,v in chips if f != field]`.

Unsuccessful approach: Keeping only the target field retains exactly what should be removed.

Case contract

Chip identity includes field and value; exclusive replacement clears only that field; removal targets one identity; field clear and global clear have distinct scope.

Why this case matters

A deterministic model of filter-chip identity and removal; this isolates one interface invariant without requiring a browser.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(chips, event, field, value, exclusive):
    chips = list(chips)
    if event == 'add':
        if (field,value) in chips: return chips
        if exclusive: chips = [(f,v) for f,v in chips if f != field]
        chips.append((field,value))
    elif event == 'remove': chips = [(f,v) for f,v in chips if (f,v) != (field,value)]
    elif event == 'clear-field': chips = []
    elif event == 'clear-all': chips = []
    return chips
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('cross field', solve([('color','red')], 'add', 'tag', 'red', False), [('color', 'red'), ('tag', 'red')])
check('duplicate', solve([('color','red')], 'add', 'color', 'red', False), [('color', 'red')])
check('exclusive', solve([('color','red'),('tag','new')], 'add', 'color', 'blue', True), [('tag', 'new'), ('color', 'blue')])
check('remove identity', solve([('color','red'),('color','blue'),('tag','red')], 'remove', 'color', 'red', False), [('color', 'blue'), ('tag', 'red')])
check('clear field', solve([('color','red'),('tag','new')], 'clear-field', 'color', None, False), [('tag', 'new')])
check('clear all', solve([('color','red'),('tag','new')], 'clear-all', 'color', None, False), [])
check('parameterized filter criterion', solve([],'add','field',str(N),False), [('field',str(N))])
for repetition in range(N):
    check('repeat clear all', solve([('color','red'),('tag','new')], 'clear-all', 'color', None, False), [])
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
cross field[['color', 'red'], ['tag', 'red']][['color', 'red'], ['tag', 'red']]Passed
duplicate[['color', 'red']][['color', 'red']]Passed
exclusive[['tag', 'new'], ['color', 'blue']][['tag', 'new'], ['color', 'blue']]Passed
remove identity[['color', 'blue'], ['tag', 'red']][['color', 'blue'], ['tag', 'red']]Passed
clear field[][['tag', 'new']]Failed
clear all[][]Passed
parameterized filter criterion[['field', '1']][['field', '1']]Passed
repeat clear all[][]Passed

SHA-256 / 25c2cc53e1ef1838d279d7a659c3f4a7f6fdb608f946d611ee7820ebe795cc54

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(chips, event, field, value, exclusive):
    chips = list(chips)
    if event == 'add':
        if (field,value) in chips: return chips
        if exclusive: chips = [(f,v) for f,v in chips if f != field]
        chips.append((field,value))
    elif event == 'remove': chips = [(f,v) for f,v in chips if (f,v) != (field,value)]
    elif event == 'clear-field': chips = [(f,v) for f,v in chips if f == field]
    elif event == 'clear-all': chips = []
    return chips
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('cross field', solve([('color','red')], 'add', 'tag', 'red', False), [('color', 'red'), ('tag', 'red')])
check('duplicate', solve([('color','red')], 'add', 'color', 'red', False), [('color', 'red')])
check('exclusive', solve([('color','red'),('tag','new')], 'add', 'color', 'blue', True), [('tag', 'new'), ('color', 'blue')])
check('remove identity', solve([('color','red'),('color','blue'),('tag','red')], 'remove', 'color', 'red', False), [('color', 'blue'), ('tag', 'red')])
check('clear field', solve([('color','red'),('tag','new')], 'clear-field', 'color', None, False), [('tag', 'new')])
check('clear all', solve([('color','red'),('tag','new')], 'clear-all', 'color', None, False), [])
check('parameterized filter criterion', solve([],'add','field',str(N),False), [('field',str(N))])
for repetition in range(N):
    check('repeat clear all', solve([('color','red'),('tag','new')], 'clear-all', 'color', None, False), [])
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
cross field[['color', 'red'], ['tag', 'red']][['color', 'red'], ['tag', 'red']]Passed
duplicate[['color', 'red']][['color', 'red']]Passed
exclusive[['tag', 'new'], ['color', 'blue']][['tag', 'new'], ['color', 'blue']]Passed
remove identity[['color', 'blue'], ['tag', 'red']][['color', 'blue'], ['tag', 'red']]Passed
clear field[['color', 'red']][['tag', 'new']]Failed
clear all[][]Passed
parameterized filter criterion[['field', '1']][['field', '1']]Passed
repeat clear all[][]Passed

SHA-256 / f961e667d2b6583056382df8bce1c22e64b1f678a6021a3795374fb3dccaba56

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(chips, event, field, value, exclusive):
    chips = list(chips)
    if event == 'add':
        if (field,value) in chips: return chips
        if exclusive: chips = [(f,v) for f,v in chips if f != field]
        chips.append((field,value))
    elif event == 'remove': chips = [(f,v) for f,v in chips if (f,v) != (field,value)]
    elif event == 'clear-field': chips = [(f,v) for f,v in chips if f != field]
    elif event == 'clear-all': chips = []
    return chips
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('cross field', solve([('color','red')], 'add', 'tag', 'red', False), [('color', 'red'), ('tag', 'red')])
check('duplicate', solve([('color','red')], 'add', 'color', 'red', False), [('color', 'red')])
check('exclusive', solve([('color','red'),('tag','new')], 'add', 'color', 'blue', True), [('tag', 'new'), ('color', 'blue')])
check('remove identity', solve([('color','red'),('color','blue'),('tag','red')], 'remove', 'color', 'red', False), [('color', 'blue'), ('tag', 'red')])
check('clear field', solve([('color','red'),('tag','new')], 'clear-field', 'color', None, False), [('tag', 'new')])
check('clear all', solve([('color','red'),('tag','new')], 'clear-all', 'color', None, False), [])
check('parameterized filter criterion', solve([],'add','field',str(N),False), [('field',str(N))])
for repetition in range(N):
    check('repeat clear all', solve([('color','red'),('tag','new')], 'clear-all', 'color', None, False), [])
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
cross field[['color', 'red'], ['tag', 'red']][['color', 'red'], ['tag', 'red']]Passed
duplicate[['color', 'red']][['color', 'red']]Passed
exclusive[['tag', 'new'], ['color', 'blue']][['tag', 'new'], ['color', 'blue']]Passed
remove identity[['color', 'blue'], ['tag', 'red']][['color', 'blue'], ['tag', 'red']]Passed
clear field[['tag', 'new']][['tag', 'new']]Passed
clear all[][]Passed
parameterized filter criterion[['field', '1']][['field', '1']]Passed
repeat clear all[][]Passed

SHA-256 / 2a4c92dc010790ac8cc27e9f5a3402a8495b184d4ec94aba6e46bad057ac5446

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

Case digest / 25d4fc4da210011f80a45522c1daef810d807c8d26ffefdf51c8ab99e921b0ae