FAILURE MAP
← Case archive

FA-8961 / Filter interfaces / Open access

Filter-chip identity and removal: Replacing an exclusive field clears unrelated filters · case 01

Replacing an exclusive field clears unrelated filters.

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

ROOT CAUSE

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

THE FAILURE

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

Unsuccessful approach: Keeping previous values violates exclusive field selection.

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 = []
        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[['color', 'blue']][['tag', 'new'], ['color', 'blue']]Failed
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 / 4bc95f899da9e84f01a51d10746984d89a81adbc6a311f63f39feb9c201a9384

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 = chips
        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[['color', 'red'], ['tag', 'new'], ['color', 'blue']][['tag', 'new'], ['color', 'blue']]Failed
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 / 12af0c2586435afe4f823a4c7890b393e4f96abca074863d0d5d445e6b0f4030

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 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:38:26.054769+00:00.

Case digest / 90c2701cf9c2422779b366c17b3fb0a6618e26a8e2af342913d1bc082d16b791