Skip to content

feat(api): tighten Response[T] on 14 endpoints (typed cohort)#116800

Merged
azulus merged 1 commit into
masterfrom
jeremy/response-annotation-sweep
Jun 3, 2026
Merged

feat(api): tighten Response[T] on 14 endpoints (typed cohort)#116800
azulus merged 1 commit into
masterfrom
jeremy/response-annotation-sweep

Conversation

@azulus
Copy link
Copy Markdown
Member

@azulus azulus commented Jun 3, 2026

Tighten 14 endpoints from -> Response to -> Response[T]. Source-typing only — no cast(), no behavior change.

Three patterns: annotation-only where the body already matches the declared T; Response[T] | Response[ValidationErrorResponse] with the as_validation_errors() helper for endpoints whose 400 path returns serializer.errors; one missing Serializer[T] subscript on ExternalActorSerializer to unlock typed-overload resolution.

Round 5 of the rollout — same shape as #116717 / #116736 / #116743.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 3, 2026
@azulus azulus force-pushed the jeremy/response-annotation-sweep branch from 59caf07 to 2c9210f Compare June 3, 2026 19:08
@azulus azulus marked this pull request as ready for review June 3, 2026 19:09
@azulus azulus requested review from a team as code owners June 3, 2026 19:09
Copy link
Copy Markdown
Member

@JoshFerge JoshFerge left a comment

Choose a reason for hiding this comment

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

🎉

Three patterns, source-typing only — no cast(), no behavior change:
annotation-only where the body matched the declared T; union with
ValidationErrorResponse + as_validation_errors() for the
`Response(serializer.errors, 400)` path; one Serializer[T] subscript on
ExternalActorSerializer to unlock typed-overload resolution.

Round 5 of the rollout — same shape as #116717 / #116736 / #116743.
@azulus azulus force-pushed the jeremy/response-annotation-sweep branch from 2c9210f to cc1f5ca Compare June 3, 2026 20:27
@azulus
Copy link
Copy Markdown
Member Author

azulus commented Jun 3, 2026

codeql issue is unrelated

@azulus azulus merged commit 33f64c4 into master Jun 3, 2026
65 of 66 checks passed
@azulus azulus deleted the jeremy/response-annotation-sweep branch June 3, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants