Skip to content

Poll the GitHub relay every 30s#693

Merged
arul28 merged 1 commit into
mainfrom
ade/relay-poll-30s
Jul 3, 2026
Merged

Poll the GitHub relay every 30s#693
arul28 merged 1 commit into
mainfrom
ade/relay-poll-30s

Conversation

@arul28

@arul28 arul28 commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Follow-up to #691: halve worst-case webhook-to-app latency (60s → 30s) by polling the relay at the service's 30s floor at both wiring sites (desktop main + daemon bootstrap).

Cost analysis: each poll is one request to our own Cloudflare worker — ~86k req/month per active client against a 10M-included plan; the per-poll GitHub permission check doubles to 120 calls/hour against the 5,000/hour app-user-token budget. No GitHub data fetch is involved in the poll itself.

Validation: desktop + ade-cli typechecks clean, ingress test file green (9/9).

🤖 Generated with Claude Code

Greptile Summary

This PR lowers the GitHub relay polling interval for automation ingress. The main changes are:

  • Sets the daemon bootstrap relay poll interval to 30 seconds.
  • Sets the desktop main-process relay poll interval to 30 seconds.
  • Keeps the interval aligned with the ingress service's 30-second floor.

Confidence Score: 5/5

Safe to merge with minimal risk.

The change is narrowly scoped to passing pollIntervalMs: 30_000 into an existing service that already clamps polling to a 30-second minimum.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • Compared the daemon poll interval baseline to the head, confirming that pollIntervalMs is now set to 30_000 in the daemon bootstrap create block and that effectiveDaemonRelayPollIntervalMs also updates to 30_000.
  • Compared the desktop poll interval behavior between base and head, confirming that createAutomationIngressService on base used pollIntervalMsOwnProperty=false and did not pass observedPollIntervalMs, while the head uses pollIntervalMsOwnProperty=true with observedPollIntervalMs equal to 30_000.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
apps/ade-cli/src/bootstrap.ts Sets the daemon automation ingress relay poll interval to the 30-second service floor.
apps/desktop/src/main/main.ts Sets the desktop automation ingress relay poll interval to the 30-second service floor.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Runtime as Desktop/Daemon Runtime
participant Ingress as AutomationIngressService
participant Relay as GitHub Relay Worker
participant PR as prService

Runtime->>Ingress: createAutomationIngressService(pollIntervalMs: 30_000)
Runtime->>Ingress: start()
loop every 30s floor
    Ingress->>Relay: poll for GitHub webhook deliveries
    Relay-->>Ingress: deliveries + next cursor
    Ingress->>PR: ingestGithubWebhook(delivery)
    Ingress->>Ingress: persist relay cursor
end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Runtime as Desktop/Daemon Runtime
participant Ingress as AutomationIngressService
participant Relay as GitHub Relay Worker
participant PR as prService

Runtime->>Ingress: createAutomationIngressService(pollIntervalMs: 30_000)
Runtime->>Ingress: start()
loop every 30s floor
    Ingress->>Relay: poll for GitHub webhook deliveries
    Relay-->>Ingress: deliveries + next cursor
    Ingress->>PR: ingestGithubWebhook(delivery)
    Ingress->>Ingress: persist relay cursor
end
Loading

Reviews (1): Last reviewed commit: "Poll the GitHub relay every 30s instead ..." | Re-trigger Greptile

Halves worst-case webhook-to-app latency. Each poll is a single request
to our own Cloudflare worker (no GitHub data fetch), so the cost is
negligible; the one GitHub permission check per poll rises from 60 to
120 calls/hour against the 5,000/hour app-user-token budget.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Preview Jul 3, 2026 2:59am

@mintlify

mintlify Bot commented Jul 3, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ade-ac1c6011 🟢 Ready View Preview Jul 3, 2026, 3:00 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@arul28, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b0a661b0-8b43-42e8-8c47-3749a3adc867

📥 Commits

Reviewing files that changed from the base of the PR and between 037a438 and 8d2fc7f.

📒 Files selected for processing (2)
  • apps/ade-cli/src/bootstrap.ts
  • apps/desktop/src/main/main.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/relay-poll-30s

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

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

@arul28 arul28 merged commit aeb7dd6 into main Jul 3, 2026
51 of 53 checks passed
@arul28 arul28 deleted the ade/relay-poll-30s branch July 3, 2026 03:17
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