AntFleet

Disagreement · 6084d1ea-openai-2

Synchronous exec calls block the event loop and degrade concurrency

mismatch
repo 6f7fc663·PR #3·reviewed 1 week ago

Primary finding

Synchronous exec calls block the event loop and degrade concurrency

mediumperformancemedium
  • dashboard/app/api/secrets/route.ts:32-38
  • dashboard/app/api/secrets/route.ts:41-47
  • dashboard/app/api/secrets/route.ts:95-99
  • dashboard/app/api/secrets/route.ts:118-120
execSync/execFileSync block the Node.js event loop thread handling the request, reducing throughput and increasing latency under concurrent load.

Recommendation

Use non-blocking child process APIs (spawn/exec with callbacks or promise wrappers like execa) and await their completion, or offload to a worker/thread pool or queue if operations are long-running.

Counterpart finding

`ghAvailable()` runs `gh auth status` on every request without caching, doubling exec cost

lowperformancehigh
  • dashboard/app/api/secrets/route.ts:33-40
Each GET/POST/DELETE invokes `gh auth status` (a process spawn that can hit the network) before the real work, doubling latency and spawn count. Even a short TTL cache (e.g., 30s) would eliminate the redundant probe; the subsequent `gh secret …` call already fails clearly if auth is lost.

Recommendation

Cache the result for a short interval or skip the probe and rely on the real command's exit code/stderr to produce the 503.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →