Repository navigation
Conversation
Resolve shallow extra_body overrides before request content and question metadata capture. Preserve null/empty overrides, apply existing privacy filters to effective inputs, and verify sync/async SDK calls plus OTLP wire payloads. Co-Authored-By: Claude Code <noreply@anthropic.com>
This branch has not been deployed
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
Keep
traceAI-typesafeand correct request capture rather than delete useful decision tracing.extra_bodyoverrides before input capture, question counts/types and privacy filtering. Do not retain the replaced inputs or unrelated extra-body fields.TypeSafeInstrumentorAPI, one span per sync/async public call, caller arguments, responses and exceptions unchanged. No new dependencies or version bumps.The SDK 0.7.0 and 0.7.5 request builders call
body.update(extra_body)after constructing state/model/questions. The effective-state/questions approach also matches Braintrust's TypeSafe integration; this change additionally avoids falling back to an unused model for null overrides. No vendor implementation code was copied.Verification
All tests used synthetic data and ran under a macOS sandbox denying outbound network except localhost. Real TypeSafe SDK clients use
httpx2.MockTransport; real OTLP HTTP exporters send protobuf to a loopback collector. No vendor/model API or real credential was used.typesafe-sdk==0.7.0(floor)typesafe-sdk==0.7.5(current)The unchanged existing suite passed 41 tests on current SDK before the fix. New regressions cover sync/async clients, positional/keyword calls, shallow replacement, empty/null inputs, error-model attribution, caller-data preservation, both input-hiding flags, secret/PII redaction, and serialized OTLP attributes/content. All 32 new cases fail against baseline
d6a9966dd4d5d5fb344f7f5ab11b7483c2c2a6bc.Re-run with either SDK version in an isolated environment:
python -m pip install -e python/frameworks/typesafe 'typesafe-sdk==0.7.5' pytest pytest-asyncio python -m pytest python/frameworks/typesafe/tests -qDocumentation and rollout
Package README documents the corrected semantics. The site guide is already in flight in future-agi/docs#977; no duplicate docs PR was opened. A concise replacement draft is held for the package release because its effective-request statement needs this fix. Its exact Python example passed with both SDK versions against synthetic SDK and loopback OTLP transports; the MDX compiles. No live UI or vendor validation is claimed.
Release-please owns the next package version. No merge, tag or package publication is performed by this PR.
E2E coverage
not applicable (no e2e/ harness) · flows hit: n/a · marker: n/a · verdict: not applicable
Self-review: no blocking findings.
git diff --checkpasses; no Ruff configuration, database migration or frontend contract is changed.🤖 Generated with Claude Code