FAILURE MAP
← Case archive

FA-10211 / Deployment models / Open access

Environment promotion plan: Downgrades ignore the explicit policy · case 01

Downgrades ignore the explicit policy.

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

ROOT CAUSE

The implementation substitutes False for version < old_version and not allow_downgrade, so downgrades ignore the explicit policy.

THE FAILURE

The implementation substitutes False for version < old_version and not allow_downgrade, so downgrades ignore the explicit policy.

Unsuccessful approach: The attempted repair substitutes version < old_version. Fixture 3 still yields 'downgrade' instead of {'prod': (1, 'a')}.

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 False: 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 2{'prod': [1, 'a']}downgradeFailed
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 / 292c5352e943a516fda7b461ff3981a6c26c96d6b68fdf1a1f6b249b24eaf3bc

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: 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 3downgrade{'prod': [1, 'a']}Failed
fixture 4unchangedunchangedPassed
fixture 5untesteduntestedPassed
fixture 6{'prod': [2, 'b'], 'stage': [2, 'b']}{'prod': [2, 'b'], 'stage': [2, 'b']}Passed

SHA-256 / 96691fe37328dd48d6723ba68e8aa2c59cf6f03c453bdadd802492307b720f6b

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

Case digest / b4c67e5ce07a5ef9308ec8ff6c3ab4ec2ef8dd2b84806a800f81f679d3700398