FA-7956 / Selection controls / Open access
Anchored range selection: Clicking a removed item clears a valid selection · case 01
Clicking a removed item clears a valid selection.
ROOT CAUSE
The missing target operation uses `return []` where the contract requires `return sorted(selected)`.
THE FAILURE
The missing target operation uses `return []` where the contract requires `return sorted(selected)`.
Unsuccessful approach: Adding a removed target introduces a nonexistent selection.
Case contract
Ranges include both endpoints in document order; plain clicks replace; additive selection unions; missing targets preserve selection.
Why this case matters
A deterministic model of anchored range selection; 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(items, selected, anchor, target, extend, additive):
if target not in items: return []
if not extend or anchor not in items: span = {target}
else:
a, b = sorted((items.index(anchor), items.index(target)))
span = set(items[a:b+1])
return sorted(set(selected) | span if additive else span)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('removed', solve(['a','b'], ['a'], 'a', 'x', False, False), ['a'])
check('plain', solve(['a','b','c'], ['a'], 'a', 'c', False, False), ['c'])
check('forward', solve(['a','b','c'], [], 'a', 'c', True, False), ['a', 'b', 'c'])
check('backward', solve(['a','b','c'], [], 'c', 'a', True, False), ['a', 'b', 'c'])
check('union', solve(['a','b','c'], ['a'], 'b', 'c', True, True), ['a', 'b', 'c'])
check('replace', solve(['a','b','c'], ['a'], 'b', 'c', True, False), ['b', 'c'])
check('parameterized inclusive range', solve(list(range(N+2)), [], 0, N, True, False), list(range(N+1)))
for repetition in range(N):
check('repeat replace', solve(['a','b','c'], ['a'], 'b', 'c', True, False), ['b', 'c'])
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 |
|---|---|---|---|
| removed | [] | ['a'] | Failed |
| plain | ['c'] | ['c'] | Passed |
| forward | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| backward | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| union | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| replace | ['b', 'c'] | ['b', 'c'] | Passed |
| parameterized inclusive range | [0, 1] | [0, 1] | Passed |
| repeat replace | ['b', 'c'] | ['b', 'c'] | Passed |
SHA-256 / a6af63f73a0d88dcbb4ec9112bcc112a509d5d1c82f78f7ba24d15bff409a10a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(items, selected, anchor, target, extend, additive):
if target not in items: return sorted(set(selected) | {target})
if not extend or anchor not in items: span = {target}
else:
a, b = sorted((items.index(anchor), items.index(target)))
span = set(items[a:b+1])
return sorted(set(selected) | span if additive else span)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('removed', solve(['a','b'], ['a'], 'a', 'x', False, False), ['a'])
check('plain', solve(['a','b','c'], ['a'], 'a', 'c', False, False), ['c'])
check('forward', solve(['a','b','c'], [], 'a', 'c', True, False), ['a', 'b', 'c'])
check('backward', solve(['a','b','c'], [], 'c', 'a', True, False), ['a', 'b', 'c'])
check('union', solve(['a','b','c'], ['a'], 'b', 'c', True, True), ['a', 'b', 'c'])
check('replace', solve(['a','b','c'], ['a'], 'b', 'c', True, False), ['b', 'c'])
check('parameterized inclusive range', solve(list(range(N+2)), [], 0, N, True, False), list(range(N+1)))
for repetition in range(N):
check('repeat replace', solve(['a','b','c'], ['a'], 'b', 'c', True, False), ['b', 'c'])
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 |
|---|---|---|---|
| removed | ['a', 'x'] | ['a'] | Failed |
| plain | ['c'] | ['c'] | Passed |
| forward | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| backward | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| union | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| replace | ['b', 'c'] | ['b', 'c'] | Passed |
| parameterized inclusive range | [0, 1] | [0, 1] | Passed |
| repeat replace | ['b', 'c'] | ['b', 'c'] | Passed |
SHA-256 / f290219bc4204b39e9216ae96d61ad77ce08255ec741e604209c645253705e35
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:17.048216+00:00.
Case digest / 6f4e30105e40657666ee6903060695e4c26c761857982bbb3d8162de45ac6b6e