ref(seer): Type 10 issue/event/agent/PR seer RPC responses#117876
Merged
Conversation
Replaces the `dict[str, Any]` return annotations on the following seer RPC
methods with explicit Pydantic models so the seer-side SDK consumer sees
declared field shapes:
- `get_issue_details` → `IssueDetailsResponse | None`
- `get_event_details` → `EventDetailsResponse | None`
- `get_issue_and_event_details_v2` → `IssueAndEventDetailsResponse | None`
(single model whose issue-side fields use `exclude_unset` so they're
absent from the wire when `include_issue=False` or the group lookup
failed — matches the pre-typed conditional spread)
- `get_transactions_for_project` → `TransactionsForProjectResponse`
- `get_trace_for_transaction` → `TraceData | EmptyResponse`
- `get_profiles_for_trace` → `TraceProfiles | EmptyResponse`
- `get_issues_for_transaction` → `TransactionIssues | EmptyResponse`
(the four project-scoped RPC wrappers above already built the response
by calling `.dict()` on existing Pydantic models — just return them
directly and use `EmptyResponse` for the `{}` not-found case)
- `bulk_get_project_preferences` → `BulkProjectPreferencesResponse`
(bare `{project_id_str: pref_dict}` map via `__root__` passthrough)
- `record_pr_attribution` → `PrAttributionResponse`
- `update_pr_metrics` → `UpdatePrMetricsSuccessResponse | UpdatePrMetricsErrorResponse`
(discriminated by `success: Literal[True|False]`)
Wire-identical across all paths. The response models that need to be
read like dicts by seer or existing test sites carry a small `_DictProxyMixin`
(`__getitem__`/`__contains__`/`.get`) so the typed return doesn't force
a rewrite of every consumer in the same change.
gricha
approved these changes
Jun 17, 2026
The `dict()` override discarded its `**kwargs`, so options like `exclude_unset` from any future caller (or framework upgrade) would silently do nothing. Route through `super().dict(**kwargs)` and unwrap the `__root__` envelope so the bare-map wire shape stays the same.
billyvg
pushed a commit
that referenced
this pull request
Jun 17, 2026
Replaces the `dict[str, Any]` return annotations on the following seer
RPC methods with explicit Pydantic models so the seer-side SDK consumer
sees declared field shapes:
- `get_issue_details` → `IssueDetailsResponse | None`
- `get_event_details` → `EventDetailsResponse | None`
- `get_issue_and_event_details_v2` → `IssueAndEventDetailsResponse |
None` — single model whose issue-side fields use `exclude_unset` so
they're absent from the wire when `include_issue=False` or the group
lookup failed (matches the pre-typed conditional spread)
- `get_transactions_for_project` → `TransactionsForProjectResponse`
- `get_trace_for_transaction` → `TraceData | EmptyResponse`
- `get_profiles_for_trace` → `TraceProfiles | EmptyResponse`
- `get_issues_for_transaction` → `TransactionIssues | EmptyResponse` —
the four project-scoped RPC wrappers above already built the response by
calling `.dict()` on existing Pydantic models, so they just return the
model directly now and use `EmptyResponse` for the `{}` not-found case
- `bulk_get_project_preferences` → `BulkProjectPreferencesResponse` —
bare `{project_id_str: pref_dict}` map via `__root__` passthrough
- `record_pr_attribution` → `PrAttributionResponse`
- `update_pr_metrics` → `UpdatePrMetricsSuccessResponse |
UpdatePrMetricsErrorResponse` discriminated by `success:
Literal[True|False]`
Wire-identical across all paths. The response models that need to be
read like dicts by seer or existing test sites carry a small
`_DictProxyMixin` (`__getitem__`/`__contains__`/`.get`) so the typed
return doesn't force a rewrite of every consumer in the same change.
sehr-m
pushed a commit
that referenced
this pull request
Jun 23, 2026
Replaces the `dict[str, Any]` return annotations on the following seer
RPC methods with explicit Pydantic models so the seer-side SDK consumer
sees declared field shapes:
- `get_issue_details` → `IssueDetailsResponse | None`
- `get_event_details` → `EventDetailsResponse | None`
- `get_issue_and_event_details_v2` → `IssueAndEventDetailsResponse |
None` — single model whose issue-side fields use `exclude_unset` so
they're absent from the wire when `include_issue=False` or the group
lookup failed (matches the pre-typed conditional spread)
- `get_transactions_for_project` → `TransactionsForProjectResponse`
- `get_trace_for_transaction` → `TraceData | EmptyResponse`
- `get_profiles_for_trace` → `TraceProfiles | EmptyResponse`
- `get_issues_for_transaction` → `TransactionIssues | EmptyResponse` —
the four project-scoped RPC wrappers above already built the response by
calling `.dict()` on existing Pydantic models, so they just return the
model directly now and use `EmptyResponse` for the `{}` not-found case
- `bulk_get_project_preferences` → `BulkProjectPreferencesResponse` —
bare `{project_id_str: pref_dict}` map via `__root__` passthrough
- `record_pr_attribution` → `PrAttributionResponse`
- `update_pr_metrics` → `UpdatePrMetricsSuccessResponse |
UpdatePrMetricsErrorResponse` discriminated by `success:
Literal[True|False]`
Wire-identical across all paths. The response models that need to be
read like dicts by seer or existing test sites carry a small
`_DictProxyMixin` (`__getitem__`/`__contains__`/`.get`) so the typed
return doesn't force a rewrite of every consumer in the same change.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replaces the
dict[str, Any]return annotations on the following seer RPC methods with explicit Pydantic models so the seer-side SDK consumer sees declared field shapes:get_issue_details→IssueDetailsResponse | Noneget_event_details→EventDetailsResponse | Noneget_issue_and_event_details_v2→IssueAndEventDetailsResponse | None— single model whose issue-side fields useexclude_unsetso they're absent from the wire wheninclude_issue=Falseor the group lookup failed (matches the pre-typed conditional spread)get_transactions_for_project→TransactionsForProjectResponseget_trace_for_transaction→TraceData | EmptyResponseget_profiles_for_trace→TraceProfiles | EmptyResponseget_issues_for_transaction→TransactionIssues | EmptyResponse— the four project-scoped RPC wrappers above already built the response by calling.dict()on existing Pydantic models, so they just return the model directly now and useEmptyResponsefor the{}not-found casebulk_get_project_preferences→BulkProjectPreferencesResponse— bare{project_id_str: pref_dict}map via__root__passthroughrecord_pr_attribution→PrAttributionResponseupdate_pr_metrics→UpdatePrMetricsSuccessResponse | UpdatePrMetricsErrorResponsediscriminated bysuccess: Literal[True|False]Wire-identical across all paths. The response models that need to be read like dicts by seer or existing test sites carry a small
_DictProxyMixin(__getitem__/__contains__/.get) so the typed return doesn't force a rewrite of every consumer in the same change.