Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Conversation

@NathanFlurry
Copy link
Member

No description provided.

@vercel
Copy link

vercel bot commented Oct 22, 2025

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

Project Deployment Preview Comments Updated (UTC)
rivetkit-next-js-max Ready Ready Preview Comment Oct 22, 2025 0:36am
rivetkit-serverless Ready Ready Preview Comment Oct 22, 2025 0:36am

Copy link
Member Author


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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 22, 2025

More templates

@rivetkit/actor

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

@rivetkit/cloudflare-workers

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

@rivetkit/core

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

@rivetkit/db

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

@rivetkit/framework-base

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

@rivetkit/next-js

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

@rivetkit/react

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

rivetkit

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

@rivetkit/sql-loader

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

commit: 5499921

@claude
Copy link

claude bot commented Oct 22, 2025

PR Review: Fix querying actor by ID

Summary: This PR fixes the /actors GET endpoint to allow querying actors by ID without requiring the actor name.

Strengths:

  1. Comprehensive validation logic with clear error messages
  2. Efficient lookup strategy with early break at router.ts:355
  3. API consistency - removing name parameter from getActor makes sense
  4. Proper logging level change from info to error at mod.ts:73

Issues & Recommendations:

  1. Performance: O(n×m) iteration pattern at router.ts:347-357. Nested loop iterates through all actor types for each actor ID. With 32 actor IDs and many actor types, this could result in many unnecessary getForId calls.

  2. Error handling: Per CLAUDE.md, errors should extend ActorError classes like InvalidParams rather than returning raw JSON with c.json. Lines 287-313 violate this style guide.

  3. Missing validation for empty actor_ids array. Validation does not fully account for cases where actor_ids parses to empty array.

  4. Type safety: Non-null assertion at line 364. Use type guard (else if key && name) instead of name!

Test Coverage: Missing tests for /packages/rivetkit/src/manager/. Need unit tests for validation logic, integration tests for lookup, and performance tests.

Verdict - Must address before merge:

  • Add test coverage
  • Use ActorError classes per style guide

Should address:

  • Optimize nested loop performance
  • Improve type safety

Overall good fix! With recommended changes, will be production-ready.

@NathanFlurry NathanFlurry merged commit 439cc09 into main Oct 22, 2025
9 of 10 checks passed
@NathanFlurry NathanFlurry deleted the 10-21-fix_core_fix_querying_actor_by_id branch October 22, 2025 03:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants