Repository navigation
Python: Preserve configured search filters for invalid overrides - #14645
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 2 commits intoOct 23, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Eduard van Valkenburg (eavanvalkenburg)
requested a review
from a team
as a code owner
October 23, 2026 12:28
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
github-app-auth
October 23, 2026 12:28 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
github-app-auth
October 23, 2026 12:28 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
integration
October 23, 2026 12:28 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
integration
October 23, 2026 12:28 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
integration
October 23, 2026 12:28 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
integration
October 23, 2026 12:28 — with
GitHub Actions
Inactive
Copilot started reviewing on behalf of
Eduard van Valkenburg (eavanvalkenburg)
October 23, 2026 12:28
Eduard van Valkenburg (eavanvalkenburg)
had a problem deploying
to
github-app-auth
October 23, 2026 12:28 — with
GitHub Actions
Failure
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrow fallback changes preserve configured options, and regression tests cover filter retention in both affected search wrappers.
No open issues 🎉
What changed in this PR
This PR fixes search-option fallback behavior so invalid invocation-time overrides preserve configured options, including filters, rather than replacing them with empty defaults.
Changes:
- Rebuild fallback options from the configured baseline in text and vector search wrappers.
- Add regression tests verifying that configured filters reach both search calls when an invalid
top=0override is supplied. - Preserve the public API and tolerant handling of invalid overrides.
| File | Description |
|---|---|
python/tests/unit/data/test_vector_search_base.py |
Tests vector-search filter retention after an invalid override. |
python/tests/unit/data/test_text_search.py |
Tests text-search filter retention after an invalid override. |
python/semantic_kernel/data/vector.py |
Restores configured vector-search options on validation failure. |
python/semantic_kernel/data/text_search.py |
Restores configured text-search options on validation failure. |
Review effort: Balanced
Contributor
Python Test Coverage Report •
Python Unit Test Overview
|
|||||||||||||||||||||||||||||||||||
Eduard van Valkenburg (eavanvalkenburg)
had a problem deploying
to
github-app-auth
October 23, 2026 12:38 — with
GitHub Actions
Failure
Jose Alvarez (jpalvarezl)
approved these changes
Oct 23, 2026
Jose Alvarez (jpalvarezl)
left a comment
Member
There was a problem hiding this comment.
The fallback now rebuilds from the configured baseline after an invalid invocation override, preserving filters and other configured options. The custom filter updater still runs afterward, so intentional clearing remains available without changing validation behavior.
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
github-app-auth
October 23, 2026 18:06 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
enabled auto-merge
October 23, 2026 18:06
Eduard van Valkenburg (eavanvalkenburg)
deployed
to
integration
October 23, 2026 18:06 — with
GitHub Actions
Active
Eduard van Valkenburg (eavanvalkenburg)
deployed
to
integration
October 23, 2026 18:06 — with
GitHub Actions
Active
Eduard van Valkenburg (eavanvalkenburg)
deployed
to
integration
October 23, 2026 18:06 — with
GitHub Actions
Active
Eduard van Valkenburg (eavanvalkenburg)
deployed
to
integration
October 23, 2026 18:06 — with
GitHub Actions
Active
Eduard van Valkenburg (eavanvalkenburg)
deleted the
sk-search-filter-isolation
branch
October 23, 2026 18:17
This branch was successfully deployed
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.
Motivation and Context
Search functions retain caller-configured options, including filters, while accepting invocation-time overrides. When an invocation override failed validation, the fallback replaced all configured options with blank defaults. This change preserves the configured baseline while continuing to ignore invalid overrides.
Description
top=0override and verify that the configured filter still reaches the search call.Validation:
uv run --python 3.12 --frozen --extra pandas pytest tests\unit\data\test_text_search.py tests\unit\data\test_vector_search_base.py --quiet— passed, 20 tests; one existing event-loop deprecation warning.uv run --python 3.12 --frozen ruff check semantic_kernel\data\text_search.py semantic_kernel\data\vector.py tests\unit\data\test_text_search.py tests\unit\data\test_vector_search_base.py— passed.git diff --check— passed.Full Python unit tests and
uv run pre-commit run -awere not run.Contribution Checklist