FA-10351 / Observability / Open access
Structured telemetry field redaction: Redacted telemetry fields retain arbitrary insertion order · case 01
Redacted telemetry fields retain arbitrary insertion order.
ROOT CAUSE
The implementation substitutes for key in fields: for for key in sorted(fields):, so redacted telemetry fields retain arbitrary insertion order.
THE FAILURE
The implementation substitutes for key in fields: for for key in sorted(fields):, so redacted telemetry fields retain arbitrary insertion order.
Unsuccessful approach: The attempted repair substitutes for key in sorted(fields, reverse=True):. Fixture 2 still yields [('b', 'hel'), ('a', 'xy')] instead of [('a', 'xy'), ('b', 'hel')].
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 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 | [['b', 'hel'], ['a', 'xy']] | [['a', 'xy'], ['b', 'hel']] | Failed |
| 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 / 87ebff5dcdaf364593dfd870af62c647231f13c1bc5f5eef7fc99fb6f8429326
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, reverse=True):
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 | [['b', 'hel'], ['a', 'xy']] | [['a', 'xy'], ['b', 'hel']] | Failed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [['a', 'REDACTED']] | [['a', 'REDACTED']] | Passed |
| fixture 5 | [['b', False], ['a', 0]] | [['a', 0], ['b', False]] | Failed |
| fixture 6 | [['a', '']] | [['a', '']] | Passed |
| fixture 7 | [['a', 'abc']] | [['a', 'abc']] | Passed |
SHA-256 / 1d20e8450864a625b6917271cad6e8ee934ded2c0a1c8df7cc3641a4b320c4c2
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.127772+00:00.
Case digest / cba6da291fcad37fb1ae05a7827cf1e8c4a5ec8af8df611abbd39c8056939d53