fix(sdk): make cleanup reliable and preserve typed tool arguments - #21
Merged
Merged
Conversation
gersmann
marked this pull request as ready for review
September 16, 2026 16:11
Contributor
|
Codex Autonomous Review:
No incremental changes since the previously reviewed commit; nothing new to review or flag. Tip: comment with "/codex address comments" to attempt automated fixes for unresolved review threads. |
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.
Failed or cancelled requests could retain pending state, concurrent closes could return before cleanup finished, and closed streams could block on another read. Temporary Codex owners could also close live streams, while tool dispatch converted validated nested objects back into dictionaries.
This change makes requests own their cleanup, joins session shutdown through one shielded task, gives streams one exhaustion flag, and retains their originating owner. Cancellation watchers stop when consumption ends, and tool callbacks receive validated Python values directly.
Validation:
rtk proxy env RUSTUP_TOOLCHAIN=1.95.0 make lint— passed; editable native package built successfully and all 29 package files passed mypy.rtk proxy env RUSTUP_TOOLCHAIN=1.95.0 make test— 266 passed, 2 skipped; 92.02% coverage.rtk proxy git diff --cached --check— passed before commit.Markdown files and generated protocol models are excluded from this PR.