From 8d2fc7f247d275b44ecaa38135d087d481beb90e Mon Sep 17 00:00:00 2001 From: Arul Sharma <31745423+arul28@users.noreply.github.com> Date: Thu, 2 Jul 2026 22:59:26 -0400 Subject: [PATCH] Poll the GitHub relay every 30s instead of 60s 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 --- apps/ade-cli/src/bootstrap.ts | 3 +++ apps/desktop/src/main/main.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/apps/ade-cli/src/bootstrap.ts b/apps/ade-cli/src/bootstrap.ts index c4623dc8a..b3807b06a 100644 --- a/apps/ade-cli/src/bootstrap.ts +++ b/apps/ade-cli/src/bootstrap.ts @@ -1085,6 +1085,9 @@ export async function createAdeRuntime(args: { githubService: headlessLinearServices.githubService, listRules: () => (automationService ? projectConfigService.get().effective.automations ?? [] : []), ingressCursorStore: createKvIngressCursorStore(db), + // 30s halves worst-case webhook latency. Each poll is one request to our + // own relay worker (no GitHub data cost); the service floors at 30s. + pollIntervalMs: 30_000, }); void automationIngressService.start().catch((error) => { logger.warn("automations.ingress_start_failed", { diff --git a/apps/desktop/src/main/main.ts b/apps/desktop/src/main/main.ts index 08268b16a..67f32d3b8 100644 --- a/apps/desktop/src/main/main.ts +++ b/apps/desktop/src/main/main.ts @@ -3201,6 +3201,9 @@ app.whenReady().then(async () => { githubService, listRules: () => (automationService ? projectConfigService.get().effective.automations ?? [] : []), ingressCursorStore: createKvIngressCursorStore(db), + // 30s halves worst-case webhook latency. Each poll is one request to + // our own relay worker (no GitHub data cost); the service floors at 30s. + pollIntervalMs: 30_000, }); const githubPollingService = automationService