Conversation
DeserializeDirectoryType() returned AT_DEFAULT on a lookup miss, so any unrecognised directoryType replied "ok" while registering the server with the public any_genre_1 directory, and the existing "custom needs an address" guard could not fire for "CUSTOM". The lookup is now a bool with an out-parameter; an unrecognised value returns -32602 and leaves the directory setting unchanged. Doc comment and generated docs/JSON-RPC.md updated. Fixes jamulussoftware#3915 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: QUIET Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthrough
ChangesDirectory type validation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to Unknown directory types now receive -32602 without changing the directory setting, while recognized values retain their existing mappings; no actionable merge risk remains. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change prevents unrecognized directory types from changing a server’s directory setting. It changes the API response for those requests, but no new security exposure was identified. Runtime behavior has not been independently verified. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
🤖 AI: Short description of changes
jamulusserver/setDirectoryreplied"ok"to anydirectoryTypestring and mapped an unrecognised one toany_genre_1, the public default, becauseDeserializeDirectoryType()returnedAT_DEFAULTon a lookup miss. The same miss made the existing "custom needs an address" guard unreachable for"CUSTOM". The lookup now returnsboolwith an out-parameter; an unrecognised value returns error-32602with the message pljones asked for on #3915, and the directory setting is left unchanged. The doc comment no longer claims the result is always"ok", anddocs/JSON-RPC.mdis regenerated.CHANGELOG: Server:
jamulusserver/setDirectoryrejects an unrecogniseddirectoryTypeinstead of silently registering the server with the default public directory.Context: Fixes an issue?
Fixes: #3915
Does this change need documentation? What needs to be documented and how?
docs/JSON-RPC.mdis regenerated in this PR. Nothing on the website.Status of this Pull Request
Working implementation.
What is missing until this pull request can be merged?
Review. Tested on loopback against the patched server: eight unrecognised values (
NONE,CUSTOM,custon,customwith a trailing space,GENRE_ROCK,genre-rock,"",unknown_xyz) all return-32602andgetServerProfilestill reports the previous type;nonestill applies (the other valid values were unchanged by this revision and were verified in the earlier 24-case A/B);customwithout an address is still rejected by the existing guard. Builds clean with-Wall -Wextra;clang-formatclean.Checklist
🤖 This message was written by AI and reviewed by @mcfnord.