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 18, 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 18, 2025 9:09am
rivetkit-serverless Ready Ready Preview Comment Oct 18, 2025 9:09am

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

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.

@claude
Copy link

claude bot commented Oct 18, 2025

PR Review: Allow configuring metadata

Summary

This PR adds support for configuring metadata in serverless runner configurations. The change allows platforms to identify themselves via metadata (e.g., { provider: "next-js" }).

Issues Found

🔴 Critical: Type Definition Mismatch

The RunnerConfigRequest interface in packages/rivetkit/src/remote-manager-driver/api-endpoints.ts:99-114 is missing the metadata field that's being added to the request payload in packages/rivetkit/src/registry/mod.ts:278.

Current interface:

export interface RunnerConfigRequest {
  datacenters: Record<
    string,
    {
      serverless: {
        url: string;
        headers: Record<string, string>;
        max_runners: number;
        min_runners: number;
        request_lifespan: number;
        runners_margin: number;
        slots_per_runner: number;
      };
    }
  >;
}

Required fix:

export interface RunnerConfigRequest {
  datacenters: Record<
    string,
    {
      serverless: {
        url: string;
        headers: Record<string, string>;
        max_runners: number;
        min_runners: number;
        request_lifespan: number;
        runners_margin: number;
        slots_per_runner: number;
      };
      metadata: Record<string, unknown>;
    }
  >;
}

This will cause TypeScript compilation errors when running pnpm check-types.

Recommendations

  1. Type Safety: Update the RunnerConfigRequest interface to include the metadata field
  2. Testing: Consider adding a test to verify that metadata is correctly passed through to the runner configuration
  3. Documentation: Add JSDoc comment to the metadata field in RunnerConfigSchema explaining its purpose (e.g., "Arbitrary metadata to attach to the runner configuration for identification and tracking purposes")

Positive Notes

  • ✅ Good use of defaults (customConfig.metadata ?? {}) to ensure backward compatibility
  • ✅ Appropriate type validation using Zod (z.record(z.unknown()))
  • ✅ Sensible default metadata for Next.js platform identification
  • ✅ Follows the project's coding style

Severity

High - The missing type definition will cause compilation errors and runtime type mismatches.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 18, 2025

More templates

@rivetkit/actor

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

@rivetkit/cloudflare-workers

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

@rivetkit/core

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

@rivetkit/db

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

@rivetkit/framework-base

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

@rivetkit/next-js

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

@rivetkit/react

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

rivetkit

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

@rivetkit/sql-loader

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

commit: 4e896a1

@graphite-app
Copy link

graphite-app bot commented Oct 18, 2025

Merge activity

  • Oct 18, 7:06 PM UTC: NathanFlurry added this pull request to the Graphite merge queue.
  • Oct 18, 7:06 PM UTC: CI is running for this pull request on a draft pull request (#1407) due to your merge queue CI optimization settings.
  • Oct 18, 7:07 PM UTC: Merged by the Graphite merge queue via draft PR: #1407.

graphite-app bot pushed a commit that referenced this pull request Oct 18, 2025
@graphite-app graphite-app bot closed this Oct 18, 2025
@graphite-app graphite-app bot deleted the 10-18-chore_core_allow_configuring_metadata branch October 18, 2025 19:07
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.

1 participant