The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(gateway/platforms): keep SQL statement text on its own lines in idempotency/room-dispatch stores
Tekniumf7a2a945b96b
diff --git a/gateway/platforms/api_server_room_dispatch.py b/gateway/platforms/api_server_room_dispatch.pyindex 5c755a3ceba..44f6ed940ce 100644--- a/gateway/platforms/api_server_room_dispatch.py+++ b/gateway/platforms/api_server_room_dispatch.py@@ -41,8 +41,8 @@ async def _ensure_hosted_member_session(self, dispatch: Any) -> str:"Another group already uses this room title on the target gateway. ""Rename or migrate that group before retrying.")conn.execute(- "INSERT INTO sessions(id, source, title, hidden, started_at) "- "VALUES(?, 'bot_room', ?, 1, ?)", (session_id, clean_title, time.time()))+ "INSERT INTO sessions(id, source, title, hidden, started_at) VALUES(?, 'bot_room', ?, 1, ?)",+ (session_id, clean_title, time.time()))return session_idreturn await asyncio.to_thread(db._execute_write, atomic)diff --git a/gateway/platforms/api_server_run_idempotency.py b/gateway/platforms/api_server_run_idempotency.pyindex 2d47e78a250..64d584d7b1b 100644--- a/gateway/platforms/api_server_run_idempotency.py+++ b/gateway/platforms/api_server_run_idempotency.py@@ -189,7 +189,8 @@ class RunIdempotencyStore:self._conn.commit()row = self._conn.execute("SELECT status_json, owner_pid, owner_started, updated_at "- "FROM run_idempotency WHERE scope=? AND run_id=?", (scope, run_id)).fetchone()+ "FROM run_idempotency WHERE scope=? AND run_id=?",+ (scope, run_id)).fetchone()if row is None:return Nonereturn {k: v for k, v in _record(None, *row).items() if k != "run_id"}@@ -207,8 +208,7 @@ class RunIdempotencyStore:def owns_run(self, scope: str, run_id: str) -> bool:with self._lock:row = self._conn.execute(- "SELECT 1 FROM run_idempotency WHERE scope=? AND run_id=?", (scope, run_id)- ).fetchone()+ "SELECT 1 FROM run_idempotency WHERE scope=? AND run_id=?", (scope, run_id)).fetchone()return row is not Nonedef update_status(self, run_id: str, status: Dict[str, Any]) -> None: