FA-9821 / Configuration / Open access
Configuration schema upgrade: Deprecated configuration fields survive migration · case 01
Deprecated configuration fields survive migration.
ROOT CAUSE
The implementation substitutes pass for result.pop('timeout_ms', None), so deprecated configuration fields survive migration.
VERIFIED REPAIR
Remove the deprecated key after migration.
Unsuccessful approach: The attempted repair substitutes result['timeout_ms'] = None. Fixture 1 still yields {'timeout_ms': None, 'schema': 2} instead of {'schema': 2}.
Case contract
Rename timeout_ms to timeout only when new key is absent, remove deprecated timeout_ms, add schema version, preserve unknown settings, and scale legacy milliseconds to seconds.
Why this case matters
An offline model of configuration schema upgrade, 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):
result = dict(config)
if 'timeout' not in result and 'timeout_ms' in result:
result['timeout'] = result['timeout_ms'] / 1000
pass
result['schema'] = 2
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}), {'schema': 2})
check('fixture 2', solve({'timeout_ms': 1500}), {'timeout': 1.5, 'schema': 2})
check('fixture 3', solve({'timeout_ms': 0}), {'timeout': 0.0, 'schema': 2})
check('fixture 4', solve({'timeout_ms': 1500, 'timeout': 9}), {'timeout': 9, 'schema': 2})
check('fixture 5', solve({'other': 3}), {'other': 3, 'schema': 2})
check('fixture 6', solve({'schema': 1, 'timeout': 2}), {'schema': 2, 'timeout': 2})
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 | {'schema': 2} | {'schema': 2} | Passed |
| fixture 2 | {'schema': 2, 'timeout': 1.5, 'timeout_ms': 1500} | {'schema': 2, 'timeout': 1.5} | Failed |
| fixture 3 | {'schema': 2, 'timeout': 0.0, 'timeout_ms': 0} | {'schema': 2, 'timeout': 0.0} | Failed |
| fixture 4 | {'schema': 2, 'timeout': 9, 'timeout_ms': 1500} | {'schema': 2, 'timeout': 9} | Failed |
| fixture 5 | {'other': 3, 'schema': 2} | {'other': 3, 'schema': 2} | Passed |
| fixture 6 | {'schema': 2, 'timeout': 2} | {'schema': 2, 'timeout': 2} | Passed |
SHA-256 / b043433edec569259557f818509f0dd878a760170efed3f09c154587cb6030b4
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(config):
result = dict(config)
if 'timeout' not in result and 'timeout_ms' in result:
result['timeout'] = result['timeout_ms'] / 1000
result['timeout_ms'] = None
result['schema'] = 2
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}), {'schema': 2})
check('fixture 2', solve({'timeout_ms': 1500}), {'timeout': 1.5, 'schema': 2})
check('fixture 3', solve({'timeout_ms': 0}), {'timeout': 0.0, 'schema': 2})
check('fixture 4', solve({'timeout_ms': 1500, 'timeout': 9}), {'timeout': 9, 'schema': 2})
check('fixture 5', solve({'other': 3}), {'other': 3, 'schema': 2})
check('fixture 6', solve({'schema': 1, 'timeout': 2}), {'schema': 2, 'timeout': 2})
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 | {'schema': 2, 'timeout_ms': None} | {'schema': 2} | Failed |
| fixture 2 | {'schema': 2, 'timeout': 1.5, 'timeout_ms': None} | {'schema': 2, 'timeout': 1.5} | Failed |
| fixture 3 | {'schema': 2, 'timeout': 0.0, 'timeout_ms': None} | {'schema': 2, 'timeout': 0.0} | Failed |
| fixture 4 | {'schema': 2, 'timeout': 9, 'timeout_ms': None} | {'schema': 2, 'timeout': 9} | Failed |
| fixture 5 | {'other': 3, 'schema': 2, 'timeout_ms': None} | {'other': 3, 'schema': 2} | Failed |
| fixture 6 | {'schema': 2, 'timeout': 2, 'timeout_ms': None} | {'schema': 2, 'timeout': 2} | Failed |
SHA-256 / 831b4493c6766750ae1ef52e535b1ef92cc6429efbbd9c5fce0a8b2c5a36dc78
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(config):
result = dict(config)
if 'timeout' not in result and 'timeout_ms' in result:
result['timeout'] = result['timeout_ms'] / 1000
result.pop('timeout_ms', None)
result['schema'] = 2
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}), {'schema': 2})
check('fixture 2', solve({'timeout_ms': 1500}), {'timeout': 1.5, 'schema': 2})
check('fixture 3', solve({'timeout_ms': 0}), {'timeout': 0.0, 'schema': 2})
check('fixture 4', solve({'timeout_ms': 1500, 'timeout': 9}), {'timeout': 9, 'schema': 2})
check('fixture 5', solve({'other': 3}), {'other': 3, 'schema': 2})
check('fixture 6', solve({'schema': 1, 'timeout': 2}), {'schema': 2, 'timeout': 2})
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 | {'schema': 2} | {'schema': 2} | Passed |
| fixture 2 | {'schema': 2, 'timeout': 1.5} | {'schema': 2, 'timeout': 1.5} | Passed |
| fixture 3 | {'schema': 2, 'timeout': 0.0} | {'schema': 2, 'timeout': 0.0} | Passed |
| fixture 4 | {'schema': 2, 'timeout': 9} | {'schema': 2, 'timeout': 9} | Passed |
| fixture 5 | {'other': 3, 'schema': 2} | {'other': 3, 'schema': 2} | Passed |
| fixture 6 | {'schema': 2, 'timeout': 2} | {'schema': 2, 'timeout': 2} | Passed |
SHA-256 / b93781a57f210205aec15a5a5b156f6439925765d0b02c1bbd2455707a45094a
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:33.398734+00:00.
Case digest / 2f6f5e334ecfdca61c55bb4aa13ecafc8f3a86275780d16d24e4fab80f259a04