GPT-5 finding
Synchronous gh CLI calls in request handlers block the event loop and degrade concurrency
mediumperformancehigh
- dashboard/app/api/analytics/route.ts:55-59
- dashboard/app/api/analytics/route.ts:10-15
- dashboard/app/api/runs/[id]/logs/route.ts:39-55
- dashboard/app/api/runs/route.ts:26-31
execSync/execFileSync are blocking; in a Node/Next.js server this stalls the event loop per request, harming throughput and tail latency under load. These handlers may also run in serverless environments where long-running sync work is discouraged.
Recommendation
Use non-blocking alternatives: wrap execFile in a Promise, or better, call GitHub REST/GraphQL APIs via Octokit/fetch. Ensure timeouts and error handling remain robust. Cache stable data when possible.