Skip to content

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

Draft
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
Draft

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 😴 Sleeping (View Logs) Web Mar 24, 2026 at 2:08 am
frontend-inspector 😴 Sleeping (View Logs) Web Mar 24, 2026 at 2:07 am
frontend-cloud 😴 Sleeping (View Logs) Web Mar 24, 2026 at 2:06 am
kitchen-sink ❌ Build Failed (View Logs) Web Mar 24, 2026 at 2:01 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

Copy link
Member Author

NathanFlurry commented Mar 24, 2026

@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 change is sensible and helps developers identify port conflicts during development.

Feedback

Logging format

The warning uses a template string inside the msg field:

logger().warn({
    msg: `port ${configuredManagerPort} is in use, using ${managerPort}`,
});

Per the project's structured logging conventions in CLAUDE.md:

Do not format parameters into the main message, instead use structured logging fields.

The same principle should apply to the TypeScript logger. The structured data (ports) should be separate fields rather than interpolated into the message string:

logger().warn({
    msg: "manager port is in use, falling back to a different port",
    configuredPort: configuredManagerPort,
    actualPort: managerPort,
});

This makes the log easier to query/filter programmatically in log aggregation tools.

Message casing

The message is already lowercase, consistent with the project's convention. No issues here.

Summary

The change is correct and addresses a real UX gap — previously, port fallback happened silently. The only suggested improvement is to follow the project's structured logging style by separating port values into named fields rather than interpolating them into the message string.

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