FAILURE MAP
← Case archive

FA-9751 / Configuration / Open access

Deprecated option alias migration: Multiple aliases repeat the same conflict · case 01

Multiple aliases repeat the same conflict.

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

ROOT CAUSE

The implementation substitutes sorted(conflicts) for sorted(set(conflicts)), so multiple aliases repeat the same conflict.

VERIFIED REPAIR

Report each conflicting canonical key once.

Unsuccessful approach: The attempted repair substitutes conflicts. Fixture 7 still yields ({'new': 3}, ['new', 'new']) instead of ({'new': 3}, ['new']).

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 canonical not in config: result[canonical] = config[alias]
        result.pop(alias, None)
    return (result, sorted(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']][{'new': 3}, ['new']]Failed

SHA-256 / 4311d9b7b74e0a043eea54cdb4218bc60efa8da3345339852353959400a04ca4

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 not in config: result[canonical] = config[alias]
        result.pop(alias, None)
    return (result, 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']][{'new': 3}, ['new']]Failed

SHA-256 / c710b1b4eb5c2f2ee5511280516be38739c7140d8225961288966c3282770ae6

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

Case digest / 77c3d43129ac08d3ed8a587e6e387da1df3b1bcbdd9c0676a3e856f482f39e3d