FAILURE MAP
← Case archive

FA-10251 / Deployment models / Open access

Deployment resource cleanup eligibility: Resources are deleted before their grace deadline · case 01

Resources are deleted before their grace deadline.

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

ROOT CAUSE

The implementation substitutes True for now >= resource['delete_after'], so resources are deleted before their grace deadline.

THE FAILURE

The implementation substitutes True for now >= resource['delete_after'], so resources are deleted before their grace deadline.

Unsuccessful approach: The attempted repair substitutes now > resource['delete_after']. Fixture 1 still yields False instead of True.

Case contract

A resource can be deleted only when not desired, owned by this deployment, not protected, no active references, and grace period completed. Grace equality permits cleanup.

Why this case matters

An offline model of deployment resource cleanup eligibility, 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(resource, desired, owner, now):
    return resource['name'] not in desired and resource['owner'] == owner and not resource['protected'] and resource['references'] == 0 and True
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'name': 'x', 'owner': 'app', 'protected': False, 'references': 0, 'delete_after': 10}, [], 'app', 10), True)
check('fixture 2', solve({'name': 'x', 'owner': 'app', 'protected': False, 'references': 0, 'delete_after': 9}, [], 'app', 10), True)
check('fixture 3', solve({'name': 'x', 'owner': 'app', 'protected': False, 'references': 0, 'delete_after': 11}, [], 'app', 10), False)
check('fixture 4', solve({'name': 'x', 'owner': 'app', 'protected': False, 'references': 0, 'delete_after': 10}, ['x'], 'app', 10), False)
check('fixture 5', solve({'name': 'x', 'owner': 'other', 'protected': False, 'references': 0, 'delete_after': 10}, [], 'app', 10), False)
check('fixture 6', solve({'name': 'x', 'owner': 'app', 'protected': True, 'references': 0, 'delete_after': 10}, [], 'app', 10), False)
check('fixture 7', solve({'name': 'x', 'owner': 'app', 'protected': False, 'references': 1, 'delete_after': 10}, [], 'app', 10), False)
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 1TrueTruePassed
fixture 2TrueTruePassed
fixture 3TrueFalseFailed
fixture 4FalseFalsePassed
fixture 5FalseFalsePassed
fixture 6FalseFalsePassed
fixture 7FalseFalsePassed

SHA-256 / b533e7bf4cdf17af87280294360e8a5e282764eb86c5bea81b15bef48aaf54b6

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(resource, desired, owner, now):
    return resource['name'] not in desired and resource['owner'] == owner and not resource['protected'] and resource['references'] == 0 and now > resource['delete_after']
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'name': 'x', 'owner': 'app', 'protected': False, 'references': 0, 'delete_after': 10}, [], 'app', 10), True)
check('fixture 2', solve({'name': 'x', 'owner': 'app', 'protected': False, 'references': 0, 'delete_after': 9}, [], 'app', 10), True)
check('fixture 3', solve({'name': 'x', 'owner': 'app', 'protected': False, 'references': 0, 'delete_after': 11}, [], 'app', 10), False)
check('fixture 4', solve({'name': 'x', 'owner': 'app', 'protected': False, 'references': 0, 'delete_after': 10}, ['x'], 'app', 10), False)
check('fixture 5', solve({'name': 'x', 'owner': 'other', 'protected': False, 'references': 0, 'delete_after': 10}, [], 'app', 10), False)
check('fixture 6', solve({'name': 'x', 'owner': 'app', 'protected': True, 'references': 0, 'delete_after': 10}, [], 'app', 10), False)
check('fixture 7', solve({'name': 'x', 'owner': 'app', 'protected': False, 'references': 1, 'delete_after': 10}, [], 'app', 10), False)
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 1FalseTrueFailed
fixture 2TrueTruePassed
fixture 3FalseFalsePassed
fixture 4FalseFalsePassed
fixture 5FalseFalsePassed
fixture 6FalseFalsePassed
fixture 7FalseFalsePassed

SHA-256 / a2cc9d5b3209edacb1c6cf25072abdef376d000c6735da7e1cece9ea65f16585

HELD IN THE MEMBER ARCHIVE

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

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

Case digest / b5c468a7e25b4397f61012211ebfda7653e016262fa268a303a66876a0cca8e3