-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(upload-api)!: integrate agent store for idempotence & invocation…
…/receipt persistence (#1444) This is a draft that I could not finished on Friday, but I thought I'd share in case @vasco-santos or @alanshaw are looking into related stuff on Monday. PR introduces AgentStore that is used for writing ucanto AgentMessage's from which receipts and invocations get indexed. This store is then consulted by a service during invocations to provide idempotence or more simply to return receipt without executing a task if we already have one. Main goal here is to take out custom logic out of w3infra and to remove need for manual receipt / invocation storing in the handlers.⚠️ It is worth calling out that this is significantly changes how things work. In the past sending same invocation used to re-run the handler, with this change that is no longer the case and you'll get a same receipt back (which is a neat way to lookup receipts actually). However that also means that bunch of our tests were affected. I don't expect it would affect real world cases however, because same invocation send second later will have unique CID (due to how we generate expiry) however it does affect tests because we don't wait a second between calls. That is why nonce's were added in a lot of places, but that is not something I expect users would have to do. --------- Co-authored-by: Joao Andrade <sousa.andrade.joao@gmail.com> Co-authored-by: Alan Shaw <alan.shaw@protocol.ai> Co-authored-by: Vasco Santos <santos.vasco10@gmail.com>
- Loading branch information
1 parent
92f3017
commit c9bf33e
Showing
56 changed files
with
9,874 additions
and
7,354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.