FA-9606 / Configuration / Open access
Configuration schema diagnostics: Unknown configuration keys are ignored · case 01
Unknown configuration keys are ignored.
ROOT CAUSE
The implementation substitutes pass for errors.append((key, 'unknown')), so unknown configuration keys are ignored.
VERIFIED REPAIR
Report unknown keys distinctly.
Unsuccessful approach: The attempted repair substitutes errors.append((key, 'missing')). Fixture 4 still yields [('x', 'missing')] instead of [('x', 'unknown')].
Case contract
Return errors in key order for missing required keys, unknown keys, exact type mismatch, disallowed values, and invalid bounds. Booleans must not satisfy integer type.
Why this case matters
An offline model of configuration schema diagnostics, 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(data, schema):
errors = []
for key in sorted(set(data) | set(schema)):
if key not in schema: pass; continue
required, kind, choices, minimum = schema[key]
if key not in data:
if required: errors.append((key, 'missing'))
continue
value = data[key]
if type(value).__name__ != kind: errors.append((key, 'type')); continue
if choices is not None and value not in choices: errors.append((key, 'choice'))
if minimum is not None and value < minimum: errors.append((key, 'minimum'))
return errors
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, {}), [])
check('fixture 2', solve({}, {'a': (True, 'int', None, None)}), [('a', 'missing')])
check('fixture 3', solve({}, {'a': (False, 'int', None, None)}), [])
check('fixture 4', solve({'x': 1}, {}), [('x', 'unknown')])
check('fixture 5', solve({'a': True}, {'a': (True, 'int', None, None)}), [('a', 'type')])
check('fixture 6', solve({'a': 2}, {'a': (True, 'int', [1, 3], None)}), [('a', 'choice')])
check('fixture 7', solve({'a': 1}, {'a': (True, 'int', None, 2)}), [('a', 'minimum')])
check('fixture 8', solve({'a': 2}, {'a': (True, 'int', None, 2)}), [])
check('fixture 9', solve({'a': 'x'}, {'a': (True, 'str', ['x'], None)}), [])
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 | [['a', 'missing']] | [['a', 'missing']] | Passed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [] | [['x', 'unknown']] | Failed |
| fixture 5 | [['a', 'type']] | [['a', 'type']] | Passed |
| fixture 6 | [['a', 'choice']] | [['a', 'choice']] | Passed |
| fixture 7 | [['a', 'minimum']] | [['a', 'minimum']] | Passed |
| fixture 8 | [] | [] | Passed |
| fixture 9 | [] | [] | Passed |
SHA-256 / 1d8418bddda946dd86c0794c622e6c5015776ba1ba352fe0883c2ebcfed093d9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(data, schema):
errors = []
for key in sorted(set(data) | set(schema)):
if key not in schema: errors.append((key, 'missing')); continue
required, kind, choices, minimum = schema[key]
if key not in data:
if required: errors.append((key, 'missing'))
continue
value = data[key]
if type(value).__name__ != kind: errors.append((key, 'type')); continue
if choices is not None and value not in choices: errors.append((key, 'choice'))
if minimum is not None and value < minimum: errors.append((key, 'minimum'))
return errors
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, {}), [])
check('fixture 2', solve({}, {'a': (True, 'int', None, None)}), [('a', 'missing')])
check('fixture 3', solve({}, {'a': (False, 'int', None, None)}), [])
check('fixture 4', solve({'x': 1}, {}), [('x', 'unknown')])
check('fixture 5', solve({'a': True}, {'a': (True, 'int', None, None)}), [('a', 'type')])
check('fixture 6', solve({'a': 2}, {'a': (True, 'int', [1, 3], None)}), [('a', 'choice')])
check('fixture 7', solve({'a': 1}, {'a': (True, 'int', None, 2)}), [('a', 'minimum')])
check('fixture 8', solve({'a': 2}, {'a': (True, 'int', None, 2)}), [])
check('fixture 9', solve({'a': 'x'}, {'a': (True, 'str', ['x'], None)}), [])
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 | [['a', 'missing']] | [['a', 'missing']] | Passed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [['x', 'missing']] | [['x', 'unknown']] | Failed |
| fixture 5 | [['a', 'type']] | [['a', 'type']] | Passed |
| fixture 6 | [['a', 'choice']] | [['a', 'choice']] | Passed |
| fixture 7 | [['a', 'minimum']] | [['a', 'minimum']] | Passed |
| fixture 8 | [] | [] | Passed |
| fixture 9 | [] | [] | Passed |
SHA-256 / 1be8d8d371c506bf1b75a465dd7bf10febb38079d3e238df6b025e45ee45f92a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(data, schema):
errors = []
for key in sorted(set(data) | set(schema)):
if key not in schema: errors.append((key, 'unknown')); continue
required, kind, choices, minimum = schema[key]
if key not in data:
if required: errors.append((key, 'missing'))
continue
value = data[key]
if type(value).__name__ != kind: errors.append((key, 'type')); continue
if choices is not None and value not in choices: errors.append((key, 'choice'))
if minimum is not None and value < minimum: errors.append((key, 'minimum'))
return errors
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, {}), [])
check('fixture 2', solve({}, {'a': (True, 'int', None, None)}), [('a', 'missing')])
check('fixture 3', solve({}, {'a': (False, 'int', None, None)}), [])
check('fixture 4', solve({'x': 1}, {}), [('x', 'unknown')])
check('fixture 5', solve({'a': True}, {'a': (True, 'int', None, None)}), [('a', 'type')])
check('fixture 6', solve({'a': 2}, {'a': (True, 'int', [1, 3], None)}), [('a', 'choice')])
check('fixture 7', solve({'a': 1}, {'a': (True, 'int', None, 2)}), [('a', 'minimum')])
check('fixture 8', solve({'a': 2}, {'a': (True, 'int', None, 2)}), [])
check('fixture 9', solve({'a': 'x'}, {'a': (True, 'str', ['x'], None)}), [])
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 | [['a', 'missing']] | [['a', 'missing']] | Passed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [['x', 'unknown']] | [['x', 'unknown']] | Passed |
| fixture 5 | [['a', 'type']] | [['a', 'type']] | Passed |
| fixture 6 | [['a', 'choice']] | [['a', 'choice']] | Passed |
| fixture 7 | [['a', 'minimum']] | [['a', 'minimum']] | Passed |
| fixture 8 | [] | [] | Passed |
| fixture 9 | [] | [] | Passed |
SHA-256 / 166c9af4fb28fcc3a677649a25e82b977cb9bc0bddede2fedacf963ad200a441
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:31.496096+00:00.
Case digest / 9d857f3c2fd69a467a878e053125a5e95424a45d4fc98ad8899a580841c1bccf