Skip to content

chore: fix driver test suite#4591

Open
NathanFlurry wants to merge 1 commit into04-07-chore_remove_udb_as_a_dependency_of_envoy-clientfrom
04-08-chore_fix_driver_test_suite
Open

chore: fix driver test suite#4591
NathanFlurry wants to merge 1 commit into04-07-chore_remove_udb_as_a_dependency_of_envoy-clientfrom
04-08-chore_fix_driver_test_suite

Conversation

@NathanFlurry
Copy link
Copy Markdown
Member

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

@NathanFlurry NathanFlurry mentioned this pull request Apr 8, 2026
11 tasks
@claude
Copy link
Copy Markdown

claude bot commented Apr 8, 2026

PR Review: chore: fix driver test suite\n\nThis PR covers driver test fixtures, native SQLite FFI, envoy shutdown improvements, dynamic isolate KV additions, and actor key serialization changes. The overall direction is solid. A few items worth flagging:\n\n### Issues\n\n**serialize_actor_key format change may be a breaking data migration**\nengine/packages/guard/src/routing/pegboard_gateway/resolve_actor_query.rs\n\nThe serialization changed from JSON (["a","b"]) to slash-separated (a/b). Any existing actor keys routed with the old JSON format will silently stop matching. If this format is only used transiently for routing and never persisted, document that in a comment. If it was persisted, a dual-decode fallback is needed for in-flight traffic.\n\nAlso, EMPTY_KEY: &str = "/" is used both as the representation for an empty-array key and as the separator in join(EMPTY_KEY). The name only describes one role. Consider splitting into two named constants for clarity.\n\n**bypass_cache: true is now unconditional**\nengine/packages/pegboard/src/ops/actor/create.rs\n\nThe comment says this is needed "after serverless metadata refresh" but bypass_cache: true is applied on every actor creation. This will hit the runner-config store on every create, not just after metadata refreshes. Consider restoring conditional logic or making it configurable at the call site if this has throughput implications.\n\nSQLite mutex held across all step iterations\nrivetkit-typescript/packages/rivetkit-native/src/database.rs\n\nIn execute_statement and query_statement, the lock guard is held for the entire step loop. Running inside spawn_blocking prevents an async deadlock, but a long-running query will block any concurrent close() call. Acceptable for now but worth noting.\n\n**exec_statements tail pointer comparison is fragile**\n\nComparing raw *const c_char pointers to detect "no progress" (if tail == remaining) relies on undocumented SQLite behavior. Prefer if tail.is_null() || tail == remaining { break; } with a comment.\n\n**SQLITE_TRANSIENT blob binding copies twice**\nbind_params in rivetkit-typescript/packages/rivetkit-native/src/database.rs\n\nThe blob is cloned to a local Vec and then SQLITE_TRANSIENT causes SQLite to copy it again. Either use SQLITE_STATIC tied to the Vec's lifetime, or add a comment that the double-copy is intentional for simplicity.\n\n### Notes\n\n- Envoy shutdown signaling in connection.rs/envoy.rs/handle.rs: Good fix. Double-check at loop entry and after connection attempt prevents a reconnect race. Acquire/Release ordering is correct.\n- vitest.base.ts concurrency: Clean approach using availableParallelism() with cpus().length fallback. Removing the fake-timer TODO comment is fine cleanup.\n- rivet-util-serde extraction: Good separation of concerns.\n- patchRequestBodyReaders: Good improvement — also patching text() and json() fixes a class of body-read bugs in dynamic isolate requests.\n- RIVETKIT_DYNAMIC_ALLOW_LOCALHOST_NETWORK=1: Reasonable test escape hatch; should be documented as not for production use.\n- Registry split to registry-static.ts + registry-dynamic.ts: Clean separation.\n- isMusl defensive check in index.js: Correct fix for environments where process.report.getReport() returns null.\n- DYNAMIC_REGISTRY_STATIC_ACTOR_NAMES hardcoding: A comment explaining the criteria for adding entries here would help future contributors.

@NathanFlurry NathanFlurry force-pushed the 04-08-chore_fix_driver_test_suite branch from 1919c35 to 7283250 Compare April 8, 2026 11:01
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