File: src/entrabot/identity/state_machine.py
Location: L156-L166 (listener exception handler)
Category: error-handling
Priority: low
Description
logger.warning logs from_state/to_state but not the exception. Auth-state listeners are exactly the place where a swallowed exception (token-cache write failure, audit-log offline, observability sink rejection) is the data needed for forensic triage of an identity incident.
Suggested fix
logger.warning("Listener error during %s → %s: %s", from_state.value, to_state.value, exc, exc_info=True).
Filed automatically by a thorough code-review pass over src/entrabot/ on 2026-06-13. Internal review id: #68.
File:
src/entrabot/identity/state_machine.pyLocation: L156-L166 (listener exception handler)
Category: error-handling
Priority: low
Description
logger.warning logs from_state/to_state but not the exception. Auth-state listeners are exactly the place where a swallowed exception (token-cache write failure, audit-log offline, observability sink rejection) is the data needed for forensic triage of an identity incident.
Suggested fix
logger.warning("Listener error during %s → %s: %s", from_state.value, to_state.value, exc, exc_info=True).
Filed automatically by a thorough code-review pass over
src/entrabot/on 2026-06-13. Internal review id: #68.