FAILURE MAP
← Case archive

FA-9741 / Configuration / Open access

Deprecated option alias migration: Deprecated aliases override canonical settings · case 01

Deprecated aliases override canonical settings.

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

ROOT CAUSE

The implementation substitutes if True: for if canonical not in config:, so deprecated aliases override canonical settings.

VERIFIED REPAIR

Use an alias only when the canonical key is absent.

Unsuccessful approach: The attempted repair substitutes if canonical in config:. Fixture 2 still yields ({}, []) instead of ({'new': 1}, []).

Case contract

Copy canonical values; map alias values only when canonical is absent, remove alias keys, preserve unrelated options, and report conflicts where alias and canonical differ.

Why this case matters

An offline model of deprecated option alias migration, 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(config, aliases):
    result = dict(config)
    conflicts = []
    for alias, canonical in aliases.items():
        if alias not in config: continue
        if canonical in config and config[canonical] != config[alias]: conflicts.append(canonical)
        if True: result[canonical] = config[alias]
        result.pop(alias, None)
    return (result, sorted(set(conflicts)))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, {}), ({}, []))
check('fixture 2', solve({'old': 1}, {'old': 'new'}), ({'new': 1}, []))
check('fixture 3', solve({'old': 1, 'new': 2}, {'old': 'new'}), ({'new': 2}, ['new']))
check('fixture 4', solve({'old': 1, 'new': 1}, {'old': 'new'}), ({'new': 1}, []))
check('fixture 5', solve({'x': 3}, {'old': 'new'}), ({'x': 3}, []))
check('fixture 6', solve({'old': False}, {'old': 'new'}), ({'new': False}, []))
check('fixture 7', solve({'a': 1, 'b': 2, 'new': 3}, {'a': 'new', 'b': 'new'}), ({'new': 3}, ['new']))
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 1[{}, []][{}, []]Passed
fixture 2[{'new': 1}, []][{'new': 1}, []]Passed
fixture 3[{'new': 1}, ['new']][{'new': 2}, ['new']]Failed
fixture 4[{'new': 1}, []][{'new': 1}, []]Passed
fixture 5[{'x': 3}, []][{'x': 3}, []]Passed
fixture 6[{'new': False}, []][{'new': False}, []]Passed
fixture 7[{'new': 2}, ['new']][{'new': 3}, ['new']]Failed

SHA-256 / eb9a4af834fcc3cd8b7fae4dc717ecbffb2afc0ee5b7124c1cd721c3525f4538

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(config, aliases):
    result = dict(config)
    conflicts = []
    for alias, canonical in aliases.items():
        if alias not in config: continue
        if canonical in config and config[canonical] != config[alias]: conflicts.append(canonical)
        if canonical in config: result[canonical] = config[alias]
        result.pop(alias, None)
    return (result, sorted(set(conflicts)))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, {}), ({}, []))
check('fixture 2', solve({'old': 1}, {'old': 'new'}), ({'new': 1}, []))
check('fixture 3', solve({'old': 1, 'new': 2}, {'old': 'new'}), ({'new': 2}, ['new']))
check('fixture 4', solve({'old': 1, 'new': 1}, {'old': 'new'}), ({'new': 1}, []))
check('fixture 5', solve({'x': 3}, {'old': 'new'}), ({'x': 3}, []))
check('fixture 6', solve({'old': False}, {'old': 'new'}), ({'new': False}, []))
check('fixture 7', solve({'a': 1, 'b': 2, 'new': 3}, {'a': 'new', 'b': 'new'}), ({'new': 3}, ['new']))
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 1[{}, []][{}, []]Passed
fixture 2[{}, []][{'new': 1}, []]Failed
fixture 3[{'new': 1}, ['new']][{'new': 2}, ['new']]Failed
fixture 4[{'new': 1}, []][{'new': 1}, []]Passed
fixture 5[{'x': 3}, []][{'x': 3}, []]Passed
fixture 6[{}, []][{'new': False}, []]Failed
fixture 7[{'new': 2}, ['new']][{'new': 3}, ['new']]Failed

SHA-256 / 34f4b60254626545b0b7fde669f32d3c5d4c9aafdacff808e54ef8ede4071b71

3 / The verified repair

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

N = 1
observations = []
def solve(config, aliases):
    result = dict(config)
    conflicts = []
    for alias, canonical in aliases.items():
        if alias not in config: continue
        if canonical in config and config[canonical] != config[alias]: conflicts.append(canonical)
        if canonical not in config: result[canonical] = config[alias]
        result.pop(alias, None)
    return (result, sorted(set(conflicts)))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, {}), ({}, []))
check('fixture 2', solve({'old': 1}, {'old': 'new'}), ({'new': 1}, []))
check('fixture 3', solve({'old': 1, 'new': 2}, {'old': 'new'}), ({'new': 2}, ['new']))
check('fixture 4', solve({'old': 1, 'new': 1}, {'old': 'new'}), ({'new': 1}, []))
check('fixture 5', solve({'x': 3}, {'old': 'new'}), ({'x': 3}, []))
check('fixture 6', solve({'old': False}, {'old': 'new'}), ({'new': False}, []))
check('fixture 7', solve({'a': 1, 'b': 2, 'new': 3}, {'a': 'new', 'b': 'new'}), ({'new': 3}, ['new']))
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 1[{}, []][{}, []]Passed
fixture 2[{'new': 1}, []][{'new': 1}, []]Passed
fixture 3[{'new': 2}, ['new']][{'new': 2}, ['new']]Passed
fixture 4[{'new': 1}, []][{'new': 1}, []]Passed
fixture 5[{'x': 3}, []][{'x': 3}, []]Passed
fixture 6[{'new': False}, []][{'new': False}, []]Passed
fixture 7[{'new': 3}, ['new']][{'new': 3}, ['new']]Passed

SHA-256 / 99838e159b19b23ef25e4931d324891ace49bf9cf3026846ffad4767301e2150

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

Case digest / 19edef81f6ffdcf4a3fa4fb3955881d483225f6d5968ff8f547dcb025119ba2d