Skip to content

fix(sync): shrink Gmail fetch page to avoid Composio 413#73

Merged
senamakel merged 1 commit into
mainfrom
fix/gmail-413
Jul 14, 2026
Merged

fix(sync): shrink Gmail fetch page to avoid Composio 413#73
senamakel merged 1 commit into
mainfrom
fix/gmail-413

Conversation

@senamakel

Copy link
Copy Markdown
Member

Summary

Follow-up to #71. Live Gmail sync failed with HTTP 413 Payload Too Large from
Composio's execute endpoint.

GMAIL_FETCH_EMAILS is called with include_payload: true, so each page returns
full message bodies. A 50-message page overflows Composio's tool-response size
cap. Verified against a real mailbox:

max_results (include_payload: true) Result
50 HTTP 413
25 HTTP 200
10 / 5 HTTP 200

Lower the Gmail pipeline's default page_size from 50 to 25 (which also
matches the default per-toolkit item budget). Callers needing more throughput can
still raise it via with_limits.

Testing

  • cargo test --features sync --test composio_sync_mock — 12 passed.
  • Live: COMPOSIO_TOOLKITS=gmail cargo run --example composio_harness --features sync
    → was 413, now PASS, 25 documents ingested.

https://claude.ai/code/session_01AtynpEKn3QZJKZYvL8uDNR

GMAIL_FETCH_EMAILS with include_payload=true returns full message bodies, so a
50-message page overflows Composio's tool-response size cap (HTTP 413 Payload
Too Large). Lower the default page_size to 25, which stays under the cap while
matching the default item budget. Verified live: gmail sync went from 413 to
PASS with 25 documents ingested.

Claude-Session: https://claude.ai/code/session_01AtynpEKn3QZJKZYvL8uDNR
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 6 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b78db3a2-36f1-423a-81e2-c000e56b3f23

📥 Commits

Reviewing files that changed from the base of the PR and between 02cfc2a and 3cb3616.

📒 Files selected for processing (1)
  • src/memory/sync/composio/gmail.rs

Comment @coderabbitai help to get the list of available commands.

@senamakel senamakel merged commit ba9e12e into main Jul 14, 2026
8 checks passed
@senamakel senamakel deleted the fix/gmail-413 branch July 14, 2026 04:27
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.

1 participant