Skip to content

feat(mcp): add bounded readiness polling for sources and downloads - #279

Merged
jacob-bd merged 1 commit into
jacob-bd:mainfrom
Sanity-Cloud:upstream/readiness-polling-20260805
Aug 5, 2026
Merged

feat(mcp): add bounded readiness polling for sources and downloads#279
jacob-bd merged 1 commit into
jacob-bd:mainfrom
Sanity-Cloud:upstream/readiness-polling-20260805

Conversation

@insane66613

Copy link
Copy Markdown
Contributor

Summary

  • add opt-in bounded polling to source_get_content
  • add opt-in bounded polling to download_artifact
  • keep polling and timeout logic in services/, with thin MCP wrappers
  • preserve current behavior by default with wait=False

This is the focused polling behavior discussed during review of #229. It deliberately excludes the ChatGPT bridge, authentication, CDP, and public-route changes from that earlier work.

Behavior

Both tools accept:

  • wait: bool = False
  • wait_timeout
  • poll_interval

Polling uses monotonic deadlines, enforces a minimum interval, and retries only recognized not-ready states. Validation, authentication, permission, and other terminal failures continue to fail immediately.

The download service supports both synchronous and awaitable download implementations without calling asyncio.run() from the MCP wrapper.

Compatibility

  • existing calls remain immediate because wait defaults to False
  • successful response shapes are unchanged
  • no new dependencies

Validation

  • uv run ruff check .
  • uv run ruff format --check .
  • focused source/download service and MCP suites — 164 passed
  • dependency composition with structured errors — 207 passed
  • full upstream-first integration stack on Windows — 1,318 passed, 39 skipped

A live in-progress NotebookLM source/artifact was not available during final validation, so timeout and transition states were exercised with deterministic service/client tests rather than a live mutation.

@jacob-bd
jacob-bd merged commit 7e2786e into jacob-bd:main Aug 5, 2026
3 checks passed
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