Skip to content

chore: fix tests#4314

Merged
NathanFlurry merged 7 commits intomainfrom
02-25-chore_fix_tests
Feb 27, 2026
Merged

chore: fix tests#4314
NathanFlurry merged 7 commits intomainfrom
02-25-chore_fix_tests

Conversation

@MasterPtato
Copy link
Contributor

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

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?

Please describe the tests that you ran to verify your changes.

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

@railway-app
Copy link

railway-app bot commented Feb 26, 2026

🚅 Deployed to the rivet-pr-4314 environment in rivet-frontend

Service Status Web Updated (UTC)
website 😴 Sleeping (View Logs) Web Feb 26, 2026 at 1:22 am
frontend-inspector ❌ Build Failed (View Logs) Web Feb 26, 2026 at 1:13 am
mcp-hub ✅ Success (View Logs) Web Feb 26, 2026 at 1:13 am
ladle ❌ Build Failed (View Logs) Web Feb 26, 2026 at 1:13 am
frontend-cloud ❌ Build Failed (View Logs) Web Feb 26, 2026 at 1:13 am

Copy link
Contributor Author

MasterPtato commented Feb 26, 2026

@claude
Copy link

claude bot commented Feb 26, 2026

PR Review: chore: fix tests

Overall this is a clean set of test fixes adapting to updated KV and workflow APIs. Changes are well-scoped and the intent is clear.


Issues

1. .unwrap() instead of ? in kv_operations.rs (tests 11 and 13)

Two estimate_kv_size calls use .unwrap() despite the test function returning Result. Using ? would give a proper error message on failure. All other fallible calls in these tests consistently use ?.

// Current (kv_operations.rs:259-262)
let size = db
    .run(|tx| async move { kv::estimate_kv_size(&tx, actor_id).await })
    .await
    .unwrap(); // should be ?

// Better
let size = db
    .run(|tx| async move { kv::estimate_kv_size(&tx, actor_id).await })
    .await?;

2. standalone() generates a new ID on every call

Id::new_v1(self.config.dc_label()) in the new TestCtx::standalone() generates a fresh UUID on each invocation. If a test calls it more than once expecting a stable dc_id, it will get different IDs each time. Consider storing the dc_id on TestCtx or accepting it as a parameter, similar to how ray_id is handled.


Minor Notes

  • namespace_id in the test Recipient structs is a fresh random ID unrelated to any actual namespace — fine for tests since the field is only used for billing metrics.
  • The VersionCheckBranch rename in cursor.rs is a straightforward test fix with no concerns.
  • The metadata field change from create_ts to update_ts correctly tracks the production struct, which now only exposes update_ts in KvMetadata.

@MasterPtato MasterPtato force-pushed the 02-25-chore_fix_tests branch from d33b11b to a1e9af4 Compare February 27, 2026 00:12
@MasterPtato MasterPtato force-pushed the 02-25-fix_various_serverless_bug_fixes branch from ea391b1 to 4aa5dca Compare February 27, 2026 00:12
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 27, 2026

More templates

@rivetkit/cloudflare-workers

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

@rivetkit/framework-base

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

@rivetkit/next-js

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

@rivetkit/react

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

rivetkit

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

@rivetkit/sql-loader

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

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4314

@rivetkit/traces

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

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4314

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4314

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4314

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4314

commit: a1e9af4

@NathanFlurry NathanFlurry force-pushed the 02-25-fix_various_serverless_bug_fixes branch from 4aa5dca to 0a28359 Compare February 27, 2026 00:30
Base automatically changed from 02-25-fix_various_serverless_bug_fixes to main February 27, 2026 00:30
@NathanFlurry NathanFlurry merged commit b8ed0ad into main Feb 27, 2026
14 of 25 checks passed
@NathanFlurry NathanFlurry deleted the 02-25-chore_fix_tests branch February 27, 2026 00:30
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.

2 participants