Skip to content

Conversation

@jog1t
Copy link
Contributor

@jog1t jog1t commented Feb 6, 2026

Description

This PR removes the unused waitForNames method from the QueueManager class and reorganizes imports across several files to improve code organization. It also fixes the Drizzle ORM exports by creating a new sqlite-core.ts file that re-exports specific functions from the Drizzle ORM package, rather than exporting everything directly.

Additionally, the PR updates the createFileSystemOrMemoryDriver function to accept an options object instead of separate parameters, making the API more flexible and consistent.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

The changes have been tested with the existing test suite to ensure that the removal of the unused method and the reorganization of imports don't break any functionality.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@jog1t jog1t requested a review from NathanFlurry February 6, 2026 19:06
@jog1t jog1t marked this pull request as ready for review February 6, 2026 19:06
Copy link
Contributor Author

jog1t commented Feb 6, 2026


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

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 Feb 6, 2026

Pull Request Review: fix: rivetkit build

🚨 Critical Issue - Breaking Change Without Migration

BLOCKER: Removed waitForNames method is still in use

The PR removes the waitForNames method from QueueManager (lines 315-367 in queue-manager.ts), claiming it's "unused." However, this method is actively used in the workflow driver:

Location: rivetkit-typescript/packages/rivetkit/src/workflow/driver.ts:204

waitForMessages(
    messageNames: string[],
    abortSignal: AbortSignal,
): Promise<void> {
    const queueNames = messageNames.map((name) => workflowQueueName(name));
    return this.#actor.queueManager.waitForNames(queueNames, abortSignal);
}

Impact: This will cause runtime errors in any workflow that waits for messages, breaking the workflow functionality entirely.

