FAILURE MAP
← Case archive

FA-8916 / Selection controls / Open access

Rating preview and committed value: Pointer leave erases the committed rating · case 01

Pointer leave erases the committed rating.

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

ROOT CAUSE

The leave operation uses `elif event == 'leave': committed = None` where the contract requires `elif event == 'leave': preview = None`.

THE FAILURE

The leave operation uses `elif event == 'leave': committed = None` where the contract requires `elif event == 'leave': preview = None`.

Unsuccessful approach: Storing committed as preview leaves a stale provisional state.

Case contract

Hover changes preview only; leaving or Escape discards preview; activation commits and clears preview; repeated activation clears only when allowed; readonly ignores interaction and has no preview.

Why this case matters

A deterministic model of rating preview and committed value; 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(committed, preview, event, value, readonly, allow_clear):
    if readonly: return (committed, None)
    if event == 'hover': preview = value
    elif event == 'leave': committed = None
    elif event == 'activate':
        committed = None if allow_clear and value == committed else value
        preview = None
    elif event == 'escape': preview = None
    return (committed, preview)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('readonly', solve(2, 4, 'activate', 5, True, True), (2, None))
check('hover', solve(2, None, 'hover', 4, False, True), (2, 4))
check('leave', solve(2, 4, 'leave', None, False, True), (2, None))
check('locked clear', solve(2, 4, 'activate', 2, False, False), (2, None))
check('change', solve(2, 4, 'activate', 5, False, True), (5, None))
check('clear', solve(2, 4, 'activate', 2, False, True), (None, None))
check('escape', solve(2, 4, 'escape', None, False, True), (2, None))
check('parameterized rating preview', solve(0,None,'hover',N,False,False), (0,N))
for repetition in range(N):
    check('repeat escape', solve(2, 4, 'escape', None, False, True), (2, None))
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
readonly[2, None][2, None]Passed
hover[2, 4][2, 4]Passed
leave[None, 4][2, None]Failed
locked clear[2, None][2, None]Passed
change[5, None][5, None]Passed
clear[None, None][None, None]Passed
escape[2, None][2, None]Passed
parameterized rating preview[0, 1][0, 1]Passed
repeat escape[2, None][2, None]Passed

SHA-256 / e4dd1a63230b1914a28e61c646833632b93e5cd9b87406d6b7020cc25b6a2f30

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(committed, preview, event, value, readonly, allow_clear):
    if readonly: return (committed, None)
    if event == 'hover': preview = value
    elif event == 'leave': preview = committed
    elif event == 'activate':
        committed = None if allow_clear and value == committed else value
        preview = None
    elif event == 'escape': preview = None
    return (committed, preview)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('readonly', solve(2, 4, 'activate', 5, True, True), (2, None))
check('hover', solve(2, None, 'hover', 4, False, True), (2, 4))
check('leave', solve(2, 4, 'leave', None, False, True), (2, None))
check('locked clear', solve(2, 4, 'activate', 2, False, False), (2, None))
check('change', solve(2, 4, 'activate', 5, False, True), (5, None))
check('clear', solve(2, 4, 'activate', 2, False, True), (None, None))
check('escape', solve(2, 4, 'escape', None, False, True), (2, None))
check('parameterized rating preview', solve(0,None,'hover',N,False,False), (0,N))
for repetition in range(N):
    check('repeat escape', solve(2, 4, 'escape', None, False, True), (2, None))
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
readonly[2, None][2, None]Passed
hover[2, 4][2, 4]Passed
leave[2, 2][2, None]Failed
locked clear[2, None][2, None]Passed
change[5, None][5, None]Passed
clear[None, None][None, None]Passed
escape[2, None][2, None]Passed
parameterized rating preview[0, 1][0, 1]Passed
repeat escape[2, None][2, None]Passed

SHA-256 / d645251e0aa865d975035cc7ea081007e0e38c53a2862223bd968e578b811d3e

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 9 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:25.621633+00:00.

Case digest / 90a448fa7724e5698c9f005bb505ecf3db961b9b53d35f68345bcbc2120c04fa