Skip to content

fix: align URI template matching with RFC 6570 operators#69

Merged
leehack merged 1 commit intomainfrom
fix/issue-68-rfc6570-uri-match
Feb 12, 2026
Merged

fix: align URI template matching with RFC 6570 operators#69
leehack merged 1 commit intomainfrom
fix/issue-68-rfc6570-uri-match

Conversation

@leehack
Copy link
Owner

@leehack leehack commented Feb 12, 2026

Summary

  • Fix URI template matching to use operator-correct separators for multi-variable RFC 6570 expressions (? then &, # then ,, etc.) so valid URIs are matched correctly.
  • Escape variable names while building regex patterns in match() to avoid regex edge cases.
  • Add regression tests for the issue case (entity://list{?status,assignee}) and a server resources/read flow that now resolves this template URI.

Fixes #68

Testing

  • dart test test/shared/uri_template_test.dart
  • dart test test/server/mcp_test.dart
  • dart analyze
  • dart test

Handle operator-specific separators for multi-variable expressions so valid template URIs match correctly during resources/read. Add regression tests for the issue #68 query template case and server read flow.
@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

❌ Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.50%. Comparing base (6f8795b) to head (66e54de).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/src/shared/uri_template.dart 44.44% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #69      +/-   ##
==========================================
+ Coverage   78.47%   78.50%   +0.03%     
==========================================
  Files          40       40              
  Lines        5091     5095       +4     
==========================================
+ Hits         3995     4000       +5     
+ Misses       1096     1095       -1     
Flag Coverage Δ
unittests 78.50% <44.44%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@leehack leehack merged commit e04e9d3 into main Feb 12, 2026
5 of 6 checks passed
@leehack leehack deleted the fix/issue-68-rfc6570-uri-match branch February 12, 2026 18:42
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.

[Bug] RFC 6570.

1 participant