FA-9731 / Configuration / Open access
Deprecated option alias migration: Alias migration erases unrelated settings · case 01
Alias migration erases unrelated settings.
ROOT CAUSE
The implementation substitutes result = {} for result = dict(config), so alias migration erases unrelated settings.
VERIFIED REPAIR
Start from the complete original configuration.
Unsuccessful approach: The attempted repair substitutes result = {k:v for k,v in config.items() if k in aliases}. Fixture 3 still yields ({}, ['new']) instead of ({'new': 2}, ['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 = {}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [{}, []] | [{}, []] | Passed |
| fixture 2 | [{'new': 1}, []] | [{'new': 1}, []] | Passed |
| fixture 3 | [{}, ['new']] | [{'new': 2}, ['new']] | Failed |
| fixture 4 | [{}, []] | [{'new': 1}, []] | Failed |
| fixture 5 | [{}, []] | [{'x': 3}, []] | Failed |
| fixture 6 | [{'new': False}, []] | [{'new': False}, []] | Passed |
| fixture 7 | [{}, ['new']] | [{'new': 3}, ['new']] | Failed |
SHA-256 / 927adf9de95bc038df0d80a50afc47e50837c628826ce997aa0b762b5074a2f8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(config, aliases):
result = {k:v for k,v in config.items() if k in aliases}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [{}, []] | [{}, []] | Passed |
| fixture 2 | [{'new': 1}, []] | [{'new': 1}, []] | Passed |
| fixture 3 | [{}, ['new']] | [{'new': 2}, ['new']] | Failed |
| fixture 4 | [{}, []] | [{'new': 1}, []] | Failed |
| fixture 5 | [{}, []] | [{'x': 3}, []] | Failed |
| fixture 6 | [{'new': False}, []] | [{'new': False}, []] | Passed |
| fixture 7 | [{}, ['new']] | [{'new': 3}, ['new']] | Failed |
SHA-256 / 2d47110bf3df3692e35009478f2d641e48a8e4edfef8fe435f834bde906341c0
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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.594853+00:00.
Case digest / d05575f28c94a6c02bf8ab56a5a086ea781f113e44066f850f7749730ccfc0b5