fix(tangle): preserve bounded stream and response content - #305
Merged
Conversation
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.
Sandbox streams failed when a complete tool result exceeded the 16,384-character metadata limit. A reconstructed stream using 17,511 characters of redacted Codex output reproduces the failure on the previous provider. The original failing cloud frame was not retained.
Interface now defines bounded event and response content with a 1 MiB limit on serialized UTF-8 JSON. Tangle uses that shared contract for complete frames and final result readback, preserving full tool output, normalized assistant text, and measured usage. Generic metadata, identifiers, and structural limits remain bounded. Canonical optional fields preserve JSON omission semantics; raw provider JSON remains strict.
This includes the generated patch releases for Interface 2.6.1 and Tangle provider 1.1.7. The provider requires the new Interface export.
Validation on Node 22.23.2:
The stream fixture reconstructs a Sandbox frame around retained native output; it is a regression reproduction, not a replay of the unavailable cloud frame.