fix(gateway): say why a dropped server-request response was dropped

_resolve_response logged 'unknown server request' even when the id was
open and only the connection's entitlement failed, which made the
sibling routing gap look like a missing request. resolve() only consults
session_ok for an open id, so record that it was asked and name the
reason in the debug line. Behaviour is unchanged.

Refs #143547
This commit is contained in:
unsupportedpastels
2026-10-25 21:59:00 +00:00
committed by Mark S.
parent 7122521b9c
commit 24e437a2f2

View File

@@ -855,8 +855,10 @@ class AuthorityConnection:
def _resolve_response(self, frame):
from gateway.session_server_requests import may_settle, resolve
asked = []
def entitled(session_id, events):
asked.append(session_id)
# The same rule ``clarify.lock`` applies to the same request id (attached + respond). A
# response frame names no profile: a host-scoped socket answers a sibling's request as the
# sibling connection that attached it.
@@ -864,7 +866,8 @@ class AuthorityConnection:
for connection in (self, *self._siblings.values()))
if not resolve(frame, session_ok=entitled):
import logging
logging.getLogger(__name__).debug('dropping response for unknown server request id=%r', frame.get('id'))
what = 'a server request this connection may not settle' if asked else 'unknown server request'
logging.getLogger(__name__).debug('dropping response for %s id=%r', what, frame.get('id'))
async def respond(self, ref, params):
if set(params) != {"session_id", "execution_generation", "prompt_id", "choice"}: