VertexAiRagMemoryService drops distinct events that share a timestamp
メンテナーはふだん 3 日以内に返信
評価
この issue はまだ評価されていません。
説明
search_memory loses distinct events from separate retrieved chunks of the same session when their timestamps match. _merge_event_lists uses timestamps for deduplication, although uploaded transcript lines also store author and text.
Expected: both the question and the answer containing ORCHID are returned, in order. Actual on upstream/main: only the question is returned. Exact copies from overlapping chunks should still appear once.
Offline reproduction (mocked RAG listing and retrieval; no credentials, model, or cloud service).
The final assertion fails on main:
import asyncio
import json
from types import SimpleNamespace as NS
from unittest.mock import AsyncMock, patch
from google.adk.memory.vertex_ai_rag_memory_service import VertexAiRagMemoryService
async def main():
service = VertexAiRagMemoryService(rag_corpus="corpus")
events = [("user", "What is the launch code?"),
("model", "The launch code is ORCHID.")]
contexts = [NS(source_display_name="demo.alice.session", text=json.dumps({
"author": author, "timestamp": 1700000000.0, "text": text,
})) for author, text in events]
client = NS(rag=NS(
list_files=AsyncMock(side_effect=PermissionError("offline")),
retrieve_contexts=AsyncMock(return_value=NS(contexts=NS(contexts=contexts))),
))
with patch("agentplatform.Client", return_value=NS(aio=client)):
response = await service.search_memory(
app_name="demo", user_id="alice", query="launch code")
actual = [(m.author, m.content.parts[0].text) for m in response.memories]
print(actual)
assert actual == events
asyncio.run(main())
Environment: ADK main (2.14.1), Python 3.11.17. Regression introduction unknown. Deterministic offline case.
Suggested fix: retain timestamp-based overlap grouping and stable ordering, but deduplicate using (timestamp, author, text). Parsed Event IDs are regenerated and cannot identify overlapping copies.
- 主要言語
- Python
- スター
- 22.3k
- フォーク
- 4.4k
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google/adk-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
google/adk-python#8360 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
google/adk-python#8359 ·
メンテナーはふだん 3 日以内に返信
-
Can pin to litellm version be changed?対応中かも @llalitkumarrr が 10 日前に担当しました。 オープンmodels
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
google/adk-python#8129 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
OpenAPI tools ignore operation- and path-level server overrides対応中かも @sanketpatil06 が 14 日前に担当しました。 オープンtools
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
google/adk-python#8064 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
Two docstrings in openapi_tool document parameters the signatures do not accept対応中かも @surajksharma07 が 17 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
google/adk-python#8024 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
google/adk-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
vllm-project/vllm#70030 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TigreGotico/tugaphone#408 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
gke-labs/kube-agents#7308 ·
メンテナーはふだん 1 日以内に返信
-
t: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 3 日以内に返信
-
chore
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
lugassawan/swe-workbench#841 ·