Repository navigation
fix(mcp): require source_id on destination search streams - #1388
Johnny Schmidt (johnny-schmidt) merged 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Note 📝 PR Converted to Draft More info...Thank you for creating this PR. As a policy to protect our engineers' time, Airbyte requires all PRs to be created first in draft status. Your PR has been automatically converted to draft status in respect for this policy. As soon as your PR is ready for formal review, you can proceed to convert the PR to "ready for review" status by clicking the "Ready for review" button at the bottom of the PR page. To skip draft status in future PRs, please include |
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksTesting This PyAirbyte VersionYou can test this version of PyAirbyte using the following: # Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@johnny/mcp-search-source-id-doc' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@johnny/mcp-search-source-id-doc'PR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful ResourcesCommunity SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
Code coverage overviewLanguages: Python Python / code-coverage/pytest-no-creds
View coverage of the 10 most impacted files.
Python / code-coverage/pytest
View coverage of the 10 most impacted files.
Python / code-coverage/pytest-unit
Line coverage data for the release-candidate/v1 branch is not yet available. View coverage of the 10 most covered files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
|
(agent) Reviewed head Failure modes checked: omitted/null source_id on destination selectors is rejected after exclude_none normalization; mixed valid/invalid selectors fail before HTTP; omitted/empty streams and source-level selectors remain accepted. MCP delegates to this same method after list resolution. Validation: PASS: 8 focused selector cases against actual PR method/model AST; HTTP boundary stubbed (exit 0). This is an isolated behavior check, not the full PyAirbyte test suite. |
Aaron ("AJ") Steers (aaronsteers)
left a comment
There was a problem hiding this comment.
Approving to unblock when ready.
70dfec7
into
release-candidate/v1
Summary
An MCP agent searched a destination with
streams[]entries that had nosource_id. Airbyte Cloud rejected the request with a bare 422 ("The request is invalid or unsupported."), and the agent had no way to tell what was wrong.The rule: on a destination search, every
streams[]entry must includesource_id. Only a source search may omit it, and there it must match the searched source if given. Cloud is also gaining a specificsource_id_requirederror; the client-side check fails fast with a clear message either way.execute_external_search_querytool: the docstring and thestreamsparameter description state the rule.CloudConnector.execute_search_query: raisesAirbyteLibInputErrorbefore the request when a destination search has a stream withoutsource_id, next to the existingdestination_idcheck.ExternalSearchStreamFilter.source_iddocstring updated.Test plan
uv run pytest tests/unit_tests/test_cloud_direct_execute.py tests/unit_tests/test_mcp_cloud.py -k search(new casedestination_stream_without_source_id)ruff format --check,ruff check,pyrefly check