[Bug]: TaskEventStream methods don't receive ServerCallContext
Maintainer antworten meist innerhalb von 2 Tagen
@rohityan arbeitet bereits daran.
Seit 23.10.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
What happened?
Version: a2a-sdk 1.2.1
Problem
TaskEventStream (a2a/server/cluster/event_stream.py L17–32) is keyed only by task_id:
async def publish(self, task_id: str, event: VersionedEvent) -> None: ...
def subscribe(self, task_id: str, *, after: TaskVersion) -> AsyncGenerator[VersionedEvent, None]: ...
async def destroy(self, task_id: str) -> None: ...
TaskStore, VersionedTaskStore and PushNotificationConfigStore.{set,get,delete}_info all take context: ServerCallContext. TaskEventStream and PushNotificationConfigStore.get_info_for_dispatch don't.
Context-derived identity is already central to the SDK — OwnerResolver = Callable[[ServerCallContext], str], and DatabaseTaskStore scopes every query by owner = self.owner_resolver(context). TaskEventStream can't participate.
Impact
DefaultRequestHandlerV2 holds one event_stream from construction (L143) and calls publish (L304) / subscribe (L571) with no caller information, so an implementation is permanently bound to its startup resources. That rules out selecting a backing resource per caller, refreshing credentials at a request boundary, propagating auth downstream, or request-scoped tracing — all of which TaskStore supports today.
Related: DatabaseTaskEventStream filters only on task_id/seq, never on the owner column it writes. Authorization is enforced upstream (_versioned_store.get(task_id, context) precedes subscribe), so the default composition is safe — but the stream can't check independently.
Proposed change
Add context: ServerCallContext to the three methods, optional for source compatibility:
async def publish(self, task_id: str, event: VersionedEvent, context: ServerCallContext | None = None) -> None: ...
def subscribe(self, task_id: str, *, after: TaskVersion, context: ServerCallContext | None = None) -> ...: ...
async def destroy(self, task_id: str, context: ServerCallContext | None = None) -> None: ...
The handler already holds the context at both call sites.
get_info_for_dispatch has the same gap — dispatch runs after the request completes, so it needs a stored context, not a live one.
Relevant log output
Code of Conduct
- I agree to follow this project's Code of Conduct
- Vorherrschende Sprache
- Python
- Sterne
- 2.2k
- Forks
- 518
- Ø Merge
- 3 T. 12 Std.
- Gemergte PRs (30 T.)
- 39
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus a2aproject/a2a-python
-
[Bug]: `A2A-Version` validation ignores minor versions and the query parameterEvtl. vergeben @rohityan hat das vor 61 Tagen übernommen. Offencomponent: server status:awaiting response
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
a2aproject/a2a-python#1204 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[Bug]: REST task/request id sanitizationEvtl. vergeben @Linux2010 hat das vor 119 Tagen übernommen. Offenmaintainers-only
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
a2aproject/a2a-python#805 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[Bug]: v0.3 JSON-RPC compat adapter returns -32603 for all A2A errors (e.g. TaskNotFound should be -32001)Evtl. vergeben @shwetangsinha0509 hat das vor 3 Tagen übernommen. Offencomponent: server status:awaiting response
a2aproject/a2a-python#1368 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[Bug]: VersionedDatabaseTaskStore get() and delete() fail with "no such table" when initialize() was not calledEvtl. vergeben @cchinchilla-dev hat das vor 3 Tagen übernommen. Offencomponent: server status:awaiting response
a2aproject/a2a-python#1356 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
-
DefaultRequestHandler (v2) ignores queue_manager, so the per-task event queue bound (1,024) cannot be configuredEvtl. vergeben @mykytanetipa hat das vor 6 Tagen übernommen. Offencomponent: server status: needs review
a2aproject/a2a-python#1339 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in a2aproject/a2a-python
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Arekkazu/sgpmp-backend#744 ·
Maintainer antworten meist innerhalb von 1 Tag
-
agent/reviewer
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
projectbluefin/utah-packages#634 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement good first issue help wanted
Schwierigkeit 2/5 1-2 Tage Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
home-assistant/core#188613 ·
Maintainer antworten meist innerhalb von 1 Tag
-
WebsiteOffengood first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 91/100
TanbirRamim/open-source-radar#314 ·
Maintainer antworten meist innerhalb von 1 Tag