Skip to content

fix(mcp): polish Connector Builder base PR with additional fixes and improvements - #1408

Merged
Aaron ("AJ") Steers (aaronsteers) merged 3 commits into
devin/1792350894-connector-builder-toolsfrom
devin/1792369980-connector-builder-readiness-fixes
Oct 19, 2026
Merged

Aaron ("AJ") Steers (aaronsteers) merged 3 commits into
devin/1792350894-connector-builder-toolsfrom
devin/1792369980-connector-builder-readiness-fixes

Conversation

@aaronsteers

@aaronsteers Aaron ("AJ") Steers (aaronsteers) commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Overview

👉 TL;DR: Connector Builder readiness checks now work against live Airbyte Cloud, and they report data, failures and warnings without a success verdict. Before this, every readiness call failed because the default read size was larger than Cloud allows. A full-sync-only call also returned passed=true before its sync finished.

Specifically, this adds TEST_READ_MAX_RECORDS = 5_000, TEST_READ_MAX_PAGES = 20, TEST_READ_MAX_SLICES = 20, validates limits client-side, separates errored reads from capped reads, adds informational warnings (round record counts, a full last page, 0 records), and replaces passed / passed_streams with a per-stream failed.

Stacked on #1407:

Changes

  • run_readiness_checks() now defaults to record_limit=5_000 (was 10_000). Cloud's POST /v1/connector_builder_projects/read_stream returns HTTP 422 for recordLimit > 5000, pageLimit > 20 or sliceLimit > 20. The response body is only {"errorId": ...}, so the agent had nothing to act on.
  • New _check_test_read_limits() raises AirbyteLibInputError with the accepted ranges before any API call. Readiness fails once instead of once per stream.
  • test_connector_builder_stream MCP args are bounded by the new constants (le=5000 for records, was 10000).
  • Streams with an error or http_errors now get read_to_end=False and are listed as not read. They no longer show up as hit a cap: ... Check these with a full sync after publishing.
  • New warnings: list[str] on ConnectorBuilderStreamReadResult and ConnectorBuilderStreamReadiness, returned by both MCP tools. When a read reached end of stream (test_read_limit_reached false) and has records, it warns if the total is a multiple of 10, or if the last non-empty page has the same record count as the first (so more pages may exist). A read that reached end of stream with 0 records gets a warning instead of failing. Warnings don't change failed or read_to_end.
  • Breaking (unreleased, feat(mcp): add Connector Builder project tools for hosted connector building #1407 only): ConnectorBuilderReadinessReport.passed, .passed_streams and ConnectorBuilderStreamReadiness.passed are removed. New ConnectorBuilderStreamReadiness.failed: true when the read raised an error, returned HTTP errors, or logged errors. failed_streams, pending_streams and not_attempted_streams stay; run_full_sync still starts only when none of them are non-empty.
  • next_steps states facts and actions only: failed, pending, not-attempted and capped streams ("hit a test-read cap, so later pages weren't read; check them with a full sync"), plus "Report these streams' warnings to the user: ...". "All named streams passed" and "Not ready yet" are gone. A stream that both hit a cap and logged an error is listed as failed and capped.
  • Tool descriptions: run_connector_builder_readiness_checks says the report calls out failures and warnings without judging readiness, and to report every failure and warning to the user. test_connector_builder_stream explains test_read_limit_reached, page-boundary overshoot, and warnings.

Review Spotlight

Reviewers with limited time, please review first:

  • connector_builder/project.py _check_test_read_limits: the limit guard and guidance text
  • connector_builder/_util.py readiness_checks / readiness_next_steps: capped vs. not-read split, failed, and the warnings step
  • connector_builder/models.py _record_count_warnings: the warning heuristics

Evidence

Goose Desktop 1.36.0, claude-opus-4-7, Devin sandbox Cloud workspace, fresh chat per run. Recordings are in the session thread.

Run Server Nudges Readiness Agent behavior
JSONPlaceholder on #1407 at 0ca475e7 local stdio 0 5 calls, all HTTP 422 (21 per-stream failures) Guessed concurrency, batch size and testing values, then headlined "Ready to Publish"
JSONPlaceholder on this branch at 09f83431 local stdio 0 1 call, 6/6 passed, passed=false (photos at the 5,000 cap) Said "The connector is ready to publish" before verifying, then published; full sync 111673054 SUCCEEDED
GitHub, 5 streams, unauthenticated, at 09f83431* local stdio 1 (stay unauthenticated) repositories, releases OK; pull_requests capped at 2,000; issues GitHub 422 at 1,000; stargazers 401 Claimed it switched issues to cursor pagination, but the saved manifest still used PageIncrement. Not published
JSONPlaceholder on this branch at 87c9d625 hosted cloud-mcp-preview, bearer + X-MCP-Insiders: 1 0 passed=false (photos cap), "Not ready yet" step, 2 warnings on each uncapped stream Did not claim ready until full sync 111677627 SUCCEEDED with 5,910 records. 42 calls, 5 errors during recovery, 4m07s
JSONPlaceholder (new definition JSONPlaceholder 1408 20261019T164712Z) at cc9de942 hosted cloud-mcp-preview 0 passed=false (photos cap), 2 warnings on each uncapped stream Did not claim ready until full sync 111796318 SUCCEEDED with 5,910 records. 31 calls, 2 errors, 3m05s

* The GitHub run's long-lived server likely lazily imported connector_builder.py mid-edit from the shared checkout, so it isn't a frozen-SHA result. It also surfaced the read_to_end=true on HTTP-error streams bug fixed here.

Hosted readiness with the new step and warnings:

Hosted readiness

Limit probe against live Cloud read_stream:

record / page / slice Status
100 / 5 / 5 200
5000 / 5 / 5 200
5001 / 5 / 5 422
10000 / 5 / 5 422
100 / 20 / 5 and 100 / 5 / 20 200
100 / 21 / 5 and 100 / 5 / 21 422

Risks

  • Round-count warnings are heuristics and fire on legitimate data (all six JSONPlaceholder streams). They're informational only.
  • Breaking for Python callers of feat(mcp): add Connector Builder project tools for hosted connector building #1407's API: passed / passed_streams are removed (see Changes); nothing released depends on them.
  • Breaking for Python callers passing record_limit > 5,000 (or page/slice > 20): they now get AirbyteLibInputError instead of Cloud's HTTP 422. No call that previously succeeded is rejected.

Follow-ups

  • The latest hosted run tested cc9de942, before the no-pass-verdict change; not yet rerun on preview.
  • Sync-status polling: 24-28 polls per run, with no wait/backoff guidance.

Test plan

  • uv run pytest tests/unit_tests/test_cloud_connector_builder.py tests/unit_tests/test_mcp_cloud.py tests/unit_tests/test_mcp_arg_trace_parity.py tests/unit_tests/test_mcp_trusted_execution.py tests/unit_tests/test_mcp_docs_includes.py -q: 336 passed at 2d3c4fe0
  • ruff check, ruff format --check, pyrefly check on touched files

Link to Devin session: https://app.devin.ai/sessions/37c00a83f788401489bfd0e37c0b7440
Open in Devin Desktop: https://app.devin.ai/desktop/session/37c00a83f788401489bfd0e37c0b7440?variant=devin
Requested by: Aaron ("AJ") Steers (@aaronsteers)

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

Copy link
Copy Markdown

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

Testing This PyAirbyte Version

You can test this version of PyAirbyte using the following:

# Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1792369980-connector-builder-readiness-fixes' pyairbyte --help

# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1792369980-connector-builder-readiness-fixes'

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /fix-pr - Fixes most formatting and linting issues
  • /uv-lock - Updates uv.lock file
  • /test-pr - Runs tests with the updated PyAirbyte
  • /prerelease - Builds and publishes a prerelease version to PyPI
  • /evals - Runs the Cloud MCP evals that use the MCP tools this PR changed (/evals full=true runs the full suite)
📚 Show Repo Guidance

Helpful Resources

Community Support

Questions? Join the #pyairbyte channel in our Slack workspace.

📝 Edit this welcome message.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are focused, regression tests cover the principal fixes, and no blocking issues remain.

No open issues 🎉

What changed in this PR

Fixes Connector Builder readiness checks to respect Airbyte Cloud’s test-read limits.

Changes:

  • Defaults readiness reads to 5,000 records and validates limits before API calls.
  • Separates failed reads from capped reads in the checklist.
  • Updates MCP limits and guidance, with regression tests.
File Description
tests/​unit_tests/​test_cloud_connector_builder.py Tests limit validation, defaults, and failed-read reporting.
airbyte/​mcp/​cloud.py Aligns argument bounds and clarifies readiness guidance.
airbyte/​cloud/​connector_builder.py Adds shared limits, validation, and corrected checklist reporting.

Review effort: Balanced

@github-code-quality

github-code-quality Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: Python

Python / code-coverage/pytest-no-creds

devin/1792350894-con... d9f652f devin/1792369980-con... b22d608 +/-
65% 80% +15%
View coverage of the 10 most impacted files.
File devin/1792350894-con... d9f652f devin/1792369980-con... b22d608 +/-
airbyte/_util/api_util.py 36% 67% +31%
airbyte/mcp/cloud.py 52% 84% +32%
airbyte/cloud/connectors.py 34% 79% +45%
airbyte/mcp/_datadog.py 0% 50% +50%
airbyte/mcp/_telemetry.py 0% 94% +94%
airbyte/_direct...ctors/models.py 0% 95% +95%
airbyte/cloud/c...lder/project.py 0% 95% +95%
airbyte/mcp/_sso_auth.py 0% 96% +96%
airbyte/cloud/models.py 0% 97% +97%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%

Python / code-coverage/pytest

devin/1792350894-con... d9f652f devin/1792369980-con... b22d608 +/-
71% 82% +11%
View coverage of the 10 most impacted files.
File devin/1792350894-con... d9f652f devin/1792369980-con... b22d608 +/-
airbyte/cloud/connectors.py 51% 82% +31%
airbyte/mcp/cloud.py 52% 84% +32%
airbyte/mcp/_datadog.py 0% 50% +50%
airbyte/mcp/_user_identity.py 0% 93% +93%
airbyte/mcp/_telemetry.py 0% 94% +94%
airbyte/_direct...ctors/models.py 0% 95% +95%
airbyte/cloud/c...lder/project.py 0% 95% +95%
airbyte/mcp/_sso_auth.py 0% 96% +96%
airbyte/cloud/models.py 0% 97% +97%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%

Python / code-coverage/pytest-unit

devin/1792350894-con... devin/1792369980-con... b22d608 +/-
— 77% —

Line coverage data for the devin/1792350894-con... branch is not yet available.

View coverage of the 10 most covered files.
File devin/1792350894-con... devin/1792369980-con... b22d608 +/-
airbyte/cloud/models.py — 97% —
airbyte/mcp/_sso_auth.py — 96% —
airbyte/_direct...ctors/models.py — 95% —
airbyte/cloud/client.py — 90% —
airbyte/exceptions.py — 90% —
airbyte/mcp/cloud.py — 84% —
airbyte/progress.py — 80% —
airbyte/cloud/connectors.py — 79% —
airbyte/shared/...ql_processor.py — 68% —
airbyte/_util/api_util.py — 67% —

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 19, 2026 18:57 UTC

@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1792369980-connector-builder-readiness-fixes branch from 09f8343 to 9541e67 Compare October 19, 2026 00:53
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Prerelease Build Started

Building and publishing prerelease package from this PR...
Check job output.
Prerelease Published to PyPI

Version: 1.0.0-rc.34.dev140839183153710
View publish workflow

Install with:

pip install airbyte==1.0.0-rc.34.dev140839183153710

@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1792369980-connector-builder-readiness-fixes branch from 9541e67 to 87c9d62 Compare October 19, 2026 01:07
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Prerelease Build Started

Building and publishing prerelease package from this PR...
Check job output.
Prerelease Published to PyPI

Version: 1.0.0-rc.34.dev140839183917490
View publish workflow

Install with:

pip install airbyte==1.0.0-rc.34.dev140839183917490

@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1792369980-connector-builder-readiness-fixes branch 2 times, most recently from 182c2e4 to cc9de94 Compare October 19, 2026 16:16
@aaronsteers
Aaron ("AJ") Steers (aaronsteers) added this pull request to stack #1409 October 19, 2026 16:29
@aaronsteers
Aaron ("AJ") Steers (aaronsteers) marked this pull request as ready for review October 19, 2026 16:29
@aaronsteers Aaron ("AJ") Steers (aaronsteers) changed the title fix(mcp): fix Connector Builder readiness checks against Cloud's test-read limits fix(mcp): polish Connector Builder base PR with additional fixes and improvements Oct 19, 2026
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Prerelease Build Started

Building and publishing prerelease package from this PR...
Check job output.
Prerelease Published to PyPI

Version: 1.0.0-rc.34.dev140839285966173
View publish workflow

Install with:

pip install airbyte==1.0.0-rc.34.dev140839285966173

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Devin Review

Comment thread airbyte/cloud/connector_builder.py Outdated
Comment thread airbyte/cloud/connector_builder.py Outdated
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Hosted preview retest: Goose Desktop with Claude Opus 4.7, fresh chat, zero nudges, against PyAirbyte 1.0.0-rc.34.dev140839285966173 built from cc9de942.

Created a new connector and ran a real sync. Inventories taken before and after the run show the name didn't collide with any prior one and that a new definition was created (JSONPlaceholder 1408 20261019T164712Z, definition 91cc06aa-21d4-4da0-9400-e779e39a919f). Clicking through Cloud confirmed published v1, six streams, the source settings, and a Timeline sync to the dev-null destination that went from running to succeeded, job 111796318 with 5,910 records.

Builder: six streams, published v1 Timeline: successful no-op sync
Builder streams Successful sync

The first readiness check correctly returned passed=false because photos hit the cap. The agent didn't call the connector ready until the sync actually succeeded. The full-sync fallback to the published manifest worked.

Metric Previous hosted run This run
Tool calls 42 31
Errors 5 2
Sync-status polls 28 24
Prompt to final answer 4m07s 3m05s
Remaining friction and coverage limits
  • run_full_sync=true still publishes and then fails with "No test source found". The publish retry after that fails with "no draft manifest". The agent recovered on its own.
  • A readiness run with only the full-sync check returned passed=true with streams=[] before the job had finished. The agent polled for the result anyway.
  • The final summary left out the 10 informational completeness warnings.
  • Not tested: c6b04293/5caa5a88 (not deployed), the HTTP-error, timeout, and invalid-input paths, and destination reuse. No resources were deleted.

Written by Devin

@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1792369980-connector-builder-readiness-fixes branch from 5caa5a8 to 8c31a70 Compare October 19, 2026 18:14
devin-ai-integration Bot and others added 2 commits October 19, 2026 18:37
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No blocking correctness issues remain; the retained test-coverage suggestion is optional.

1 open issue

Review effort: Balanced

Comment thread tests/unit_tests/test_cloud_connector_builder.py Outdated
Co-Authored-By: AJ Steers <aj@airbyte.io>
@aaronsteers
Aaron ("AJ") Steers (aaronsteers) removed this pull request from stack #1409 October 19, 2026 19:07
@aaronsteers
Aaron ("AJ") Steers (aaronsteers) merged commit b8c793a into devin/1792350894-connector-builder-tools Oct 19, 2026
29 checks passed
@aaronsteers
Aaron ("AJ") Steers (aaronsteers) deleted the devin/1792369980-connector-builder-readiness-fixes branch October 19, 2026 19:08
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.

2 participants