Skip to content

fix: allow only public legacy stream errors - #197

Merged
AetherAI3 merged 1 commit into
mainfrom
fix/allowlist-legacy-stream-errors
Sep 27, 2026
Merged

AetherAI3 merged 1 commit into
mainfrom
fix/allowlist-legacy-stream-errors

Conversation

@AetherAI3

Copy link
Copy Markdown
Owner

Summary

The alternate SSE error field is not a general public-message contract: some historical media paths placed provider exception text there. Restrict the 0.4 client fallback introduced in #196 to two audited, fixed legacy public media messages. Continue to accept canonical msg and message strings. All other error values use the existing generic failed-turn message; reason remains omitted.

The client still exits nonzero on every error frame and ignores any trailing done frame.

Verification

  • npm run build
  • node --test --test-isolation=none dist/test/stream.test.js dist/test/turn_lifecycle.test.js (39 passed)
  • git diff --check

Synthetic regressions cover both fixed legacy messages, canonical precedence, strict allowlist matching, a secret-looking arbitrary error with terminal controls, hidden reason, a trailing done frame, and one-shot exit code 1.

No package tag or publication is included.

@AetherAI3
AetherAI3 merged commit 51b4453 into main Sep 27, 2026
9 checks passed
@AetherAI3
AetherAI3 deleted the fix/allowlist-legacy-stream-errors branch September 27, 2026 22:27
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