Repository navigation
test(harness): shared OTLP harness for TH-8103 contract tests - #203
Merged
Merged
Conversation
The Node OTLP exporter streams with Transfer-Encoding: chunked and sends no Content-Length. The Receiver read Content-Length only, so every Node export came back 400 with zero spans; two TH-8103 children had to put a de-chunking relay in front of it. Receiver now accepts both framings. It also records one entry per accepted export (path, lower-cased headers, flattened resource attributes) via requests(), so a contract test can assert X-Api-Key/X-Secret-Key and project_name through the shared harness instead of a private recorder. Verified: 6 harness tests pass, and the TanStack example's real Node exporter delivered 4 chunked exports (4 spans, collector path, both auth headers, project_name/project_type) with no relay. Refs: TH-8339, TH-8103
This was referenced Oct 4, 2026
Merged
Merged
Merged
This was referenced Oct 6, 2026
This was referenced Oct 7, 2026
nik13
added a commit
that referenced
this pull request
Oct 21, 2026
This branch carried an older copy of the shared OTLP test harness. The copy in #203 (and in every sibling integration PR) is a superset: it also accepts chunked request bodies and records request headers and resource attributes. Using the same bytes avoids an add/add conflict on python/tests/harness whichever of these PRs merges first. Harness tests: 6 passed; filter tests: 37 passed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
nik13
added a commit
that referenced
this pull request
Oct 26, 2026
Brings in #272 (fi-instrumentation-otel 1.2.0, error-detail hiding) and #203. Conflicts were only the version lines: this fix becomes 1.2.1, as planned in the PR notes for the case where #272 merges first. pyproject.toml, CHANGELOG.md and fi_instrumentation/instrumentation/version.py all read 1.2.1; the 1.2.1 entry sits above 1.2.0. 1.2.0 was never published (PyPI latest is 1.1.0), so the READMEs and the livekit test keep naming 1.1.0 as the last release with the mark. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
python/tests/harness/, providing the four functions the TH-8103 architecture requires:dev(fabaf0a8).devis behindmain(54421a67). That rebase is a separate PR and is not part of this one.Spec: https://github.com/future-agi/company-brain/pull/62 (commit
b2463134).Update at
3eaadc8: chunked bodies and request metadata@opentelemetry/otlp-exporter-base) sendsTransfer-Encoding: chunkedwith noContent-Length. The receiver read zero bytes and returned 400, so TypeScript children exported nothing to the harness._read_bodynow decodes both chunked andContent-Lengthbodies.Receiver.requests().clear()resets both stores. Children assert the collector contract against this record:/tracer/v1/traces,X-Api-Key/X-Secret-Key,project_name/project_type=observe. Per-package relays are no longer needed.test_receiver_accepts_the_collector_pathandtest_receiver_decodes_a_chunked_bodyboth failed before the fix.Used by #209 (Claude Agent SDK TS), #210 (AG2), #211 (AG2 Classic) and #212 (TanStack AI).
Tests
That run was against head
3eaadc8on 2026-10-04.--noconftestis required becausepython/tests/conftest.pyauto-importsfi_instrumentation, and the harness does not use that fixture.Video demo
Not applicable. This PR adds a test utility with no user-visible behavior. The narrated demo belongs to the integration PRs that use the harness (#209–#212).
Verification sweep (2026-10-12)
Merged
dev(2026-10-21,348ca50)The branch was 41 commits behind
devand CI had never run on it.devmerged in with no conflicts (merge commit348ca50). On the merge, Python 3.11:pytest tests --ignore-glob='tests/test_framework_*.py', which also collectstests/harness/with the shared conftest): 205 passed (dev's 199 plus these 6).