Repository navigation
fix(sdk): release completed embedded request signals - #51012
Closed
opencode-agent[bot] wants to merge 1 commit into
Closed
opencode-agent[bot] wants to merge 1 commit into
opencode-agent[bot] wants to merge 1 commit into
Conversation
Contributor
|
Superseded by #53613. |
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.
Status: diagnostic disproved this as the Agent memory fix — do not merge
The source change makes a synthetic
OwnedFetchhandler release abort listeners, but a real embedded Effect SDK run still retains oneRequestper fully consumed request. The identical growth occurs throughHttpEffect.toWebHandleralone, without the SDK transport. The proposed SDK change does not fix the reported Agent path.In a local 300-call run on Bun 1.3.14, after full GC and while the host remained alive:
Requestobjects.Requestobjects.OpenCode.create()+client.server.info(): 300 additionalRequestobjects.The result is unchanged with or without this PR's
OwnedFetchchange. Its responsefinishcallback runs on all 300 requests, the internal signal is aborted, and the real handler still retains the objects. Disabling or removing the Effect request abort listener in a local diagnostic also did not remove the retention. The cause within Effect/Bun has not been established, and the production profile's full RSS/array-buffer amount has not been attributed. The exact local red-capable diagnostic isbun test --timeout 30000 test/retention-repro.temp.test.tsfrompackages/sdkin the task worktree; this scratch test is not part of the PR.This PR has been converted to draft. Keep production unchanged; investigate the minimal Effect/Bun reproduction before proposing a replacement fix. Related: anomalyco/anomaly#260 and anomalyco/anomaly#623 (independent Agent fleet worker fix).
Requested by: @kitlangton (Kit via Slack)