Skip to content

feat(sse): allow disabling conversation tracking - #13150

Merged
diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.51from
cryptiklemur:feat/disable-conversation-tracking
Sep 17, 2026
Merged

diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.51from
cryptiklemur:feat/disable-conversation-tracking

Conversation

@cryptiklemur

Copy link
Copy Markdown
Contributor

adds OMNIROUTE_DISABLE_CONVERSATION_TRACKING=1 for operators who do not need the conversation-history dashboard.

when set, resolveConversationId() returns an untracked result before reading SQLite or parsing message history. the switch also covers client-supplied session IDs. existing routing-session handling stays unchanged, and tracking remains enabled by default.

on the reporting installation, 5.97 million turn records and their indexes occupied about 4.26 GB. operators should be able to stop collecting this optional history without disabling normal request routing.

tested with node --import tsx/esm --test tests/unit/conversationTracker.test.ts tests/unit/conversationTracker-reconnect-7847.test.ts.

the new regression test rejects both database access and message parsing while disabled. existing enabled-tracking and reconnect tests still pass.

this switch does not delete existing records. the installation-specific cleanup and deployment are excluded.

base-red inherited: #12732.

@diegosouzapw

Copy link
Copy Markdown
Owner

Clean, small, well-tested fix for a real operational pain point (5.97M turn rows / ~4.26 GB of
optional history on the reporting install). The early-return before any DB/parsing work is the
right approach, and the string | null return-type change is consistent with the existing
null-handling convention at the one call site. Ran conversationTracker.test.ts at this PR's
head: 18/18 pass, including the new disabled-tracking case, with no regressions. One thing
missing: OMNIROUTE_DISABLE_CONVERSATION_TRACKING isn't documented in .env.example or
docs/reference/ENVIRONMENT.md yet — could you add an entry there (same style as the
neighboring vars)? Should be release-green otherwise.

@cryptiklemur

Copy link
Copy Markdown
Contributor Author

Added

@diegosouzapw
diegosouzapw merged commit 7e0c9f5 into diegosouzapw:release/v3.8.51 Sep 17, 2026
11 of 16 checks passed
@diegosouzapw diegosouzapw mentioned this pull request Sep 21, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
* feat(sse): allow disabling conversation tracking

* docs: document OMNIROUTE_DISABLE_CONVERSATION_TRACKING
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.

2 participants