Skip to content

fix(rivetkit): stop logging benign actor-sleep aborts at error level#5211

Draft
abcxff wants to merge 1 commit into
mainfrom
06-09-fix_rivetkit_stop_logging_benign_actor-sleep_aborts_at_error_level
Draft

fix(rivetkit): stop logging benign actor-sleep aborts at error level#5211
abcxff wants to merge 1 commit into
mainfrom
06-09-fix_rivetkit_stop_logging_benign_actor-sleep_aborts_at_error_level

Conversation

@abcxff

@abcxff abcxff commented Jun 9, 2026

Copy link
Copy Markdown
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

abcxff commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@railway-app

railway-app Bot commented Jun 9, 2026

Copy link
Copy Markdown

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

Service Status Web Updated (UTC)
website 😴 Sleeping (View Logs) Web Jun 9, 2026 at 5:47 pm
kitchen-sink ❌ Build Failed (View Logs) Web Jun 9, 2026 at 5:38 pm
frontend-inspector ❌ Build Failed (View Logs) Web Jun 9, 2026 at 5:38 pm
ladle ❌ Build Failed (View Logs) Web Jun 9, 2026 at 5:33 pm
frontend-cloud ❌ Build Failed (View Logs) Web Jun 9, 2026 at 5:33 pm
mcp-hub ✅ Success (View Logs) Web Jun 9, 2026 at 5:32 pm

@claude

claude Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Code Review

This PR correctly demotes the log level for benign actor-sleep aborts from error to debug. The fix also extracts a reusable isActorAbortedError helper in TypeScript and patches a race condition in the workflow error handler.

What's Good

  • Clean abstraction: isActorAbortedError in errors.ts centralises the group/code check and eliminates inline string literals duplicated in native.ts.
  • Race condition fix in workflow/mod.ts: Adding the structural error check as a second guard alongside abortSignal.aborted is the right approach.
  • Rust logging follows tracing conventions: structured fields, lowercase message, no inline string interpolation.

Issues / Suggestions

  1. No tests (important): The checklist item is unchecked and there is no test coverage. A test putting an actor to sleep while a queue handler runs and asserting no error-level log would prevent regression.

  2. Empty PR description: The PR body is the unmodified template. A sentence describing what was happening and what the fix does would help reviewers.

  3. Rust inlines the check while TypeScript has a helper: napi_actor_events.rs hardcodes the group/code strings directly while TypeScript centralized this in isActorAbortedError. If the error code changes, the Rust side needs a separate update.

  4. Debug log omits the error value: The new debug path does not include the error field. Including it would make it easier to confirm the error really is the expected abort.

  5. Minor: The comment in errors.ts uses 'parked run handler' which ties the helper to one call site. A more general description would be more durable.

Summary

The core logic is correct and the abstraction is an improvement. The main gaps are the missing test and the empty PR description.

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