Repository navigation
TEST: cover literal metadata filter keys - #3180
Merged
Roman Lutz (romanlutz) merged 3 commits intoOct 14, 2026
Merged
Roman Lutz (romanlutz) merged 3 commits into
Roman Lutz (romanlutz) merged 3 commits into
Conversation
_get_seed_metadata_conditions and _get_message_pieces_prompt_metadata_ conditions interpolated the metadata key into the JSON path and the bind parameter name. A key like a.b made SQLAlchemy parse :a.b as parameter a plus literal text, so the later bindparams() call raised ArgumentError and the query crashed. Keys with hyphens or spaces failed the same way. Bind each key as a quoted JSON path parameter with an indexed value parameter on both SQLite and Azure SQL, the same shape the label fix in microsoft#3063 already uses. Fixes microsoft#3179 Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
Use SQLite json_each and Azure SQL OPENJSON rather than constructing JSON paths from free-form keys. Preserve scalar value comparisons and protect seed and seed-group deletion from matching nested or padded keys. Add saved/reopened retrieval and removal regressions, including quoted and backslash keys, and verify literal key bindings through the MSSQL dialect. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1696f5bb-ccc6-41e1-a983-7cceb2ec6e3c
Roman Lutz (romanlutz)
approved these changes
Oct 14, 2026
Keep the production literal-key fix already merged in microsoft#3125 and retain additional saved/reopened retrieval, deletion, value-type and MSSQL binding coverage for microsoft#3180. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1696f5bb-ccc6-41e1-a983-7cceb2ec6e3c
Contributor
Author
|
Saw the merge, thanks for reworking it onto the literal matching and keeping the regression tests, that is the version that should stick. Congratulating myself for trying to close an already merged PR, classic. |
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.
Description
Adds regression coverage for #3179. The production literal-key fix has already merged in #3125. This branch now includes current main and preserves that implementation unchanged rather than using quoted JSON paths, which can select or delete an unrelated nested-key record.
The remaining delta is test-only:
No public API, schema or production behavior changes relative to current main.
Tests and Documentation
Local validation after merging main:
uv run --frozen --no-sync python -m pytest tests\unit\memory\test_sqlite_memory.py tests\unit\memory\test_azure_sql_memory.py tests\unit\memory\memory_interface\test_interface_seed_prompts.py tests\unit\memory\memory_interface\test_interface_remove_seeds.py tests\unit\memory\memory_interface\test_interface_prompts.py -q: 426 passed, 1 skipped.uv run --frozen --no-sync ruff check tests\unit\memory\test_sqlite_memory.py tests\unit\memory\test_azure_sql_memory.py: passed.uv run --frozen --no-sync ruff format --check tests\unit\memory\test_sqlite_memory.py tests\unit\memory\test_azure_sql_memory.py: passed.uv run --frozen --no-sync ty check tests\unit\memory\test_sqlite_memory.py tests\unit\memory\test_azure_sql_memory.py: passed.No live Azure SQL integration was run. Azure assertions check generated SQL and bound parameters, not live server execution. The SQLite tests use real local databases. No documentation changed, so JupyText was not run.