Skip to content

Conversation

@kixelated
Copy link
Collaborator

Summary

  • Don't append ?jwt= to cluster URLs when no token is configured
  • Results in cleaner URLs without an empty query parameter

Test plan

  • Verify relay starts without --cluster-token and connects to other nodes without ?jwt= in URL
  • Verify relay with --cluster-token still includes the JWT in the query parameter

🤖 Generated with Claude Code

Don't append `?jwt=` to cluster URLs when no token is configured,
resulting in cleaner URLs without an empty query parameter.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@kixelated
Copy link
Collaborator Author

Bonus fix for #868

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Walkthrough

The change modifies URL construction in the run_remote function within the cluster module. The JWT query parameter is now conditionally appended to the remote URL based on whether a token is provided. When the token is empty, the URL uses only the base HTTPS endpoint; when a token exists, it appends the ?jwt=<token> parameter. Previously, the JWT parameter was always included regardless of token presence. The backoff and retry logic remains unchanged. No public API signatures were altered.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: conditionally skipping the JWT query parameter when no token is configured, which aligns with the code modification in the changeset.
Description check ✅ Passed The description directly relates to the changeset, explaining the rationale for the change and providing a test plan to verify both the configured and unconfigured token scenarios.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kixelated kixelated merged commit bf759bd into main Jan 28, 2026
1 check passed
@kixelated kixelated deleted the no-jwt branch January 28, 2026 16:30
@moq-bot moq-bot bot mentioned this pull request Jan 28, 2026
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