Skip to content

fix(tangle): preserve bounded stream and response content - #305

Merged
drewstone merged 1 commit into
mainfrom
fix/tangle-stream-event-content
Sep 9, 2026
Merged

fix(tangle): preserve bounded stream and response content#305
drewstone merged 1 commit into
mainfrom
fix/tangle-stream-event-content

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

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:

  • All nine packages build and typecheck.
  • All 1,753 package tests pass across the full run and affected-package reruns.
  • Five provider regressions cover the recorded output shape, canonical result validation, exact-session final readback, UTF-8/escape boundaries, and retained metadata/identity checks.
  • Interface tests compare JSON byte boundaries with the native serializer and reject malformed or customized arrays.
  • Package artifact checks cover 9 isolated packages, 31 exports, and 62 targets.
  • Packed control-contract tests pass: 183 tests.

The stream fixture reconstructs a Sandbox frame around retained native output; it is a regression reproduction, not a replay of the unavailable cloud frame.

@drewstone
drewstone merged commit 1d4a5a3 into main Sep 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant