fix(13): CR-05 commit audit log after write_audit_log in reconnect endpoint so event is not silently lost

This commit is contained in:
curo1305
2026-06-23 00:29:34 +02:00
parent af0de30e93
commit 60df8552b5
+5
View File
@@ -651,6 +651,11 @@ async def reconnect_connection(
ip_address=_ip,
metadata_={"provider": result["provider"], "connection_id": str(connection_id)},
)
# CR-05: The service committed the credential update; this commit persists the
# audit row that was written to the session after that commit. Without this,
# the audit row is rolled back when the session closes and the reconnect event
# is silently lost.
await session.commit()
return result