发布

  • [NA] [BE] fix: classify thread online-scoring errors as processing_errors, resilient per thread id (#7299)

    frostbyte_neo 发布于 2026-07-01 13:27:05 +00:00

    The trace-thread scorers build their per-message chain from Flux.fromIterable(threadIds).flatMap(...),
    whereas the trace/span scorers build from a Mono. Flux.flatMap is onErrorContinue-aware, so the enclosing
    onErrorContinue in BaseRedisSubscriber.setupStreamListener reached into the scorer's flatMap, dropped the
    failing element and recorded the failure as *_unexpected_errors_total — bypassing processMessage's
    per-message onErrorResume. Client/config errors (BadRequestException, ClientErrorException) on the thread
    streams were therefore counted as "unexpected", while the same errors on the trace/span streams are
    correctly counted as processing_errors.

    Score each thread id independently and materialize per-thread errors (onErrorResume) so a single thread's
    failure no longer stops scoring the sibling thread ids in the same message. After the batch, re-surface
    the first failure on the Mono error path so the message is still handled by processMessage's onErrorResume
    — classified as a processing error and following the normal retryable/non-retryable path — consistent
    with the trace/span scorers. Applied to both OnlineScoringTraceThreadLlmAsJudgeScorer and
    OnlineScoringTraceThreadUserDefinedMetricPythonScorer.

    Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com

    下载附件