Skip to content

chore(weave): move builtin object schemas to weave/shared#7166

Closed
andrewtruong wants to merge 1 commit into
andrew/sdk-03-shared-leavesfrom
andrew/sdk-04-builtin-objects-shared
Closed

chore(weave): move builtin object schemas to weave/shared#7166
andrewtruong wants to merge 1 commit into
andrew/sdk-03-shared-leavesfrom
andrew/sdk-04-builtin-objects-shared

Conversation

@andrewtruong

Copy link
Copy Markdown
Collaborator

Description

  • Fixes WB-NNNNN
  • Fixes #NNNN

What does the PR do? Include a concise description of the PR contents.

Testing

How was this PR tested?

The builtin object classes (Leaderboard, SavedView, AnnotationSpec, Provider,
LLMStructuredCompletionModel, ...) are pydantic schemas shared by the client
(which re-exports and subclasses them) and the trace server (which validates
against them). Move the package out of weave/trace_server/interface into
weave/shared so client code can stop importing weave.trace_server:

- weave/trace_server/interface/builtin_object_classes/** ->
  weave/shared/builtin_object_classes/** (including generated/ schemas json)
- weave/trace_server/helpers/url_safety.py -> weave/shared/url_safety.py
  (imported by the provider schema; also used by server image_completion)

Old import paths keep working via shims; the shims pair a star re-export
(for static analyzers) with a PEP 562 module __getattr__ fallback so names a
module's __all__ hides (e.g. TestOnlyNestedBaseModel) still resolve. The
schema generation script and dev docs now point at the new location; the
generated json is byte-identical after regeneration. Server-side imports are
left on the shims on purpose.

andrewtruong commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

@andrewtruong

Copy link
Copy Markdown
Collaborator Author

Superseded by the restructured stack #7177 + #7178 (RemoteHTTPTraceServer rebuilt in place on weave-server-sdk; no shared-code moves; no test-side type bridge; incremental import lint).

@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant