From 60df8552b51be61fadf33bec3c10aa8e7c2ef4d6 Mon Sep 17 00:00:00 2001 From: curo1305 Date: Tue, 23 Jun 2026 00:29:34 +0200 Subject: [PATCH] fix(13): CR-05 commit audit log after write_audit_log in reconnect endpoint so event is not silently lost --- backend/api/cloud/connections.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/api/cloud/connections.py b/backend/api/cloud/connections.py index c9e7500..3703299 100644 --- a/backend/api/cloud/connections.py +++ b/backend/api/cloud/connections.py @@ -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