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

KH
2d ago
+26-6

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.

SeatsCalls over 30 daysWithin 3M?
21.90Myes
43.80Mno, runs out around day 24
87.60Mno, 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.


[!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 1402ee5c47975d4c65869bd3361a1665b34a57c5. 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