Skip to content

Revert: stable client connectionId (PR #401)#403

Merged
dimakis merged 1 commit into
mainfrom
revert/pr-401-transport-connectionid
Jun 27, 2026
Merged

Revert: stable client connectionId (PR #401)#403
dimakis merged 1 commit into
mainfrom
revert/pr-401-transport-connectionid

Conversation

@dimakis

@dimakis dimakis commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Summary

Evidence from logs

  • connection-registry retrying missed events every 5s, missedCount climbing to 48
  • Single connectionId (conn-410546be...) cursor-resetting across two different sessionIds — one connection serving events for multiple sessions

Test plan

🤖 Generated with Claude Code

@dimakis dimakis left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Centaur Review

Found 2 issue(s).

packages/client/src/store.ts

Clean revert of PR #401 — no dangling references, no broken imports, and removed features are fully excised. Two minor gaps: stale sendError after reconnect-flush (pre-existing), and lost test coverage for SessionSseRegistry.add() reconnect behavior.

  • 🔵 regressions (L375): After revert, sendError set on failed send ('Not connected…') is only cleared when a new session starts via startChat(). If the connection recovers and the queued message is flushed successfully, the stale error banner persists in the UI until the user starts another session. This was the pre-#401 behavior being restored, but worth noting as a known gap. [fixable]

server/__tests__/session-sse-registry.test.ts

Clean revert of PR #401 — no dangling references, no broken imports, and removed features are fully excised. Two minor gaps: stale sendError after reconnect-flush (pre-existing), and lost test coverage for SessionSseRegistry.add() reconnect behavior.

  • 🔵 missing_tests: The entire session-sse-registry.test.ts file was deleted. It contained tests for add (closing existing streams on reconnect) and removeIfCurrent. While removeIfCurrent was removed, the add reconnect behavior (closing stale streams) is still present in the implementation and now has no dedicated test coverage. [fixable]

@@ -373,12 +373,6 @@ export function createMitzoStore(options: MitzoStoreOptions): StoreApi<MitzoStor
const sent = connection.send(msg);
if (!sent) {
set({ sendError: 'Not connected. Message will be sent when reconnected.' });

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 regressions: After revert, sendError set on failed send ('Not connected…') is only cleared when a new session starts via startChat(). If the connection recovers and the queued message is flushed successfully, the stale error banner persists in the UI until the user starts another session. This was the pre-#401 behavior being restored, but worth noting as a known gap. [fixable]

@dimakis dimakis merged commit 1f6e338 into main Jun 27, 2026
1 check 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