Required Action:

  1. Either restore the waitForNames method, OR
  2. Refactor the workflow driver to use an alternative approach (e.g., waitForNames → message listeners pattern that's now in the code)
  3. Add tests to prevent this regression

Code Quality Issues

1. Redundant Export in sqlite-core.ts

File: rivetkit-typescript/packages/rivetkit/src/db/drizzle/sqlite-core.ts

The file has both export * and explicit named exports:

export * from "drizzle-orm/sqlite-core";
export {
    blob,
    check,
    // ... 20+ explicit exports
} from "drizzle-orm/sqlite-core";

Issue: The export * makes all the explicit named exports redundant. This is confusing and creates maintenance burden.

Recommendation: Choose one approach:

  • Option A (Recommended): Keep only export * if all exports are needed
  • Option B: Remove export * and keep only the explicit exports if you want to be selective

2. API Breaking Change: createFileSystemOrMemoryDriver signature

File: rivetkit-typescript/packages/rivetkit/src/drivers/file-system/mod.ts:31-33

Before:

createFileSystemOrMemoryDriver(persist?: boolean, path?: string, useNativeSqlite?: boolean)

After:

createFileSystemOrMemoryDriver(persist: boolean = true, options?: CreateFileSystemDriverOptionsInput)

Issue: This is a breaking change that affects any code using positional parameters. The PR description mentions this is a "breaking change" but doesn't show migration examples or update examples that might use this.

Recommendation:

  • Document the migration path in the PR description
  • Search for and update all usages in examples
  • Consider deprecation strategy rather than immediate breaking change

3. Import Organization - Mixed Patterns

Files: Multiple actor files and drizzle modules

The PR reorganizes imports but introduces inconsistent patterns:

Recommendation: Follow the CLAUDE.md guideline consistently:

"Always add imports at the top of the file inside of inline within the function."


Positive Aspects ✅

  1. Good: Drizzle export centralization - Creating sqlite-core.ts as a re-export point is good for API control (though the implementation needs fixing per [SVC-2555] Set up issue templates #1)

  2. Good: Options object pattern - The move from multiple parameters to an options object in createFileSystemOrMemoryDriver is good API design (though the breaking change needs better handling)

  3. Good: Massive example addition - Adding the sandbox-vercel example (9600+ lines) provides valuable reference implementation


Testing Concerns

Missing Test Coverage

The PR description states:

"The changes have been tested with the existing test suite to ensure that the removal of the unused method and the reorganization of imports don't break any functionality."

However, the waitForNames usage in workflow driver proves this method is NOT unused. This suggests:

  1. Tests didn't run completely, OR
  2. Test coverage for workflow functionality is insufficient

Recommendation:

  • Run pnpm test in rivetkit-typescript/packages/rivetkit and include results
  • Add specific tests for workflow message waiting functionality
  • Verify all workflow tests pass before merging

Security & Performance

No security vulnerabilities or performance issues identified in the changes.


Summary

Recommendation: ❌ Request Changes

This PR cannot be merged in its current state due to the critical breaking change that removes a method still in active use. The workflow system will fail at runtime.

Required Before Merge:

  1. CRITICAL: Fix the waitForNames removal issue
  2. Fix redundant exports in sqlite-core.ts
  3. Document breaking changes and migration path
  4. Run and verify all tests pass
  5. Search for and update any other usages of the changed APIs

Nice to Have:

  • Consistent import organization across all changed files
  • Add tests for the workflow waiting functionality
  • Update examples that might use the old createFileSystemOrMemoryDriver signature

@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 6, 2026

Graphite Automations

"Test" took an action on this PR • (02/06/26)

1 assignee was added to this PR based on Kacper Wojciechowski's automation.

Comment on lines 2 to +3
export { KEYS, makeConnKey } from "@/actor/instance/keys";
export type { ActorInstance, AnyActorInstance } from "@/actor/instance/mod";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The export statements need to be reordered according to the project's linting rules. The original order had the type exports for ActorInstance before the KEYS export.

Spotted by Graphite Agent (based on CI logs)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@jog1t jog1t force-pushed the 02-06-fix_rivetkit_build branch from 28afd58 to cead745 Compare February 6, 2026 21:13
Comment on lines +2 to 6
import { getRequireFn } from "@/utils/node";
import type { Actions, ActorConfig } from "./config";
import type { ActionContextOf, ActorContext } from "./contexts";
import type { AnyDatabaseProvider } from "./database";
import type { ActorInstance } from "./instance/mod";
import { DeepMutable } from "@/utils";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import statements need to be properly sorted according to the project's conventions. Ensure imports are grouped correctly (built-ins first, then external packages, then internal imports) and sorted alphabetically within groups.

Spotted by Graphite Agent (based on CI logs)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@jog1t jog1t force-pushed the 01-31-feat_dashboard_workflows_ui branch from e17b9e9 to cb2ef1e Compare February 9, 2026 19:17
@jog1t jog1t force-pushed the 02-06-fix_rivetkit_build branch from cead745 to 7cbc7e1 Compare February 9, 2026 19:17
@NathanFlurry NathanFlurry force-pushed the 01-31-feat_dashboard_workflows_ui branch from cb2ef1e to a5f2e3e Compare February 9, 2026 21:55
@NathanFlurry NathanFlurry force-pushed the 02-06-fix_rivetkit_build branch from 7cbc7e1 to 53320bb Compare February 9, 2026 21:55
@NathanFlurry NathanFlurry changed the base branch from 01-31-feat_dashboard_workflows_ui to graphite-base/4147 February 10, 2026 08:39
@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 10, 2026

Merge activity

  • Feb 10, 8:45 AM UTC: NathanFlurry added this pull request to the Graphite merge queue.
  • Feb 10, 8:46 AM UTC: CI is running for this pull request on a draft pull request (#4166) due to your merge queue CI optimization settings.
  • Feb 10, 8:48 AM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #4081.
  • Feb 10, 8:48 AM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #4081.
  • Feb 10, 7:35 PM UTC: NathanFlurry added this pull request to the Graphite merge queue.
  • Feb 10, 7:36 PM UTC: CI is running for this pull request on a draft pull request (#4167) due to your merge queue CI optimization settings.
  • Feb 10, 7:36 PM UTC: Merged by the Graphite merge queue via draft PR: #4167.

graphite-app bot pushed a commit that referenced this pull request Feb 10, 2026
# Description

This PR removes the unused `waitForNames` method from the `QueueManager` class and reorganizes imports across several files to improve code organization. It also fixes the Drizzle ORM exports by creating a new `sqlite-core.ts` file that re-exports specific functions from the Drizzle ORM package, rather than exporting everything directly.

Additionally, the PR updates the `createFileSystemOrMemoryDriver` function to accept an options object instead of separate parameters, making the API more flexible and consistent.

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

The changes have been tested with the existing test suite to ensure that the removal of the unused method and the reorganization of imports don't break any functionality.

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
@NathanFlurry NathanFlurry changed the base branch from graphite-base/4147 to 01-31-feat_dashboard_workflows_ui February 10, 2026 19:19
Base automatically changed from 01-31-feat_dashboard_workflows_ui to main February 10, 2026 19:24
@NathanFlurry NathanFlurry force-pushed the 02-06-fix_rivetkit_build branch from 53320bb to e8fad3b Compare February 10, 2026 19:25
graphite-app bot pushed a commit that referenced this pull request Feb 10, 2026
# Description

This PR removes the unused `waitForNames` method from the `QueueManager` class and reorganizes imports across several files to improve code organization. It also fixes the Drizzle ORM exports by creating a new `sqlite-core.ts` file that re-exports specific functions from the Drizzle ORM package, rather than exporting everything directly.

Additionally, the PR updates the `createFileSystemOrMemoryDriver` function to accept an options object instead of separate parameters, making the API more flexible and consistent.

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

The changes have been tested with the existing test suite to ensure that the removal of the unused method and the reorganization of imports don't break any functionality.

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
@graphite-app graphite-app bot closed this Feb 10, 2026
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