Skip to content

fix(observe): bound eval flush waits so a down daemon never slows a case - #717

Merged
LinuxDevil merged 3 commits into
mainfrom
obs/o1-eval-span-flush
Oct 24, 2026
Merged

LinuxDevil merged 3 commits into
mainfrom
obs/o1-eval-span-flush

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

lousho eval --observe wrote score rows whose trace_id pointed at a trace that never reached the daemon (seen live: the trace returned 404 and Agent Forge's score → trace link dead-ended), because the eval span sat in a batched reporter that was never flushed before the vitest worker exited. Each case now flushes its span before posting scores, with both waits capped at 1 s and skipped after the daemon proves unresponsive, so a down daemon never slows or fails a case. Adds a public ObserveReporter.flush().

Ticket: O1 (Forge Observe vs LangSmith evaluation follow-up)

Changes

  • fix(observe): bound eval flush waits so a down daemon never slows a case
  • chore(api): regenerate traces.api.md for ObserveReporter.flush
  • fix(observe): flush eval spans so score rows link to a real trace

Verification: focused vitest, tsc --noEmit, eslint on changed files (details in the review package); full suite and fallow run in CI.

🤖 Generated with Claude Code

LinuxDevil and others added 3 commits October 24, 2026 18:55
The eval span went to a batched reporter that was never flushed before the
vitest worker exited, so score rows pointed at a trace the daemon never saw.
Add ObserveReporter.flush(), await it after the eval span settles, and make
emit() return its promise so spans land before scores.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cap the per-case span flush and score POST at 1s, and skip both for the rest of
the run once the collector stops answering. Flush in a finally that also covers
a synchronous throw from withSpan. Document the behaviour in docs/evals.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@LinuxDevil
LinuxDevil merged commit 9bf576c into main Oct 24, 2026
2 checks passed
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.

1 participant