FA-10331 / Observability / Open access
Structured telemetry field redaction: Forbidden telemetry fields leave their keys visible · case 01
Forbidden telemetry fields leave their keys visible.
ROOT CAUSE
The implementation substitutes if False: continue for if key in forbidden: continue, so forbidden telemetry fields leave their keys visible.
VERIFIED REPAIR
Remove forbidden keys entirely.
Unsuccessful approach: The attempted repair substitutes if key in forbidden: result[key] = None continue. Fixture 3 still yields [('a', None)] instead of [].
Case contract
Remove forbidden keys, replace sensitive field values with REDACTED, truncate long public string values, preserve nonstring values, and return keys in lexical order. Forbidden removal dominates sensitive replacement.
Why this case matters
An offline model of structured telemetry field redaction, 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(fields, forbidden, sensitive, limit):
result = {}
for key in sorted(fields):
if False: continue
value = fields[key]
if key in sensitive: value = 'REDACTED'
elif isinstance(value, str): value = value[:limit]
result[key] = value
return list(result.items())
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, [], [], 3), [])
check('fixture 2', solve({'b': 'hello', 'a': 'xy'}, [], [], 3), [('a', 'xy'), ('b', 'hel')])
check('fixture 3', solve({'a': 'secret'}, ['a'], ['a'], 3), [])
check('fixture 4', solve({'a': 'secret'}, [], ['a'], 3), [('a', 'REDACTED')])
check('fixture 5', solve({'a': 0, 'b': False}, [], [], 3), [('a', 0), ('b', False)])
check('fixture 6', solve({'a': 'hello'}, [], [], 0), [('a', '')])
check('fixture 7', solve({'a': 'abc'}, [], [], 3), [('a', 'abc')])
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', 'xy'], ['b', 'hel']] | [['a', 'xy'], ['b', 'hel']] | Passed |
| fixture 3 | [['a', 'REDACTED']] | [] | Failed |
| fixture 4 | [['a', 'REDACTED']] | [['a', 'REDACTED']] | Passed |
| fixture 5 | [['a', 0], ['b', False]] | [['a', 0], ['b', False]] | Passed |
| fixture 6 | [['a', '']] | [['a', '']] | Passed |
| fixture 7 | [['a', 'abc']] | [['a', 'abc']] | Passed |
SHA-256 / 5fd4014169c130c7c3187e5b5f27b5655e10997999b0045915945032bad1af8f
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(fields, forbidden, sensitive, limit):
result = {}
for key in sorted(fields):
if key in forbidden:
result[key] = None
continue
value = fields[key]
if key in sensitive: value = 'REDACTED'
elif isinstance(value, str): value = value[:limit]
result[key] = value
return list(result.items())
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, [], [], 3), [])
check('fixture 2', solve({'b': 'hello', 'a': 'xy'}, [], [], 3), [('a', 'xy'), ('b', 'hel')])
check('fixture 3', solve({'a': 'secret'}, ['a'], ['a'], 3), [])
check('fixture 4', solve({'a': 'secret'}, [], ['a'], 3), [('a', 'REDACTED')])
check('fixture 5', solve({'a': 0, 'b': False}, [], [], 3), [('a', 0), ('b', False)])
check('fixture 6', solve({'a': 'hello'}, [], [], 0), [('a', '')])
check('fixture 7', solve({'a': 'abc'}, [], [], 3), [('a', 'abc')])
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', 'xy'], ['b', 'hel']] | [['a', 'xy'], ['b', 'hel']] | Passed |
| fixture 3 | [['a', None]] | [] | Failed |
| fixture 4 | [['a', 'REDACTED']] | [['a', 'REDACTED']] | Passed |
| fixture 5 | [['a', 0], ['b', False]] | [['a', 0], ['b', False]] | Passed |
| fixture 6 | [['a', '']] | [['a', '']] | Passed |
| fixture 7 | [['a', 'abc']] | [['a', 'abc']] | Passed |
SHA-256 / 3ff29cf1067c80e201ef62ac5ae2e9995b8c771559af18fb607229dcf6f6a18a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(fields, forbidden, sensitive, limit):
result = {}
for key in sorted(fields):
if key in forbidden: continue
value = fields[key]
if key in sensitive: value = 'REDACTED'
elif isinstance(value, str): value = value[:limit]
result[key] = value
return list(result.items())
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, [], [], 3), [])
check('fixture 2', solve({'b': 'hello', 'a': 'xy'}, [], [], 3), [('a', 'xy'), ('b', 'hel')])
check('fixture 3', solve({'a': 'secret'}, ['a'], ['a'], 3), [])
check('fixture 4', solve({'a': 'secret'}, [], ['a'], 3), [('a', 'REDACTED')])
check('fixture 5', solve({'a': 0, 'b': False}, [], [], 3), [('a', 0), ('b', False)])
check('fixture 6', solve({'a': 'hello'}, [], [], 0), [('a', '')])
check('fixture 7', solve({'a': 'abc'}, [], [], 3), [('a', 'abc')])
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', 'xy'], ['b', 'hel']] | [['a', 'xy'], ['b', 'hel']] | Passed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [['a', 'REDACTED']] | [['a', 'REDACTED']] | Passed |
| fixture 5 | [['a', 0], ['b', False]] | [['a', 0], ['b', False]] | Passed |
| fixture 6 | [['a', '']] | [['a', '']] | Passed |
| fixture 7 | [['a', 'abc']] | [['a', 'abc']] | Passed |
SHA-256 / 169f7043df42461de1fb63a690c7e1f5176f86c68bc043da8a33a4640416f00a
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:38.035400+00:00.
Case digest / fa7c8c130186f48b9642322691a3ddac7253f56edd757d2e048be20cff9342a8