Skip to content

feat(studio): save eval run logs and fix active run status icon#1241

Merged
christso merged 1 commit into
mainfrom
feat/1240-run-logs-active-status
May 14, 2026
Merged

feat(studio): save eval run logs and fix active run status icon#1241
christso merged 1 commit into
mainfrom
feat/1240-run-logs-active-status

Conversation

@christso
Copy link
Copy Markdown
Collaborator

Summary

  • Capture eval-run stdout/stderr to <run-dir>/console.log and serve it via GET /api/runs/:filename/log (unscoped + benchmark-scoped) so the output survives after the in-memory buffer is pruned, including for runs that crashed early.
  • Surface live run status from the in-memory Studio tracker on /api/runs so the RunList renders a pulsing cyan dot for starting/running runs instead of the misleading red ✗ produced when pass_rate is still 0.
  • Add a collapsible "Console Log" section in RunDetail with a monospace/dark theme viewer. The section auto-hides when no log is available (remote runs, or local runs that completed before this feature shipped) and live-streams while the run is active.

Closes #1240

Test plan

  • bun run typecheck
  • bun run lint
  • bun run test — 1764 + 67 + 539 tests pass (0 fail)
  • Studio frontend builds (bun --filter ./apps/studio run build)
  • Red (main): start an eval; the /api/runs entry has pass_rate: 0 so the RunList renders a red ✗; finished runs have no console.log to inspect.
  • Green (this branch): launched an eval against /tmp/agentv-uat-1240 via POST /api/eval/run. While running, /api/runs returns "status":"running" and pass_rate: 0 (frontend now renders the pulsing dot). After completion, console.log (2434 bytes) exists in the run dir and GET /api/runs/<id>/log returns the captured output (eval progress + summary). GET /api/runs/<unknown>/log returns 404 → frontend hides the section.
$ curl -s http://localhost:3119/api/runs | jq '.runs[] | {filename, status, pass_rate}'
{
  "filename": "2026-05-14T03-21-04-785Z",
  "status": "running",
  "pass_rate": 0
}

$ curl -s -o /dev/null -w "%{http_code} %{size_download}\n" \
    http://localhost:3119/api/runs/2026-05-14T03-21-04-785Z/log
200 2434

🤖 Generated with Claude Code

- Capture spawned eval process stdout/stderr to <run-dir>/console.log so
  the output survives after the in-memory buffer is pruned, including
  for runs that crashed before producing any results.
- Add GET /api/runs/:filename/log (both unscoped and benchmark-scoped)
  to serve the captured log; 404 when no log was written (remote runs
  or pre-feature local runs).
- Surface live run status from the in-memory tracker on /api/runs so
  the RunList can render a pulsing cyan dot for starting/running runs
  instead of a misleading red ✗ when pass_rate is still 0.
- Add a collapsible "Console Log" section in RunDetail that auto-hides
  when no log is available and live-streams while the run is active.

Closes #1240

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8defd6d
Status: ✅  Deploy successful!
Preview URL: https://98d82498.agentv.pages.dev
Branch Preview URL: https://feat-1240-run-logs-active-st.agentv.pages.dev

View logs

@christso christso marked this pull request as ready for review May 14, 2026 03:48
@christso christso merged commit 927c961 into main May 14, 2026
4 checks passed
@christso christso deleted the feat/1240-run-logs-active-status branch May 14, 2026 03:48
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.

feat(studio): save eval run logs and fix active run status icon

1 participant