Skip to content

feat(weave): dataset_sources provenance endpoints#7199

Draft
jwlee64 wants to merge 1 commit into
josiah/dataset-sources-migrationfrom
josiah/dataset-sources-endpoints
Draft

feat(weave): dataset_sources provenance endpoints#7199
jwlee64 wants to merge 1 commit into
josiah/dataset-sources-migrationfrom
josiah/dataset-sources-endpoints

Conversation

@jwlee64

@jwlee64 jwlee64 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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?

Four endpoints over the dataset_sources table (migration 034):
- dataset_sources_link: batch idempotent write; validates source
  existence (calls via calls_merged, spans via the agents module);
  deterministic UUIDv5 link ids over the logical key; optional
  include_created_status (skips the pre-insert lookup when False)
- dataset_sources_link_delete: soft delete via tombstone versions;
  fail-fast on unknown ids; per-id deleted flags
- dataset_sources_query: forward lookup (dataset -> sources), prefix
  scan + argMax collapse, HAVING on collapsed deleted_at
- source_datasets_query: reverse lookup (sources -> datasets),
  bloom-assisted, server-side aggregation with capped row_digests

ClickHouse impl is insert-only (no mutations); SQLite impl uses
logical-key upserts and supports call sources (spans are
ClickHouse-only). Nullable columns tuple-wrapped in argMax to avoid
ClickHouse NULL-skipping; aggregate args table-qualified to avoid
alias shadowing.

Tested on both backends: 27 passed (ClickHouse), 25 passed + 2
expected span skips (SQLite).

jwlee64 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

@wandbot-3000

wandbot-3000 Bot commented Jun 11, 2026

Copy link
Copy Markdown

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.

1 participant