FAILURE MAP
← Case archive

FA-24781 / Client state / Open access

Workspace draft eviction discards unsaved work to meet a retention cap · case 01

Workspace draft eviction discards unsaved work to meet a retention cap.

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

ROOT CAUSE

The faulty implementation violates Retention preserves every dirty workspace draft even above capacity, then fills any remaining slots with the most recently visited clean drafts while preserving source order.

THE FAILURE

The faulty implementation violates Retention preserves every dirty workspace draft even above capacity, then fills any remaining slots with the most recently visited clean drafts while preserving source order.

Unsuccessful approach: The partial repair still violates at least one explicit regression oracle.

Case contract

Retention preserves every dirty workspace draft even above capacity, then fills any remaining slots with the most recently visited clean drafts while preserving source order.

Why this case matters

A bounded offline client-state transition with explicit lifecycle inputs.

1 / The failure

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

N = 1
observations = []
def solve(drafts, capacity):
    return drafts[-capacity:]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('dirty older than clean', solve([('dirty',True),('a',False),('b',False)],2), [('dirty',True),('b',False)])
check('dirty exceeds cap', solve([('a',True),('b',True)],1), [('a',True),('b',True)])
check('zero cap keeps dirty', solve([('a',False),('b',True)],0), [('b',True)])
check('all clean newest', solve([('a',False),('b',False)],1), [('b',False)])
check('empty', solve([],2), [])
check('parameterized clean cap', solve([(str(i),False) for i in range(N+2)],N), [(str(i),False) for i in range(2,N+2)])
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
dirty older than clean[['a', False], ['b', False]][['dirty', True], ['b', False]]Failed
dirty exceeds cap[['b', True]][['a', True], ['b', True]]Failed
zero cap keeps dirty[['a', False], ['b', True]][['b', True]]Failed
all clean newest[['b', False]][['b', False]]Passed
empty[][]Passed
parameterized clean cap[['2', False]][['2', False]]Passed

SHA-256 / 25e892afab05c709b6f806111daee10067c52bbfe38f8fce63782cbd533ddb37

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(drafts, capacity):
    return [x for x in drafts if x[1]][-capacity:]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('dirty older than clean', solve([('dirty',True),('a',False),('b',False)],2), [('dirty',True),('b',False)])
check('dirty exceeds cap', solve([('a',True),('b',True)],1), [('a',True),('b',True)])
check('zero cap keeps dirty', solve([('a',False),('b',True)],0), [('b',True)])
check('all clean newest', solve([('a',False),('b',False)],1), [('b',False)])
check('empty', solve([],2), [])
check('parameterized clean cap', solve([(str(i),False) for i in range(N+2)],N), [(str(i),False) for i in range(2,N+2)])
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
dirty older than clean[['dirty', True]][['dirty', True], ['b', False]]Failed
dirty exceeds cap[['b', True]][['a', True], ['b', True]]Failed
zero cap keeps dirty[['b', True]][['b', True]]Passed
all clean newest[][['b', False]]Failed
empty[][]Passed
parameterized clean cap[][['2', False]]Failed

SHA-256 / 1f9d521df604c30676f48e99dc03f8997c053c0677982f27a8dc5a8c0e75c976

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 6 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 models the stated application policy only; no browser or framework conformance is claimed. 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:41:00.675064+00:00.

Case digest / e820dbf7c2401d580c5b74364a87167176bdd366f11b6e4f54c0c455c291262e