FA-10226 / Deployment models / Open access
Environment promotion plan: Promotion erases unrelated environments · case 01
Promotion erases unrelated environments.
ROOT CAUSE
The implementation substitutes result = {} for result = dict(environments), so promotion erases unrelated environments.
THE FAILURE
The implementation substitutes result = {} for result = dict(environments), so promotion erases unrelated environments.
Unsuccessful approach: The attempted repair substitutes result = {target: environments[target]}. Fixture 6 still yields {'prod': (2, 'b')} instead of {'prod': (2, 'b'), 'stage': (2, 'b')}.
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 digest == old_digest: return 'unchanged'
if not tested: return 'untested'
result = {}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | unknown | unknown | Passed |
| fixture 2 | downgrade | downgrade | Passed |
| fixture 3 | {'prod': [1, 'a']} | {'prod': [1, 'a']} | Passed |
| fixture 4 | unchanged | unchanged | Passed |
| fixture 5 | untested | untested | Passed |
| fixture 6 | {'prod': [2, 'b']} | {'prod': [2, 'b'], 'stage': [2, 'b']} | Failed |
SHA-256 / 12947dc1820a8a9c4c940b46c598addd89a917897de262fad8b493f07d117e2d
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 digest == old_digest: return 'unchanged'
if not tested: return 'untested'
result = {target: environments[target]}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | unknown | unknown | Passed |
| fixture 2 | downgrade | downgrade | Passed |
| fixture 3 | {'prod': [1, 'a']} | {'prod': [1, 'a']} | Passed |
| fixture 4 | unchanged | unchanged | Passed |
| fixture 5 | untested | untested | Passed |
| fixture 6 | {'prod': [2, 'b']} | {'prod': [2, 'b'], 'stage': [2, 'b']} | Failed |
SHA-256 / 5af9a70699a78b9a738287bc0f96eb2193dd79707af3bd867d55bc31d97cdebc
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 / 37759c87bc4ae2b416addf916fa96598bb8f81c34a3db2a38d0709d514b7bdd2