full fix for named search#80
Merged
duncankmckinnon merged 17 commits intonamed-search-fixfrom Apr 6, 2026
Merged
Conversation
Tests verify that partial name matches are rejected and that the correct evaluator is selected from multiple search results. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests cover: exact match success, fuzzy-only results rejection, finding exact match among multiple candidates, empty results, and case-sensitive matching. These tests will fail until the exact name match pattern is applied to GetDashboardQuery. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests cover GetPromptQuery and GetAllPromptVersionsQuery: - No exact match (fuzzy match rejected) - Multiple results (correct exact match selected) - Existing tests updated with name field for compatibility These tests will FAIL until the implementation is applied. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests cover GetMonitorQuery and GetModelMetricValueQuery to verify: - GraphQL queries use first: 10 (not first: 1) for multiple candidates - Exact name match selects correct monitor from multiple results - Partial/fuzzy matches are rejected with specific error messages - Similar names (e.g., 'model-v1' vs 'model-v10') are not confused - Empty edges still raise the original error These tests will FAIL until the exact match pattern is applied to monitor_queries.py (_find_exact_name_match + __query_variables__). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Change evaluators query from first:1 to first:10 and use _find_exact_name_match to verify the search result matches the requested name exactly, preventing fuzzy/partial matches. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…st result Apply the same fix pattern used in model_queries.py and space_queries.py: fetch up to 10 candidates and use _find_exact_name_match to verify. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix GetPromptQuery and GetAllPromptVersionsQuery to use exact name matching instead of blindly taking the first search result. Changes: - Increase search results from first:1 to first:10 - Add name field to GetAllPromptVersionsQuery GraphQL - Use _find_exact_name_match to verify exact name match - Raise specific error when no exact match found Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests that will fail until the implementation is updated: - test_get_custom_metric_no_exact_match: partial match should be rejected - test_get_custom_metric_multiple_results: correct metric selected from multiple candidates Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Changes custom metric search from first:1 to first:10 and uses _find_exact_name_match to verify the result matches the requested metric name exactly, preventing fuzzy/partial match false positives. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- GetMonitorQuery: Change first: 1 to first: 10, use _find_exact_name_match instead of edges[0] to prevent fuzzy match false positives - GetModelMetricValueQuery: Change monitors first: 1 to first: 10, add name field to GraphQL query, use _find_exact_name_match with fallback for backward compatibility when name field is not present in response Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests cover exact match, no match, partial match rejection, empty edges, custom name field, missing/None nodes, and case sensitivity. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
No description provided.