Skip to content

fix: correct false-positive URN search tests#673

Open
bencap wants to merge 1 commit intorelease-2026.1.2from
bugfix/bencap/483/unexpected-search-by-urn-behavior
Open

fix: correct false-positive URN search tests#673
bencap wants to merge 1 commit intorelease-2026.1.2from
bugfix/bencap/483/unexpected-search-by-urn-behavior

Conversation

@bencap
Copy link
Collaborator

@bencap bencap commented Mar 5, 2026

The 7 URN search tests sent {"urn": ...} in the search payload, but ScoreSetsSearch has no urn field — Pydantic silently dropped it. Tests passed coincidentally because each created only one score set, making unfiltered results match the expected count.

Fix by using {"text": ...} (matching actual frontend behavior) and adding a second decoy score set to each test so the filter is actually exercised.

The 7 URN search tests sent {"urn": ...} in the search payload, but
ScoreSetsSearch has no `urn` field — Pydantic silently dropped it.
Tests passed coincidentally because each created only one score set,
making unfiltered results match the expected count.

Fix by using {"text": ...} (matching actual frontend behavior) and
adding a second decoy score set to each test so the filter is actually
exercised.
@bencap bencap requested review from jstone-dev and sallybg March 5, 2026 00:54
@bencap bencap linked an issue Mar 5, 2026 that may be closed by this pull request
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.

Unexpected Behavior in Search by URN

1 participant