FA-10181 / Deployment models / Open access
Release retention selection: The active release can be garbage-collected · case 01
The active release can be garbage-collected.
ROOT CAUSE
The implementation substitutes keep = set(pinned) for keep = {active} | set(pinned), so the active release can be garbage-collected.
VERIFIED REPAIR
Always retain the active revision.
Unsuccessful approach: The attempted repair substitutes keep = {active} & set(pinned). Fixture 1 still yields [] instead of [1].
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 = 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [] | [1] | Failed |
| fixture 2 | [1, 2] | [1, 2, 4] | Failed |
| fixture 3 | [3] | [2, 3] | Failed |
| fixture 4 | [3] | [1, 3] | Failed |
| fixture 5 | [1] | [1, 3] | Failed |
| fixture 6 | [2, 4] | [2, 3, 4] | Failed |
| fixture 7 | [] | [2] | Failed |
SHA-256 / 7cf98406a4b2a6bc6243221c12849d6ee453461a4ced0af93521281ebb63dab8
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)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [] | [1] | Failed |
| fixture 2 | [] | [1, 2, 4] | Failed |
| fixture 3 | [3] | [2, 3] | Failed |
| fixture 4 | [3] | [1, 3] | Failed |
| fixture 5 | [] | [1, 3] | Failed |
| fixture 6 | [4] | [2, 3, 4] | Failed |
| fixture 7 | [] | [2] | Failed |
SHA-256 / 5e553417c627fac09c49d8ed6003be860d740fcfa69fb1054105a27f8bc47f89
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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.622925+00:00.
Case digest / 79131684847a7795b85951ec0a813e07b434845892f360a6561d780960733935