Skip to content

adk evals: a dev-server rebuild mid-run fails the in-flight turn instead of retrying, and reports it as an opaque 30s totalSpans=0 timeout #37

Description

@johnf

Environment: adk CLI 2.0.1 (linux-x64 release binary); @botpress/evals 2.0.2, @botpress/runtime 2.0.2; observed on Ubuntu (kernel 6.17) locally and on GitHub Actions ubuntu-latest.

Running a full eval suite (~100 evals, ~20 min) with adk evals against adk dev reliably risks the dev backend becoming unreachable mid-run, after which every remaining eval fails with Unable to connect. Is the computer able to access the url? (devServerUrl: http://localhost:3001). The bot HTTP port (3000) often stays up while the trace listener (3001) is gone — ss -ltn shows 3001 missing, 3000 listening.

Two distinct triggers observed:

(a) Any hot-reload rebuild mid-run. Editing any watched file while evals are in flight (Changes detected, rebuilding) drops the trace endpoint (socket hang up) and it never comes back. Reproduced twice on 2026-07-10.

(b) Event-loop degradation under load — no file edits, no watcher. Reproduced on GitHub Actions ubuntu-latest with adk dev --non-interactive --no-watch (so hot reload is ruled out): the dev server's NDJSON log shows escalating event-loop warnings (backend <dir> blocked for 5577ms, then near-continuous blocks of 0.5–9 s for five minutes) until ~9 minutes into the suite the backend stops answering entirely — no fatal error, no exit line in the log; the process just goes dark to clients and evals cascade with Unable to connect. Locally the same mode was triggered intermittently by a single eval whose turn fires two concurrent alert-email actions: backend blocked for 56784msLost connection to DevConsole → reconnect failures forever (2 of 3 runs).

Expected: the trace endpoint survives a rebuild (or comes back after one), and the dev backend either keeps serving under eval load or fails loudly. A run-killing silent hang is the worst case for CI: the gate can't distinguish a dead server from a broken bot.

Repro (mode b, the CI-relevant one):

  1. A bot with a non-trivial eval suite (ours: ~99 evals, multi-turn, LLM judges).
  2. adk dev --non-interactive --no-watch (fresh boot, no file edits afterwards).
  3. adk evals --format json > report.json.
  4. Watch the dev server log for event-loop … blocked for warnings; mid-suite, evals start failing with Unable to connect against devServerUrl and never recover.

Mode (a): start any eval run, touch a watched source file mid-run, observe Changes detected, rebuildingsocket hang up → every subsequent eval fails.

Workaround: restart adk dev before every eval run; never edit files mid-run; and/or run the suite in tag-sized chunks (< ~5 min each) against a fresh server per chunk, merging the JSON reports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions