FAILURE MAP
← Case archive

FA-10216 / Deployment models / Open access

Environment promotion plan: Identical artifacts require redundant promotion · case 01

Identical artifacts require redundant promotion.

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

ROOT CAUSE

The implementation substitutes if False: return 'unchanged' for if digest == old_digest: return 'unchanged', so identical artifacts require redundant promotion.

VERIFIED REPAIR

Treat equal artifact digests as unchanged before test gating.

Unsuccessful approach: The attempted repair substitutes if version == old_version + 1: return 'unchanged'. Fixture 4 still yields 'untested' instead of 'unchanged'.

Case contract

Reject unknown targets, reject downgrade unless allowed, skip identical digests, reject missing test evidence, otherwise update target to candidate digest and version while preserving other environments.

Why this case matters

An offline model of environment promotion plan, 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(environments, target, version, digest, tested, allow_downgrade):
    if target not in environments: return 'unknown'
    old_version, old_digest = environments[target]
    if version < old_version and not allow_downgrade: return 'downgrade'
    if False: return 'unchanged'
    if not tested: return 'untested'
    result = dict(environments)
    result[target] = (version, digest)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, 'prod', 1, 'a', True, False), 'unknown')
check('fixture 2', solve({'prod': (2, 'b')}, 'prod', 1, 'a', True, False), 'downgrade')
check('fixture 3', solve({'prod': (2, 'b')}, 'prod', 1, 'a', True, True), {'prod': (1, 'a')})
check('fixture 4', solve({'prod': (1, 'a')}, 'prod', 1, 'a', False, False), 'unchanged')
check('fixture 5', solve({'prod': (1, 'a')}, 'prod', 2, 'b', False, False), 'untested')
check('fixture 6', solve({'prod': (1, 'a'), 'stage': (2, 'b')}, 'prod', 2, 'b', True, False), {'prod': (2, 'b'), 'stage': (2, 'b')})
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 1unknownunknownPassed
fixture 2downgradedowngradePassed
fixture 3{'prod': [1, 'a']}{'prod': [1, 'a']}Passed
fixture 4untestedunchangedFailed
fixture 5untesteduntestedPassed
fixture 6{'prod': [2, 'b'], 'stage': [2, 'b']}{'prod': [2, 'b'], 'stage': [2, 'b']}Passed

SHA-256 / dba4e35e9bda07bbadf4bc96f672c5b644ff84927e2a64d560b99305f3d3fa1e

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(environments, target, version, digest, tested, allow_downgrade):
    if target not in environments: return 'unknown'
    old_version, old_digest = environments[target]
    if version < old_version and not allow_downgrade: return 'downgrade'
    if version == old_version + 1: return 'unchanged'
    if not tested: return 'untested'
    result = dict(environments)
    result[target] = (version, digest)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, 'prod', 1, 'a', True, False), 'unknown')
check('fixture 2', solve({'prod': (2, 'b')}, 'prod', 1, 'a', True, False), 'downgrade')
check('fixture 3', solve({'prod': (2, 'b')}, 'prod', 1, 'a', True, True), {'prod': (1, 'a')})
check('fixture 4', solve({'prod': (1, 'a')}, 'prod', 1, 'a', False, False), 'unchanged')
check('fixture 5', solve({'prod': (1, 'a')}, 'prod', 2, 'b', False, False), 'untested')
check('fixture 6', solve({'prod': (1, 'a'), 'stage': (2, 'b')}, 'prod', 2, 'b', True, False), {'prod': (2, 'b'), 'stage': (2, 'b')})
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 1unknownunknownPassed
fixture 2downgradedowngradePassed
fixture 3{'prod': [1, 'a']}{'prod': [1, 'a']}Passed
fixture 4untestedunchangedFailed
fixture 5unchangeduntestedFailed
fixture 6unchanged{'prod': [2, 'b'], 'stage': [2, 'b']}Failed

SHA-256 / fabb6131a0f5504a7d834cfaf477aa264049169a6c0671a8e35fd8d5b98fdf20

3 / The verified repair

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

N = 1
observations = []
def solve(environments, target, version, digest, tested, allow_downgrade):
    if target not in environments: return 'unknown'
    old_version, old_digest = environments[target]
    if version < old_version and not allow_downgrade: return 'downgrade'
    if digest == old_digest: return 'unchanged'
    if not tested: return 'untested'
    result = dict(environments)
    result[target] = (version, digest)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, 'prod', 1, 'a', True, False), 'unknown')
check('fixture 2', solve({'prod': (2, 'b')}, 'prod', 1, 'a', True, False), 'downgrade')
check('fixture 3', solve({'prod': (2, 'b')}, 'prod', 1, 'a', True, True), {'prod': (1, 'a')})
check('fixture 4', solve({'prod': (1, 'a')}, 'prod', 1, 'a', False, False), 'unchanged')
check('fixture 5', solve({'prod': (1, 'a')}, 'prod', 2, 'b', False, False), 'untested')
check('fixture 6', solve({'prod': (1, 'a'), 'stage': (2, 'b')}, 'prod', 2, 'b', True, False), {'prod': (2, 'b'), 'stage': (2, 'b')})
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 1unknownunknownPassed
fixture 2downgradedowngradePassed
fixture 3{'prod': [1, 'a']}{'prod': [1, 'a']}Passed
fixture 4unchangedunchangedPassed
fixture 5untesteduntestedPassed
fixture 6{'prod': [2, 'b'], 'stage': [2, 'b']}{'prod': [2, 'b'], 'stage': [2, 'b']}Passed

SHA-256 / da9ffb36334f677e30b5cece004ddbd130b619c2077b96c8e4b30fa9ea92394c

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

Case digest / ee12aff9b1f113cf427420bf8bde1a581d9a5402ee4fabd5e7a523901f5e33a2