Skip to content

feat: extension point for snapshot materialization logic - #449

Merged
yarolegovich merged 6 commits into
mainfrom
yarolegovich/taskupdate-extension
Oct 6, 2026
Merged

yarolegovich merged 6 commits into
mainfrom
yarolegovich/taskupdate-extension

Conversation

@yarolegovich

@yarolegovich yarolegovich commented Sep 30, 2026 •

Copy link
Copy Markdown
Member
  • Added taskstore.UpdateMaterializer and the a2asrv.WithUpdateMaterializer option so that stores which rebuild state from events can opt ouf of keeping the full task in memory during executions.
  • Added a2aevent.ApplyShallowUpdate. This is the default materializer core now, meaning taskupdate.Manager no longer deep-copies the task on every event, and task kept by the updater is sharing mutable data structures with the event.
  • Internal refactorings make the code not expose updater-tracked *a2a.Task state when not needed. This makes it easier to reason about the effect of using shallow copies. The result was extra-copied but discarded in most of the cases.
  • SetTaskFailed writes a synthetic failed status event to be compatible with event sourced stores.
  • a2aevent.ApplyUpdate accepts user messages and appends them to history.
  • Moved IsFinal to a2aevent.

Decided to make it the default because copying was not really helping. Events were always passed to subscribers without a deep copy, so changing an event after emitting it was already a data race. UpdateRequest.Task was always the updater's state, and a store modifying it would corrupt later updates. The copy can be brought back with a2asrv.WithUpdateMaterializer(taskstore.NewFullUpdateMaterializer(a2aevent.ApplyUpdate)).

closes #443

BEGIN_COMMIT_OVERRIDE
feat: extension point for snapshot materialization logic (#449)
END_COMMIT_OVERRIDE

@yarolegovich yarolegovich changed the title Yarolegovich/taskupdate extension feat: extension point for snapshot materialization logic Sep 30, 2026
Comment thread internal/taskupdate/manager_test.go Resolved
Comment thread internal/taskupdate/manager_test.go Resolved
Comment thread a2asrv/handler_test.go Resolved
@yarolegovich
yarolegovich merged commit 4899045 into main Oct 6, 2026
5 checks passed
@yarolegovich
yarolegovich deleted the yarolegovich/taskupdate-extension branch October 6, 2026 12:08
nahapetyan-serob pushed a commit that referenced this pull request Oct 21, 2026
🤖 I have created a release *beep* *boop*
---


## [2.7.0](v2.6.0...v2.7.0)
(2026-10-21)


### Features

* add input mode validation
([#456](#456))
([8c814be](8c814be))
* extension point for snapshot materialization logic
([#449](#449))
([4899045](4899045))
* reject requests with unsupported A2A-Version
([#457](#457))
([4226e74](4226e74))
* use application/a2a+json with Accept-based negotiation
([#465](#465))
([a8caf47](a8caf47))


### Bug Fixes

* **a2a:** serialize task status timestamps in UTC
([#452](#452))
([b657f33](b657f33))
* decode application/a2a+json error responses in the REST client
([#448](#448))
([3e1aa7f](3e1aa7f))
* **errordetails:** handle nil Value in Typed.MarshalJSON
([#474](#474))
([73c49ac](73c49ac))
* **grpc:** forward next_page_token in push config list responses
([#455](#455))
([7210014](7210014))
* **grpc:** keep caller metadata when attaching service params
([#476](#476))
([f01e895](f01e895))
* honor a2a+json Content Type when Accept is */* or missing
([#468](#468))
([2169266](2169266))
* reject trailing data after the JSON body
([#453](#453))
([e85760e](e85760e))
* **rest:** map non-A2A HTTP error responses by status code
([#471](#471))
([4baba5f](4baba5f))
* return plain error when streaming fails before the first event
([#463](#463))
([cf62533](cf62533))
* **taskstate:** reject unknown task state values on unmarshal and REST
status param ([#404](#404))
([534a60f](534a60f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

Severe backpressure in synchronous message:send for long-output agents (eventqueue buffer 32 + per-event full task persistence)

2 participants