Skip to content

fix(rivetkit): warn when manager port falls back to a different port#4489

Open
NathanFlurry wants to merge 1 commit into03-23-fix_rivetkit_clear_connectablets_on_actor_sleepfrom
03-23-fix_rivetkit_warn_when_manager_port_falls_back_to_a_different_port
Open

fix(rivetkit): warn when manager port falls back to a different port#4489
NathanFlurry wants to merge 1 commit into03-23-fix_rivetkit_clear_connectablets_on_actor_sleepfrom
03-23-fix_rivetkit_warn_when_manager_port_falls_back_to_a_different_port

Conversation

@NathanFlurry
Copy link
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

@railway-app
Copy link

railway-app bot commented Mar 24, 2026

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

Service Status Web Updated (UTC)
website ✅ Success (View Logs) Web Mar 24, 2026 at 1:20 pm
frontend-cloud 😴 Sleeping (View Logs) Web Mar 24, 2026 at 1:02 pm
frontend-inspector 😴 Sleeping (View Logs) Web Mar 24, 2026 at 11:53 am
kitchen-sink ❌ Build Failed (View Logs) Web Mar 24, 2026 at 11:34 am
ladle ❌ Build Failed (View Logs) Web Mar 24, 2026 at 1:58 am
mcp-hub ✅ Success (View Logs) Web Mar 24, 2026 at 1:54 am

@claude
Copy link

claude bot commented Mar 24, 2026

PR Review: fix(rivetkit): warn when manager port falls back to a different port

This is a small, focused change that adds a warning log when findFreePort returns a different port than the configured one. The intent is correct and addresses a real UX gap - port fallback previously happened silently.

Feedback

Structured logging

The warning interpolates port numbers directly into the msg string. Per the project structured logging convention in CLAUDE.md, parameters should not be formatted into the main message - they should be separate fields. This is also consistent with the adjacent logger().debug() call below it, which already uses named fields (port: managerPort).

Current code uses: msg interpolated with configuredManagerPort and managerPort.

Suggested approach: use msg set to "manager port is in use, falling back to a different port" with configuredPort and actualPort as separate named fields.

This makes the port values queryable and filterable in log aggregation tools.

Summary

The change is correct and well-placed. The only suggested improvement is separating the port values into named structured fields rather than interpolating them into the message string.

@NathanFlurry NathanFlurry force-pushed the 03-23-fix_rivetkit_clear_connectablets_on_actor_sleep branch from 93952ec to f3e0879 Compare March 24, 2026 11:30
@NathanFlurry NathanFlurry force-pushed the 03-23-fix_rivetkit_warn_when_manager_port_falls_back_to_a_different_port branch from 9782f44 to 1bcf7a1 Compare March 24, 2026 11:30
@NathanFlurry NathanFlurry marked this pull request as ready for review March 24, 2026 11: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.

1 participant