fix: support single-label URL hosts - #30
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughURL 规则现在允许单标签主机名,例如 Changes单标签主机名 URL 校验
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to This localized change allows valid single-label URL hosts while preserving existing validation behavior, with passing regression and full-suite checks; no actionable merge-blocking risk remains. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #30 +/- ##
=======================================
Coverage 82.38% 82.38%
=======================================
Files 25 25
Lines 653 653
Branches 238 236 -2
=======================================
Hits 538 538
Misses 114 114
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
fastapiin URL validationBackground
The current expression requires every non-localhost registered name to end in a dotted TLD. That rejects internal service URLs such as
http://fastapi:3000/mcp, even though RFC 3986 defines a host as an IP literal, IPv4 address, or registered name and does not require every registered name to be globally DNS-qualified.This keeps the existing host-label expression and only makes the domain-plus-TLD suffix optional. It does not replace the validator with the broader platform
URLparser.Closes #19.
Validation
Exact head:
e21da4amasterand passes on this headgit diff --check: passedAI assistance disclosure
Codex was used to trace the URL grammar, search for overlapping work, implement the focused change and regressions, run base/head and full validation, and draft this description. I verified the source diff and all reported results.
Summary by CodeRabbit
http://fastapi:3000/mcp。