Skip to content

fix: scope ExecutionEventBusManager by tenant and owner to match TaskStore - #707

Merged
JakubWorek merged 2 commits into
mainfrom
jakubworek/scope-event-bus-manager
Sep 8, 2026
Merged

JakubWorek merged 2 commits into
mainfrom
jakubworek/scope-event-bus-manager

Conversation

@JakubWorek

@JakubWorek JakubWorek commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Description

DefaultExecutionEventBusManager keyed live buses on taskId alone while TaskStore is partitioned by (tenant, owner, taskId). Where a host assigns deterministic task ids, a caller in one scope could attach to another scope's live execution through resubscribe or cancelTask, observe its events and metadata, and - via cancelTask's drain - persist that data into its own scope.

The handler now passes ServerCallContext on every ExecutionEventBusManager call, and the default manager partitions buses through ScopedStore, the same structure InMemoryTaskStore uses.

context is optional, existing one-argument callers and custom implementations still works.

A custom manager that accepts context and ignores it stays vulnerable. TypeScript does not flag that, so it has to be updated by hand.

Fixes #704 🦕

@JakubWorek
JakubWorek requested a review from a team as a code owner September 8, 2026 09:00
@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

🧪 Code Coverage

⬇️ Download Full Report

Base PR Delta
src/server/request_handler/default_request_handler.ts 91.83% 91.84% 🟢 +0.01%
src/server/store.ts 68.47% 66.3% 🔴 -2.17%
Total 91.58% 91.56% 🔴 -0.02%

Generated by coverage-comment.yml

@JakubWorek
JakubWorek force-pushed the jakubworek/scope-event-bus-manager branch from 497b143 to 34f5758 Compare September 8, 2026 09:31
@JakubWorek JakubWorek changed the title fix!: scope ExecutionEventBusManager by tenant and owner to match TaskStore fix: scope ExecutionEventBusManager by tenant and owner to match TaskStore Sep 8, 2026
@JakubWorek
JakubWorek requested a review from ishymko September 8, 2026 09:38
@JakubWorek
JakubWorek merged commit 69d8899 into main Sep 8, 2026
20 checks passed
@JakubWorek
JakubWorek deleted the jakubworek/scope-event-bus-manager branch September 8, 2026 09:46
bartek-gralewicz added a commit that referenced this pull request Sep 18, 2026
🤖 I have created a release *beep* *boop*
---


## [1.2.0](v1.1.0...v1.2.0)
(2026-09-18)


### Features

* **server:** Introduce SettleByTaskId method
([#692](#692))
([e856bda](e856bda))


### Bug Fixes

* accept GetExtendedAgentCard JSON-RPC calls with omitted params
([#687](#687))
([047d970](047d970))
* avoid mutating caller message configuration
([#725](#725))
([e3a6428](e3a6428))
* **client:** cache the extended Agent Card only after signature
verification ([#711](#711))
([55b601c](55b601c))
* guard terminal state transitions and make cancelTask atomic
([#636](#636))
([7b87c94](7b87c94))
* preserve call context for JSON-RPC tenant requests
([#708](#708))
([ae20aca](ae20aca))
* preserve HeadersInit in authenticating fetch
([#721](#721))
([f8c33fa](f8c33fa))
* preserve historyLength=0 and reject invalid REST listTasks pageSize
([#685](#685))
([32c1865](32c1865))
* reject empty task IDs with RequestMalformedError in getTask/cancelTask
([#629](#629))
([71aae97](71aae97))
* reject invalid ListTasks status filters with RequestMalformedError
([#631](#631))
([a881fae](a881fae))
* reject missing required extensions before mutating task history
([#690](#690))
([3b4ef3f](3b4ef3f))
* reject whitespace-only taskId on sendMessage
([#689](#689))
([85227a0](85227a0))
* return 404/-32001 for missing push notification configs
([#630](#630))
([34f06e3](34f06e3))
* scope ExecutionEventBusManager by tenant and owner to match TaskStore
([#707](#707))
([69d8899](69d8899))
* stamp the resolved taskId onto sendMessage push configs
([#688](#688))
([cfb19a8](cfb19a8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Bartek Gralewicz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scope ExecutionEventBusManager by tenant and owner to match task store

3 participants