fix(ocap-kernel): fix trailing comma in OCAP URLs when no relays are known#850
Merged
fix(ocap-kernel): fix trailing comma in OCAP URLs when no relays are known#850
Conversation
…known issueOcapURL appended a trailing comma when knownRelays was empty (e.g. `ocap:...@peerid,`). Fix by only appending the relay suffix when relays exist. Also harden parseOcapURL to filter empty hint strings from the split result. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
issueOcapURLappended a trailing comma whenknownRelayswas empty (e.g.ocap:...@peerId,), which could cause issues with URL parsing downstreamparseOcapURLto filter empty hint strings from the split result for backwards compatibility with any existing URLs that have trailing commasTest plan
remote-comms.test.tstests pass🤖 Generated with Claude Code
Note
Low Risk
Small, localized string/formatting changes to OCAP URL handling plus a typo fix; low likelihood of side effects beyond relay-hint parsing.
Overview
Fixes OCAP URL generation to omit the trailing comma when
knownRelaysis empty, preventing URLs likeocap:...@peerId,.Hardens
parseOcapURLto drop empty location-hint entries (maintaining compatibility with any previously issued trailing-comma URLs), and corrects a minor typo in aVatSupervisorinit error string.Written by Cursor Bugbot for commit 5dee5a7. This will update automatically on new commits. Configure here.