Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughEnables socket streaming for HTTP upgrade connections by calling Changes
🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@test/js/node/http/node-http-upgrade-socket-write.test.ts`:
- Around line 128-143: The test titled "socket.pipe() works with upgrade
sockets" does not actually call socket.pipe; update the test inside the
server.on("upgrade", (req, socket, head) => { ... }) handler to use
socket.pipe(socket) instead of the manual socket.on("data", chunk =>
socket.write(chunk)) or else rename the test to reflect the current behavior
(e.g., "upgrade socket echoes data"); also fix the typo "recieved" to "received"
in the handler comment.
- Around line 4-66: The test opens resources (server via createServer/listen and
a raw connection via Bun.connect assigned to conn) but doesn't guarantee cleanup
if clientDone rejects; wrap the server and connection lifecycle in a
deterministic cleanup block (use await using/disposable for Bun.connect and
server if available, or a try/finally) so that conn.end() and server.close()
always run; locate the upgrade test (the test named "socket.write() works in
upgrade event handler", references to createServer, server.listen, Bun.connect,
conn, clientDone) and ensure resources are disposed in finally/using to avoid
leaking the server or socket on failures.
In `@workspace.code-workspace`:
- Line 94: The change adds an unrelated IDE setting "zig.buildOnSaveProvider":
false into the workspace config; remove this accidental local preference from
the commit by reverting or deleting that JSON key so the PR only contains the
socket.write() HTTP upgrade fix (look for the "zig.buildOnSaveProvider" entry in
the workspace configuration and remove it or revert that file to its previous
state).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 303de33e-c5d1-48a9-819a-c4e8d9b7d837
📒 Files selected for processing (3)
src/js/node/_http_server.tstest/js/node/http/node-http-upgrade-socket-write.test.tsworkspace.code-workspace
uhh so my web server wasnt working like at all on bun but worked just fine on node.
i cloned bun, fixed it, then wrote a test.