From 294e241e2d6aa628e16eeaf8a8cbd2e44f6a1fe7 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sat, 19 Sep 2026 00:09:02 -0700 Subject: [PATCH] refactor(gateway): run_goals resolves adapters through the intake/delivery seams Mechanical migration of the `_adapter_for_source` call sites in this sibling. Intake policy sites take `_intake_adapter_for`; every send/edit/typing/pending-slot site takes `_delivery_adapter_for`. Part of #88715 (phase 4). --- gateway/run_goals.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gateway/run_goals.py b/gateway/run_goals.py index b983db21de..9f6adf037e 100644 --- a/gateway/run_goals.py +++ b/gateway/run_goals.py @@ -139,7 +139,7 @@ class GatewayGoalsMixin: return session_id = current watch[quick_key] = (source, session_id) - adapter = self._adapter_for_source(source) + adapter = self._delivery_adapter_for(source) if adapter is None or not adapter._message_handler: return if ( @@ -205,7 +205,7 @@ class GatewayGoalsMixin: logger.debug("Failed to start heartbeat poller", exc_info=True) def _goal_notice_adapter(self, source: Any): - adapter = self._adapter_for_source(source) + adapter = self._delivery_adapter_for(source) if not adapter: logger.debug("goal continuation: no adapter for %s", getattr(source, "platform", None)) return adapter @@ -308,7 +308,7 @@ class GatewayGoalsMixin: return # Enqueue via the adapter's FIFO so a user message already in flight preempts naturally. try: - adapter = self._adapter_for_source(source) + adapter = self._delivery_adapter_for(source) _quick_key = self._session_key_for_source(source) if adapter and _quick_key: self._enqueue_fifo(_quick_key, self._synthetic_prompt_event(source, prompt), adapter)