Add include_unversioned option to VersionFilter#3349
Conversation
jlowin
left a comment
There was a problem hiding this comment.
Thanks for picking this up! Two things before this is ready:
The tests cover tools, resources, and mounted tools, but prompts and resource templates have no coverage for include_unversioned=False despite being implemented. Same pattern as the others — should be straightforward to add.
Also, imports belong at the top of the test file, not inside individual test methods. The existing tests in that file do this too, but please don't extend the pattern in the new ones.
…lign naming/imports
|
Thanks for the review. I updated this PR by adding |
Description
This PR adds an
include_unversionedoption toVersionFilter, defaulting toTrueto preserve the current behavior. When set toFalse, unversioned components are excluded fromVersionFilterlist results by passingmatch_none=self.include_unversionedthrough the existingVersionSpec.matches()calls.I kept the change narrowly scoped to the list filtering behavior discussed on the issue. The PR also adds regression coverage for tools, resources, and mounted tools, updates
VersionFilter's docstring, and refreshes the versioning guide to document the new option and its default behavior.I used gpt-5.3-codex to help draft and refine this change
Contributors Checklist
Review Checklist