Repository navigation
fix: wait for HTTP event stream before heartbeat - #205
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesHTTP heartbeat readiness
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change delays HTTP heartbeat startup until a successful event stream is established while preserving POST-only session behavior. No actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant HTTPClient
participant SessionStore
participant MCPServer
participant Heartbeat
HTTPClient->>SessionStore: Create stateful session
SessionStore->>MCPServer: connect with eventStreamReady
HTTPClient->>SessionStore: Open text/event-stream
SessionStore->>MCPServer: Handle event-stream request
MCPServer-->>SessionStore: Write HTTP 200 headers
SessionStore-->>Heartbeat: Resolve readiness
Heartbeat-->>HTTPClient: Send server-initiated pings
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Upstream change
Playwright MCP v0.0.80 includes microsoft/playwright#42189 and commit 43a9121961cb7dacd753133a6b5765bc00289d53. The HTTP heartbeat now waits until the client opens its event stream.
Why it matters here
This server started heartbeat on the first stateful HTTP tool call. A POST-only client cannot receive the server-initiated ping, so the server could close a healthy session after the ping timeout.
Fix
Validation
Passed:
The full npm test run reaches 920 passing tests, 27 skipped, and 31 failures already present outside this diff: 3 recorder tests read a missing config.snapshot fixture, and 28 browser-backed screen-reader tests cannot launch because the current Playwright browser is not installed in this worktree.
Summary by CodeRabbit