Repository navigation
PR #62 follow-up 17: resolve_dataset prefers exact-case selection; correct not_found message - #73
Merged
Merged
Conversation
…nd message Dataset names are case-sensitive, but selectedDataset/contextDataset took the first case-insensitive match, so with both `Logs` and `logs` visible a request for `logs` could resolve to `Logs`. Prefer an exact match, fall back to a case-insensitive match only when it is unique, and return `ambiguous` with the case variants as candidates otherwise. When every dataset is filtered out the status was `not_found` but the message claimed the resolution was ambiguous; report that no visible dataset matches instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… fix/pr62-17-resolve-dataset-exact-case # Conflicts: # docs/tool-api.md
… fix/pr62-17-resolve-dataset-exact-case
…ataset-exact-case
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.
Stacked on #62 (
upstream/tool-catalog-1831). Retarget tomainafter #62 merges.Problem
resolve_dataset_candidates(in code inherited from upstream parseablehq#1831) validatedselectedDataset/contextDatasetby taking the first case-insensitive name match. Dataset names are case-sensitive, so with bothLogsandlogsvisible,selectedDataset: "logs"resolved toLogs, and the agent then queried the wrong dataset.Separately, when every visible dataset was filtered out (for example by
telemetryType), the result wasstatus: "not_found"but its message said "Dataset resolution is ambiguous…".Fix
status: "ambiguous"with those datasets ascandidates.X." (or "…match the request." when no type was given).docs/tool-api.md: the resolve_dataset paragraph now describes the case rules and whennot_foundis returned.Tests
shared_dataset_resolution_prefers_exact_case_selection: withLogs/logsvisible, both names resolve exactly; a unique case-insensitive fallback (traces→Traces) still resolves;LOGSreturnsambiguouswith both candidates.shared_dataset_resolution_reports_no_matching_candidates: when nothing matches the telemetry type, the result isnot_foundand the message is not "ambiguous".Logsinstead oflogs, the second gets the "ambiguous" message).cargo test --lib tool_: 40 passed.cargo clippy --all-targets: no warnings in touched files.Upstream fidelity
This is a small, local change to an upstream function: the selection block and the final message expression. It doesn't change the rest of the function's structure, so merge conflicts with upstream should stay small. We plan to propose the same change upstream.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.