You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mechanical checks E: identifier-leak test helper #299
Part of #279 (E of five): a test helper that proves a raw personal identifier never leaks (ADR-0003, CLAUDE.md Telemetry), needed before the first MF White List client method (#259).
In tests/OpenUrzednik.TestCommon:
a recording telemetry (IOpenUrzednikLogger and IOpenUrzednikTraceSource, every level enabled) that keeps log templates, property names and values, span names, tags, status, events and recorded exceptions;
an assertion such as result.ShouldNotLeak(telemetry, rawNip) that searches all of that, each error's Message and Metadata, and ToException()'s message and Data down the inner exceptions, for the identifier as given, its digits-only form and every unmasked prefix longer than the last 4 characters.
Test the helper in OpenUrzednik.Core.Tests (as MetadataRuleTest does) and use it in the MF White List pipeline tests. /new-endpoint and .claude/rules/testing.md require it for every method that takes an identifier.
Decide in the PR's plan: whether the ADR-0017 ILogger HttpClient logging (DI packages) needs its own check.
Activity