Conversation
Skip a derived error/test/symbol/file leg when the caller already filtered on that kind. Replacing the field dropped the constraint while the response still reported it.
tarekziade
self-requested a review
September 19, 2026 14:37
Collaborator
|
Thanks that looks right One subtlety: Could we retain derived signals for ranking independently of which legs execute? The regression test should also assert |
Skipping the derived leg for a kind the caller already scoped also dropped that term from rank_spec, so it lost its signal-overlap weight while staying in the lexical query. rank_spec now folds those terms in independently of which legs run. The regression test also asserts the constrained call returns exactly the matching thread, not merely nothing extra. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Author
|
Thanks, both points were right. Pushed a follow-up:
Full suite passes locally (864 passed) and ruff is clean; the Postgres half of the parity tests is skipped here since I don't have a Postgres URL configured. |
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.
Fixes #75.
expand()built each derived signal leg withreplace(query, text="", **override). When the caller had already set--symbol(or--file/--error/--test), that overwrite dropped their constraint. The JSONfiltersobject still echoed the original flag, so the page claimed a scope the query no longer applied.Appending the derived value is not a fix either: values inside one signal filter are ORed, which would widen the call rather than keep it.
This skips a derived leg of a kind the caller already filtered on. The text leg and the filters-only leg still carry that evidence; cross-kind filters (e.g.
--fileon a symbol leg) are unchanged.Tested with
pytest tests/integration/test_expansion.py tests/unit tests/integration/test_search.py.