Skip to content

fix(sse): broaden OMNIROUTE_SSE_COMMENTS to accept 'false','0','no' and gate metadata comment emission (#9305) - #9413

Merged
diegosouzapw merged 4 commits into
release/v3.8.50from
fix/9305-omniroute-sse-comments-off-d
Aug 8, 2026
Merged

diegosouzapw merged 4 commits into
release/v3.8.50from
fix/9305-omniroute-sse-comments-off-d

Conversation

@diegosouzapw

@diegosouzapw diegosouzapw commented Aug 4, 2026 •

Copy link
Copy Markdown
Collaborator

⚠️ base-red inherited: #9737 — 13 HARD failures pre-existing on release/v3.8.50, none from this PR's changes. See the release-green issue for details.


Closes #9305

Two bugs fixed:

Bug A — Env var too narrow: sseCommentsEnabled() only recognized "off" as a disabling value, ignoring "0", "false", and "no" (the standard OmniRoute convention).

@xiaoyaner0201

Copy link
Copy Markdown
Contributor

Thanks for picking this up. This overlaps with the Draft I published earlier as #9378, and the production behavior in this PR matches the same core fix.

I ran the stronger finalization test from #9378 against this PR's exact head 6c47da73595963e7421ab7bb2e68c559a16127ce in an isolated test-only worktree. It passed 6/6 across both upstream [DONE] and natural-EOF finalization, including:

  • disabled comments remove all final : x-omniroute-* metadata;
  • default/explicitly enabled behavior still emits metadata;
  • ordinary chunks, synthetic finish output, and [DONE] ordering remain intact;
  • usage/accounting completion, pending-request cleanup, and logger/client ordering remain intact.

Your native tests/unit/sseHeartbeat.test.ts also passed 4/4 on that exact head. The current test changes here validate the environment-value parser and heartbeat path, but do not directly exercise final metadata emission; the focused test is tests/unit/sse-comments-optout-9305.test.ts in #9378 if you want to copy or cherry-pick that coverage into this maintainer-owned PR.

I will keep #9378 Draft and avoid competing updates while this PR is active.

@diegosouzapw diegosouzapw added the base-red Release/main tip is red — PRs cut now inherit these failures label Aug 8, 2026
@diegosouzapw
diegosouzapw merged commit 6b706f6 into release/v3.8.50 Aug 8, 2026
10 checks passed
@diegosouzapw
diegosouzapw deleted the fix/9305-omniroute-sse-comments-off-d branch August 8, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

base-red Release/main tip is red — PRs cut now inherit these failures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(backend): OMNIROUTE_SSE_COMMENTS=off does not suppress the comments

2 participants