fix(mcp): warn about dbt selector grammar in select param descriptions#1462
Open
wcchang1115 wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
628cbee to
35d19bc
Compare
Agents comma-join distinct model names in `select` (e.g. "a,b"), but dbt reads a comma as intersection, so it silently resolves to an empty diff that looks like "no changes". Add a shared SELECTOR_SYNTAX_NOTE to all five select descriptions: space=union, comma=intersection over all selector arguments, bare name=exact, wildcard needs `*`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
35d19bc to
e6a1d75
Compare
iamcxa
approved these changes
Jul 11, 2026
iamcxa
left a comment
Contributor
There was a problem hiding this comment.
Reviewed together with the agent-side sibling DataRecce/recce-cloud-infra#1522 (same DRC-3834 fix; the MCP-description ⇄ prompt contract). Grammar guidance is consistent across both.
Verified correct ✅
SELECTOR_SYNTAX_NOTEis appended to all 5 tool-schemaselectparams (lines 730 / 765 / 948 / 1023 / 1380) — complete coverage, not a partial rollout.- The new test enforces it well: the per-tool
"intersection (AND)" in select["description"]assertion means every tool exposing aselectparam must carry the note (not merely ≥5), so a future tool that addsselectwithout it will fail the test. Good regression guard. - The note's grammar matches the agent-side prompt in #1522 (space = union, comma = intersection, bare = exact,
*for prefix).
Minor (NIT) 💡
- test_mcp_server.py L3163: the diff also collapses an unrelated
with patch.object(...)from multi-line onto one line (looks like aruff formatsweep caught in the same commit). Harmless — just unrelated to the selector fix.
Approving — clean, well-tested description fix. The NIT is optional.
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.
PR checklist
What type of PR is this?
fixWhat this PR does / why we need it:
The MCP
selectstring feeds dbt's node-selection grammar, where a comma means intersection. Agents comma-join distinct model names (e.g.a,b), so dbt intersects them → zero nodes → an empty diff indistinguishable from "no changes" → silent under-reporting (seen in production). Sinceselectis passed to dbt verbatim, the fix is in the description contract: warn on everyselectparam that a comma is intersection, a space is union, and bare names are exact.Which issue(s) this PR fixes:
DRC-3834
Special notes for your reviewer:
*.Does this PR introduce a user-facing change?:
NONE