Files
OmniRoute/open-sse/utils
Diego Rodrigues de Sa e Souza 94328d5cb2 fix(sse): apply commentary-phase drop filter in TRANSLATE mode (#6952) (#6990)
The #6199/#6561 commentary-phase filter (shouldDropResponsesCommentaryEvent)
was wired only into createSSEStream's PASSTHROUGH branch. The TRANSLATE-mode
loop (openai-responses upstream -> another client format, e.g. codex routes
streaming into Claude Code) called translateResponse() on every raw chunk
without checking phase, so internal commentary-phase scratchpad text leaked
into the client-visible content channel as duplicate prose and narrated
tool-call arguments.

Extends the same stateful filter into TRANSLATE mode via a small factory
(createTranslateCommentaryFilter) that owns its own item/index Sets, keeping
the wiring in stream.ts (a frozen file) to a single guarded line.

Fail->pass evidence:
- tests/unit/repro-6952-commentary.test.ts against origin/HEAD (pre-fix):
  FAILED - "commentary-phase prose must not reach the translated client stream"
- Same test against the fix: PASSED (2/2)
2026-07-12 18:07:49 -03:00
..
2026-07-02 10:47:13 -03:00
2026-06-29 08:40:06 -03:00
2026-06-17 19:26:32 -03:00
2026-06-27 09:07:12 -03:00
2026-07-04 13:00:30 -03:00
2026-06-27 09:07:12 -03:00
2026-07-02 10:47:13 -03:00
2026-06-29 08:40:06 -03:00
2026-07-02 10:47:13 -03:00
2026-06-26 02:51:06 -03:00
2026-05-29 12:44:29 -03:00
2026-06-20 14:55:24 -03:00
2026-06-28 06:58:29 -03:00
2026-06-26 02:51:06 -03:00
2026-06-23 03:08:29 -03:00
2026-05-26 23:51:47 -03:00
2026-06-09 15:56:24 -03:00
2026-07-02 10:47:13 -03:00
2026-06-29 08:40:06 -03:00
2026-06-13 17:27:40 -03:00
2026-06-13 17:27:40 -03:00
2026-07-02 10:47:13 -03:00
2026-06-27 09:07:12 -03:00
2026-07-02 10:47:13 -03:00
2026-05-29 12:44:29 -03:00
2026-06-30 06:54:29 -03:00
2026-07-02 10:47:13 -03:00
2026-06-30 06:54:29 -03:00
2026-06-07 07:20:02 -03:00
2026-06-26 02:51:06 -03:00
2026-07-02 10:47:13 -03:00