fix: redact reconnect exception logs - #250
Conversation
|
Release review: needs-fix (privacy blocker); not ready to land. The generic reconnect-exception branch is correctly redacted, but two reconnect-specific transport paths still interpolate raw exception text:
Transport exception strings can carry modem/transport payloads, so this remains a raw-log sink. Please run a fresh TDD cycle with caplog sentinels for both paths, prove the current leak, then log only safe metadata such as exception type and attempt count. Rebase on current |
|
Release review: needs-fix (privacy blocker). The generic reconnect-exception branch is safely redacted, but reconnect-specific |
|
Release review: needs-fix (privacy blocker), so this is not ready to land. The generic reconnect exception branch is redacted, but the Please log only safe metadata (attempt plus exception class) in both exception branches and add a captured-log regression using a |
|
Release review: needs-fix (privacy blocker). The changed generic reconnect-exception branch is safe, but two existing reconnect paths still log exception text and can expose modem/AT payloads:
Independent probes on this exact head confirmed raw sentinel text appears in each path. Please start a fresh TDD cycle: add caplog regressions that exercise both paths and prove raw exception payloads are absent, watch them fail on the current head, then redact/log only an allowlisted exception category while preserving retry/backoff control flow. Re-run the required full gate after the fix. The current generic- |
|
Release-lane classification: needs fix/revalidation before merge. This draft was not independently reviewed or integration-tested in this pass and its GitHub mergeability is stale/unknown after current-main advances. Please rebase or otherwise validate it against current |
|
Release classification: needs-fix for this release pass. The draft has not received a current exact-head review and prescribed local integration gate over the advancing |
|
Release review: needs-fix. The generic reconnect exception path is redacted, but stale-close |
Summary
caplogregression test for the reconnect pathPartial progress toward #61 (one narrow reconnect-log privacy slice).
TDD evidence
tests/test_modem.py::TestModemAutoReconnect::test_unexpected_reconnect_error_does_not_leak_raw_payloadinitially failed because the sensitive marker and traceback appeared in the log.Verification
git diff --checkPYTHONPATH=. uv run --no-project --with pytest --with pytest-asyncio --with pytest-aiohttp --with pyserial-asyncio --with aiosqlite pytest tests/test_modem.py::TestModemAutoReconnect::test_unexpected_reconnect_error_does_not_leak_raw_payload -q— 1 passedPYTHONPATH=. uv run --no-project --with pytest --with pytest-asyncio --with pytest-aiohttp --with pyserial-asyncio --with aiosqlite pytest tests/ -q— 992 passedRisk
Low: reconnect retry and exponential-backoff control flow are unchanged; diagnostic detail is intentionally limited to exception type to keep default logs PII-safe.