Skip to content

Conversation

@bcsherma
Copy link
Member

@bcsherma bcsherma commented Jan 29, 2026

Summary

Adds a new view_spec_ref column to the call schema that will store a reference to a CallViewSpec object containing view configurations. This is a schema-only change that prepares for storing call views in a dedicated column instead of the summary blob.

Changes

  • Add view_spec_ref field to Call dataclass
  • Add view_spec_ref to trace server interface schemas (CallSchema, EndedCallSchemaForInsert, CompletedCallSchemaForInsert)
  • Add view_spec_ref to ClickHouse schema (CallEndCHInsertable, CallCompleteCHInsertable, CallSelectCHResult)
  • Add view_spec_ref to SQLite schema
  • Add view_spec_ref to ALLOWED_CALL_FIELDS in query builder
  • Add ClickHouse migration 024 to add the column to call_parts, calls_merged, calls_complete, and stats tables

@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@bcsherma bcsherma changed the base branch from fix/boolean-filter-saved-view to graphite-base/6008 January 29, 2026 01:19
@bcsherma bcsherma force-pushed the feat/view-spec-ref-schema branch from dc9c1d9 to e1075a7 Compare January 29, 2026 01:20
@bcsherma bcsherma changed the base branch from graphite-base/6008 to master January 29, 2026 01:20
@bcsherma bcsherma force-pushed the feat/view-spec-ref-schema branch 3 times, most recently from c64edba to 9e92d48 Compare January 29, 2026 02:30
Adds a new view_spec_ref column to the call schema that will store a reference
to a CallViewSpec object containing view configurations. This is a schema-only
change that prepares for storing call views in a dedicated column instead of
the summary blob.

Changes:
- Add view_spec_ref field to Call dataclass
- Add view_spec_ref to trace server interface schemas
- Add view_spec_ref to ClickHouse and SQLite schemas
- Add ClickHouse migration 024 to add the column
@bcsherma bcsherma force-pushed the feat/view-spec-ref-schema branch from 9e92d48 to 3487713 Compare January 29, 2026 03:35
@github-actions
Copy link
Contributor

❌ Documentation Reference Check Failed

No documentation reference found in the PR description. Please add either:

This check is required for all PRs that start with "feat(weave)" unless they explicitly state "docs are not required". Please update your PR description and this check will run again automatically.

ADD COLUMN view_spec_ref Nullable(String) DEFAULT NULL;

-- Add view_spec_ref to stats table
ALTER TABLE calls_merged_stats
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure we need this. worth thinking about


-- Add view_spec_ref to raw call parts table
ALTER TABLE call_parts
ADD COLUMN view_spec_ref Nullable(String) DEFAULT NULL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically Nullable columns are strictly worse than non-null columns. Given that we are storing a string, would you be amenable to considering using empty string as essentially None? There are reasons to say no here, but in general we should move toward that model.

argMaxState(display_name, call_parts.created_at) as display_name,
anySimpleState(coalesce(call_parts.started_at, call_parts.ended_at, call_parts.created_at)) as sortable_datetime,
anySimpleState(otel_dump) as otel_dump,
anySimpleState(view_spec_ref) as view_spec_ref
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we ever want to update this ref, we will need this to be an argmax

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if that even makes sense given this object, but just a thought.

@bcsherma
Copy link
Member Author

Consolidated into #6019

@bcsherma bcsherma closed this Jan 30, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 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.

3 participants