Skip to content

Conversation

NathanFlurry
Copy link
Member

No description provided.

Copy link

vercel bot commented Sep 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
rivetkit-serverless Error Error Sep 18, 2025 7:12pm

Copy link

claude bot commented Sep 18, 2025

Claude finished @NathanFlurry's task —— View job


Code Review: chore(core): fix missing transport for inline tests

Summary

This PR makes two key improvements to the test inline client driver:

  1. Fixes missing transport validation - Removes unnecessary invariant check and properly handles default transport fallback
  2. Adds missing duplex: "half" property - Ensures fetch requests with body are properly configured

Detailed Review

Code Quality & Best Practices

Good practices observed:

  • Clean variable extraction for transport improves readability
  • Consistent use of RequestInit type casting
  • Proper fallback handling with ?? "websocket"

Minor suggestion:

  • The redundant assignment transport: transport in packages/rivetkit/src/driver-test-suite/utils.ts:50 could be simplified to just transport (ES6 shorthand property)

Bug Fixes

Critical fix identified:

  • Missing duplex: "half": The addition of this property to both fetch calls is essential. Without it, fetch requests with a body can fail in some environments (particularly in newer Node.js versions and browsers). This was likely causing test failures.

Logic improvement:

  • Removed unnecessary invariant: The original code had an unnecessary assertion after already providing a default value. The fix properly handles the case where driverTestConfig.transport is undefined by defaulting to "websocket".

Performance Considerations

  • No performance impact - changes are minimal and don't affect execution efficiency
  • Variable extraction slightly improves readability without performance cost

Security Concerns

  • No security issues introduced
  • The fetch configurations remain safe and appropriate for test environments

Test Coverage Impact

  • Positive impact: These changes should improve test reliability
  • The transport defaulting ensures inline tests work even when transport isn't explicitly configured
  • The duplex: "half" addition prevents fetch-related test failures

Files Changed:

  • packages/rivetkit/src/driver-test-suite/test-inline-client-driver.ts:114,563 - Added duplex: "half" to fetch calls
  • packages/rivetkit/src/driver-test-suite/utils.ts:42-49 - Fixed transport handling logic

Verdict: ✅ LGTM

This is a solid chore commit that fixes important test infrastructure issues. The changes are minimal, targeted, and improve test reliability without introducing any risks.


Todo List:

  • Read and analyze changed files
  • Review code quality and best practices
  • Check for potential bugs or issues
  • Evaluate performance considerations
  • Assess security concerns
  • Review test coverage impact
  • Provide comprehensive feedback

Copy link
Member Author

NathanFlurry commented Sep 18, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

pkg-pr-new bot commented Sep 18, 2025

More templates

@rivetkit/actor

pnpm add https://pkg.pr.new/rivet-dev/rivetkit/@rivetkit/actor@1287

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivetkit/@rivetkit/cloudflare-workers@1287

@rivetkit/core

pnpm add https://pkg.pr.new/rivet-dev/rivetkit/@rivetkit/core@1287

@rivetkit/db

pnpm add https://pkg.pr.new/rivet-dev/rivetkit/@rivetkit/db@1287

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivetkit/@rivetkit/framework-base@1287

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivetkit/@rivetkit/next-js@1287

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivetkit/@rivetkit/react@1287

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivetkit@1287

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivetkit/@rivetkit/sql-loader@1287

commit: f7af692

Copy link

graphite-app bot commented Sep 24, 2025

Merge activity

  • Sep 24, 6:06 AM UTC: NathanFlurry added this pull request to the Graphite merge queue.
  • Sep 24, 6:07 AM UTC: CI is running for this pull request on a draft pull request (#1294) due to your merge queue CI optimization settings.
  • Sep 24, 6:08 AM UTC: Merged by the Graphite merge queue via draft PR: #1294.

@graphite-app graphite-app bot closed this Sep 24, 2025
@graphite-app graphite-app bot deleted the 09-18-chore_core_fix_missing_transport_for_inline_tests branch September 24, 2025 06:08
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