Skip to content

fix(weave): preserve user IDs in object creation - #7650

Open
gtarpenning wants to merge 2 commits into
masterfrom
griffin/fix-rest-object-user-id
Open

fix(weave): preserve user IDs in object creation#7650
gtarpenning wants to merge 2 commits into
masterfrom
griffin/fix-rest-object-user-id

Conversation

@gtarpenning

@gtarpenning gtarpenning commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

  • preserve the authenticated wb_user_id across op, dataset, scorer, and evaluation creation
  • propagate the ID to scorer and evaluation child ops
  • convert the external user ID at the adapter boundary before ClickHouse persistence
  • keep the in-memory trace server aligned with the production backend

Before / after

Before, a DatasetCreateReq carrying wb_user_id reached the backend helper, but the generated ObjSchemaForInsert hardcoded the field to None. The same happened for ops, scorers, and evaluations, while generated scorer/evaluation ops omitted the field entirely.

After, the adapter converts the external ID to its internal representation once and every object version emitted by these four creation paths stores that ID in both ClickHouse and the in-memory test backend.

Testing

  • focused object-creation test against ClickHouse (passed)
  • focused object-creation test plus the four existing no-ID create tests with --trace-server=fake (5 passed)
  • uvx ruff check on all changed files
  • uvx ruff format --check on all changed files
  • pre-push hooks: ty, import-linter, pyright, mypy, Fixit, Ruff

Scope

This intentionally does not add global non-null assertions, change worker payload contracts, or backfill historical rows.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@gtarpenning
gtarpenning marked this pull request as ready for review July 28, 2026 22:02
@gtarpenning
gtarpenning requested a review from a team as a code owner July 28, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants