fix(proxy): mark the aggregation fold Final

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
devin-ai-integration[bot] 2026-10-23 21:07:25 +00:00
parent d642ada2f7
commit 20aebe8ba1

View file

@ -24,7 +24,7 @@ def _merged(existing: ToolDiscoveryQueueItem | None, item: ToolDiscoveryQueueIte
def aggregate_tool_discoveries(items: Iterable[ToolDiscoveryQueueItem]) -> tuple[ToolDiscoveryQueueItem, ...]:
"""Collapse items to one per tool_name, summing call_count, in first-seen order."""
by_name: dict[str, ToolDiscoveryQueueItem] = {} # mutable-ok: single pass fold keyed by tool_name
by_name: Final[dict[str, ToolDiscoveryQueueItem]] = {} # mutable-ok: single pass fold keyed by tool_name
for item in items:
if not (tool_name := item.get("tool_name", "")):
continue