ci: Add opt-in Langfuse observability at the shared interface boundary - #55
ci: Add opt-in Langfuse observability at the shared interface boundary#55kennethbruskiewicz wants to merge 11 commits into
Conversation
# Conflicts: # tests/test_config.py
|
Live Langfuse conversational-turn acceptance passed (2026-09-02 16:54 UTC). Results read back from the Langfuse Observations API:
Published evidence: |
|
The screenshot clarified that acceptance means a real agent trace hierarchy with model metrics, not only synthetic tool observations. A real Codex turn was run against the TCT MCP server and read back from Langfuse:
Evidence and setup: The helper has been applied locally. Known upstream limitation: tracing plugin 0.1.0 sees Codex 0.152 MCP calls through the unified custom-tool wrapper and labels this child |
Summary
This PR adds optional Langfuse observability for TCT calls made through the CLI
and MCP interfaces without decorating individual core-library functions.
It now also:
Behavior
TCT_LANGFUSE_ENABLED=true.toolobservations namedtct.tool.<tool_name>.Per-turn benchmark
The checked-in
langfuse-turns-v1fixture makes no network requests and sendsnothing to Langfuse. For a representative turn querying seven identifiers:
Batching avoids six tool calls, 8,706 input bytes (84.8%), 8,928 total payload
bytes (81.5%), and 7,176 bytes of repeated provider metadata. A duplicate-call
scenario verifies that stable input hashes identify repeated calls within a turn.
These are TCT tool-boundary measurements. Model tokens and price remain owned by
the parent Langfuse generation; propagated trace context connects both views.
Regenerate the report with:
Installation
Documentation
TCT/interfaces/LANGFUSE.mdbenchmarks/LANGFUSE_TURN_BENCHMARKS.mdbenchmarks/langfuse_turns_baseline.jsonValidation