Skip to content

Use batch score delivery and refresh SDK documentation - #132

Merged
kxzk merged 8 commits into
mainfrom
fix/score-batch-delivery
Nov 11, 2026
Merged

kxzk merged 8 commits into
mainfrom
fix/score-batch-delivery

Conversation

@kxzk

@kxzk kxzk commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR

Send scores through the batch Scores API and align SDK documentation with implemented behavior.

Why

Keep score IDs and timestamps stable across retries. Confirm synchronous acceptance and discard validation rejections without resending accepted scores. Score delivery requires Langfuse Cloud or self-hosted v4.59.0 or later; older backends require SDK 0.12.4. Correct stale examples and consolidate repeated documentation.

Checklist

  • Has label
  • Has linked issue
  • Tests added for new behavior
  • Docs updated (if user-facing)

Verification

RSpec and RuboCop passed with 97.20% coverage. HTTP tests cover retries and concurrency. Live Cloud checks with CLI and browser readback verified score delivery and documented prompt, cache, trace, dataset, experiment, and metrics workflows. Documentation links and Ruby examples were checked.


Note

Low Risk
Mostly documentation and a comment change; behavior change is limited to clarified test setup guidance, with no production code path changes shown in the diff.

Overview
Replaces long-form SDK documentation with shorter, contract-focused guides and updates install/readme notes so score delivery is tied to Langfuse Cloud or self-hosted >= 4.59.0, with a link into the scoring compatibility section.

CONTRIBUTING.md, docs/API_REFERENCE.md, docs/ARCHITECTURE.md, docs/CACHING.md, docs/CONFIGURATION.md, and docs/DATASETS.md are heavily trimmed: fewer tutorials and duplicate examples, more tables of methods/options, explicit limits (cache invalidation, SWR, fork/reset lifecycle), and pointers to topic guides. docs/README.md is simplified into a task-to-guide index. Architecture and API reference now describe asynchronous scores as batch delivery via POST /api/public/scores, not ingestion-queue wording where that was updated.

docs/TESTING.md now tells tests to set tracing_enabled: true and sample_rate: 1.0 when using an in-memory span exporter, and to avoid relying on OTEL_SDK_DISABLED alone. The only runtime diff in this patch is a YARD comment on PendingScoreQueue#push (score “body” vs “ingestion event”).

Reviewed by Cursor Bugbot for commit 8bbc30a. Bugbot is set up for automated code reviews on this repo. Configure here.

@kxzk kxzk added the enhancement New feature or request label Nov 6, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0c2fbc7. Configure here.

Comment thread lib/langfuse/score_client.rb Resolved
@kxzk kxzk changed the title Send scores through the batch Scores API Use batch score delivery and refresh SDK documentation Nov 6, 2026
@kxzk
kxzk merged commit 144ba5f into main Nov 11, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant