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
Add converter round-trip coverage and sanitize cleanup log
Addresses #5196 review comments:
- MEDIUM dcr_store.go (3203565436) F7: added
TestResolutionCredentialsRoundTrip pinning the field-by-field contract
between resolutionToCredentials and credentialsToResolution
(preserved, dropped, key-recovered, nil-shortcircuit). Added
MUST-update-both-converters comments on the DCRResolution struct in
dcr.go and the DCRCredentials struct in storage/types.go so a future
contributor adding a field to either type sees the converter
obligation at the struct definition rather than only at the
converters. Documented the ProviderName asymmetry: the field is
storage-only ("debug/audit only" per its own docstring) and is
intentionally left unpopulated by the runner; the test asserts that
invariant so any future threading is paired with the assertion
update.
- MEDIUM embeddedauthserver.go (3203565446) F8: route both closeErr and
retErr in the deferred-cleanup slog.Warn through sanitizeErrorForLog
so a wrapped DCR failure whose error chain inlines an upstream
/register response body cannot leak userinfo, query, or fragment
components into operator logs. Renamed the "original_error" key to
"cause" to match the package-wide vocabulary. Added
TestNewEmbeddedAuthServer_DeferredCleanupSanitizesLog which captures
the Warn record by swapping slog.Default() and asserts both that
literal secret markers are scrubbed and that host components survive
for operator correlation.
0 commit comments