Repository navigation
Conversation
Run-owned connections/retries/cleanup, with a compatibility Owner for request-scoped startup and late adoption. Gateway temp files now track connection lifetime, and shutdown/error propagation is complete across cancellation and crash-recovery paths, backed by regression tests. Assisted-By: cagent
rumpl
reviewed
Oct 20, 2026
| values context.Context //nolint:containedctx // Carries the adopting request's values, never its lifetime. | ||
| } | ||
|
|
||
| // NewOwner creates an inert legacy API adapter. Stop permanently closes it. |
Member
There was a problem hiding this comment.
What is an inert legacy API adapter? Why do we handle legacy?
rumpl
reviewed
Oct 20, 2026
| } | ||
|
|
||
| // MarkReadyForTesting bypasses connection setup for transport tests. | ||
| func (o *Owner) MarkReadyForTesting() { |
Member
There was a problem hiding this comment.
Are we really adding public methods that should only be used in tests?
dgageot
marked this pull request as draft
October 21, 2026 05:39
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #4674 (transcription context-ownership refactor). This PR applies the same ownership split to tool supervision.
What changed
Supervisor.Runis now immutable and owns connections, retry timers, and cleanup for the lifetime of a tool server.Ownerhandles request-scoped startup/adoption and serializes crash recovery, sitting on top ofRun.Scope note: toolsets and shared MCP/LSP clients are still stateful, and
Startableremains — this is not a full stateless toolset redesign, just the supervisor/ownership layer.Testing
task build(CI=true),task test,task lintall pass.-raceruns acrosstools,acp,agent,team,runtime,teamloaderpass.