Skip to content

fix(engine): size the connect plan for a full room's lifetime - #560

Open
khaliqgant wants to merge 1 commit into
mainfrom
fix/connect-plan-api-calls-8m
Open

khaliqgant wants to merge 1 commit into
mainfrom
fix/connect-plan-api-calls-8m

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Part of AgentWorkforce/cloud#5293. Follows #558. Khaliq chose this option (A) after the sizing gap below came up in review of cloud#5296.

Problem

#558 sized connect at 3M api_calls for a two-seat room. A room can have up to 8 participants (CONNECT_PARTICIPANT_CAP) and live 43,200 minutes (CONNECT_MAX_ROOM_LIFETIME_MINUTES). Measured from relay-desktop main (probe/src/relay/connect.rs poll_connects), a seat reads deliveries every 3s and heartbeats every 30s, which is about 22 requests a minute. That matches the 44/min observed for two seats in cloud#5276.

Seats Calls over 30 days Within 3M?
2 1.90M yes
4 3.80M no, runs out around day 24
8 7.60M no, runs out around day 12

Change

  • PLAN_LIMITS.connect.api_calls: 3,000,000 → 8,000,000. That covers a full room for its maximum lifetime with about 5% headroom and stays below pro (10M). The other limits are unchanged; 1,200/min already covers 8 × 22.
  • A test encodes the sizing, so a later change to the poll cadence or the room caps shows up here.
  • README plan table and changelogs (Patch).

Land order

  1. This PR merged and released (10.6.2).
  2. relaycast-cloud bumps @relaycast/engine to 10.6.2 and deploys. No relaycast-cloud code change is needed; PLAN_RANK already has connect.
  3. Then cloud#5296 switches Connect rooms to connect. Existing rows already on connect are none, since cloud#5296 has not shipped.

Verification

$ cd packages/engine && npx vitest run src/providers/__tests__/static-entitlements.test.ts
      Tests  4 passed (4)
$ npx tsc --noEmit -p packages/engine   → ok
$ npx turbo lint --filter=@relaycast/engine   → 3 successful
$ assertRepositoryChangelogSemver('.', '10.6.2')   → PASS

Revert check: setting api_calls back to 3,000,000:

     × resolves the connect profile for room workspaces
     × covers a full room polling for its maximum lifetime
      Tests  2 failed | 2 passed (4)

Restored → Tests 4 passed (4).

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff


Note

Low Risk
Configuration-only quota bump for the connect tier with updated tests and docs; no auth, billing logic, or API behavior changes beyond the higher limit.

Overview
Raises the connect workspace plan monthly api_calls quota from 3M to 8M in PLAN_LIMITS, so an eight-seat Relay Connect room that polls deliveries every 3s and heartbeats every 30s can run for its full 30-day maximum without hitting plan_limit_exceeded. Other connect limits (agents, rate/min, etc.) are unchanged.

Adds a static-entitlements test that encodes that sizing assumption, and updates the README plan table and patch changelog entries.

Reviewed by Cursor Bugbot for commit 1402ee5. Bugbot is set up for automated code reviews on this repo. Configure here.


Agent Relay sessions

  • claude session 76bc532b · opened via gh pr create · last active 2026-10-18

A Relay Connect seat makes about 22 requests a minute (delivery read every
3s, heartbeat every 30s). A full eight-seat room open for its 30-day
maximum makes about 7.6M calls, so 3M ran out around day 12. Raise
connect.api_calls to 8M, still below pro.

Refs AgentWorkforce/cloud#5293

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

khaliqgant has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T05:01:52.650579Z 1402ee5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9355fe87-8753-463e-858c-aa9c2940d107
📥 Commits

Reviewing files that changed from the base of the PR and between 7fe4f09 and 1402ee5.

📒 Files selected for processing: 5
  • CHANGELOG.md
  • README.md
  • packages/engine/CHANGELOG.md
  • packages/engine/src/providers/__tests__/static-entitlements.test.ts
  • packages/engine/src/providers/static-entitlements.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The connect plan’s monthly API-call limit increases from 3,000,000 to 8,000,000. Tests and documentation reflect the new limit and its eight-seat, 30-day estimate.

Changes: Connect quota

Layer / File(s) Summary
Update and document the connect quota
packages/engine/src/providers/static-entitlements.ts, packages/engine/src/providers/__tests__/static-entitlements.test.ts, README.md, CHANGELOG.md, packages/engine/CHANGELOG.md
The connect plan’s API-call limit increases to 8,000,000. Tests check the limit against calculated API-call and per-minute totals for eight seats over 43,200 minutes. The README and changelogs document the updated quota. Both changelog entries use the “Unreleased - Patch” heading.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: willwashburn

Merge Risk: ⚪ Minimal · up to 1402e

The Connect plan will permit up to 8M monthly API calls, covering the stated eight-seat, 30-day usage estimate. No concrete merge-blocking risk is apparent.

Pre-merge checks: Passed 5
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description clearly explains the Connect quota increase, sizing rationale, test coverage, documentation updates, and verification results.
Title check Passed The title clearly and concisely describes the main change: sizing the Connect plan for a full room lifetime.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. (3 skipped: 3 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the monthly count,
Eight million calls now fill the amount.
Eight seats poll through day and night,
The tests confirm the totals right.
The changelog marks the patch in sight.

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

@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: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Capy found no issues.

Open in Capy

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