FAILURE MAP
← Case archive

FA-10186 / Deployment models / Open access

Release retention selection: Explicitly pinned releases are deleted · case 01

Explicitly pinned releases are deleted.

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

ROOT CAUSE

The implementation substitutes keep = {active} for keep = {active} | set(pinned), so explicitly pinned releases are deleted.

VERIFIED REPAIR

Retain every explicitly pinned release.

Unsuccessful approach: The attempted repair substitutes keep = {active} | set(pinned[:1]). Fixture 2 still yields [1, 4] instead of [1, 2, 4].

Case contract

Retain active and explicitly pinned releases regardless of age, retain newest successful unpinned releases up to limit, exclude unsuccessful unpinned releases, and return sorted unique revision IDs.

Why this case matters

An offline model of release retention selection, suitable for testing build and release tooling without external services.

1 / The failure

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

N = 1
observations = []
def solve(releases, active, pinned, limit):
    keep = {active}
    eligible = sorted([number for number, success in releases if success and number not in keep], reverse=True)
    keep.update(eligible[:limit])
    return sorted(keep)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], 1, [], 0), [1])
check('fixture 2', solve([], 4, [1, 2], 0), [1, 2, 4])
check('fixture 3', solve([(1, True), (2, True), (3, True)], 3, [], 1), [2, 3])
check('fixture 4', solve([(1, True), (2, False), (3, True)], 3, [], 1), [1, 3])
check('fixture 5', solve([(1, True), (2, True), (3, True)], 3, [1], 0), [1, 3])
check('fixture 6', solve([(1, True), (2, True), (3, True), (4, True)], 4, [2], 1), [2, 3, 4])
check('fixture 7', solve([(1, True), (2, True)], 2, [], 0), [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
fixture 1[1][1]Passed
fixture 2[4][1, 2, 4]Failed
fixture 3[2, 3][2, 3]Passed
fixture 4[1, 3][1, 3]Passed
fixture 5[3][1, 3]Failed
fixture 6[3, 4][2, 3, 4]Failed
fixture 7[2][2]Passed

SHA-256 / 745ed764f8a621185d87180ab958003ae42f9b9cb9e03da0031ede7542b92b2b

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(releases, active, pinned, limit):
    keep = {active} | set(pinned[:1])
    eligible = sorted([number for number, success in releases if success and number not in keep], reverse=True)
    keep.update(eligible[:limit])
    return sorted(keep)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], 1, [], 0), [1])
check('fixture 2', solve([], 4, [1, 2], 0), [1, 2, 4])
check('fixture 3', solve([(1, True), (2, True), (3, True)], 3, [], 1), [2, 3])
check('fixture 4', solve([(1, True), (2, False), (3, True)], 3, [], 1), [1, 3])
check('fixture 5', solve([(1, True), (2, True), (3, True)], 3, [1], 0), [1, 3])
check('fixture 6', solve([(1, True), (2, True), (3, True), (4, True)], 4, [2], 1), [2, 3, 4])
check('fixture 7', solve([(1, True), (2, True)], 2, [], 0), [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
fixture 1[1][1]Passed
fixture 2[1, 4][1, 2, 4]Failed
fixture 3[2, 3][2, 3]Passed
fixture 4[1, 3][1, 3]Passed
fixture 5[1, 3][1, 3]Passed
fixture 6[2, 3, 4][2, 3, 4]Passed
fixture 7[2][2]Passed

SHA-256 / 84ce52845b832d6a5975f9b6736309f0e22ee0921ac3fb282cf14460b6fcc051

3 / The verified repair

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

N = 1
observations = []
def solve(releases, active, pinned, limit):
    keep = {active} | set(pinned)
    eligible = sorted([number for number, success in releases if success and number not in keep], reverse=True)
    keep.update(eligible[:limit])
    return sorted(keep)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], 1, [], 0), [1])
check('fixture 2', solve([], 4, [1, 2], 0), [1, 2, 4])
check('fixture 3', solve([(1, True), (2, True), (3, True)], 3, [], 1), [2, 3])
check('fixture 4', solve([(1, True), (2, False), (3, True)], 3, [], 1), [1, 3])
check('fixture 5', solve([(1, True), (2, True), (3, True)], 3, [1], 0), [1, 3])
check('fixture 6', solve([(1, True), (2, True), (3, True), (4, True)], 4, [2], 1), [2, 3, 4])
check('fixture 7', solve([(1, True), (2, True)], 2, [], 0), [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
fixture 1[1][1]Passed
fixture 2[1, 2, 4][1, 2, 4]Passed
fixture 3[2, 3][2, 3]Passed
fixture 4[1, 3][1, 3]Passed
fixture 5[1, 3][1, 3]Passed
fixture 6[2, 3, 4][2, 3, 4]Passed
fixture 7[2][2]Passed

SHA-256 / 09ec1ec3899e60247bda85442d4576dab83f29eb220be8fdd5d7c35e1c55b908

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

Case digest / 39f66ff448156040dcff873832fd57a3648f6cb1d1b35219a42974b70e982cc4