feat(weave): adopt weave-server-sdk and rewrite the stainless trace server against it#7163
Closed
andrewtruong wants to merge 1 commit into
Closed
feat(weave): adopt weave-server-sdk and rewrite the stainless trace server against it#7163andrewtruong wants to merge 1 commit into
andrewtruong wants to merge 1 commit into
Conversation
…erver against it Adds the published weave-server-sdk (0.0.1, temporarily resolved from test PyPI via a uv index pin) as a required dependency and rewrites StainlessRemoteHTTPTraceServer against it. The published SDK differs from the old git-pinned generation: a WeaveTrace client, flat resources, and methods that take pydantic request models. The binding keeps the tsi-typed TraceServerClientInterface surface and full behavior parity with RemoteHTTPTraceServer: - One injected httpx.Client (env-proxy default transport, ssl_verify/ http_timeout honored) shared by SDK and raw paths; a response event hook routes errors through handle_response_error so callers keep seeing httpx.HTTPStatusError / CallsCompleteModeRequired; a request hook injects X-Weave-Retry-Id per attempt. - Ports calls_complete v2 batching + eager v2 start/end (CallBatchProcessor) and the auto-upgrade path, which the old stainless binding lacked. - Raw _request escape hatches, each with a documented reason: endpoints excluded from the OpenAPI spec (calls_complete, eager v2, completions, project stats, TTL, feedback aggregate) and SDK 0.0.1 codegen bugs (shadowed duplicate method names, lost multipart body). - Streaming endpoints stay line-by-line streamed (the SDK buffers jsonl). - files_stats now hits /files/query_stats (the real route); the old RemoteHTTPTraceServer targeted /files/stats, which does not exist. Tests: rewrites the stainless behavior tests to mock at the httpx transport boundary (SpyTransport) so hooks, SDK encode/decode, and retry predicates are exercised for real; ports the remote-only calls_complete/eager coverage; and re-enables the dormant stainless CI shard in both test matrices.
HiveMind Sessions2 sessions · 3h 18m · $308
View all sessions in HiveMind → Run |
Collaborator
Author
This was referenced Jun 11, 2026
Closed
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Collaborator
Author
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Description
What does the PR do? Include a concise description of the PR contents.
Testing
How was this PR tested?