Skip to content

ref(api): tighten 2 more Goal #1 endpoint methods#117144

Merged
azulus merged 1 commit into
masterfrom
jeremy/tighten-release-file-details
Jun 9, 2026
Merged

ref(api): tighten 2 more Goal #1 endpoint methods#117144
azulus merged 1 commit into
masterfrom
jeremy/tighten-release-file-details

Conversation

@azulus

@azulus azulus commented Jun 8, 2026

Copy link
Copy Markdown
Member

Two more Goal #1 method tightenings.

  • group_event_details.get() → 3-arm union: Response[GroupEventDetailsResponse] | Response[EventSerializerResponse] | Response[DetailResponse]. The stacktraceOnly query-param path returns a stripped event shape (EventSerializerResponse) via the typed-variable trick — EventSerializer is denylisted, so serialize() flows Any and we pin the local to the typed shape. Normal path returns GroupEventDetailsResponse from wrap_event_response. Multiple error paths return DetailResponse; the shared error_response literal is pinned as DetailResponse so mypy reads it correctly.
  • preprod_artifact_snapshot.post()Response[SnapshotCreateResponseDict] | Response[DetailResponse]. The success-path dict literal already matches the TypedDict; many validation paths emit {"detail": ...}.

Branch name is stale — started by probing release_file_details endpoints but those have FileResponse paths I didn't want to touch in this PR.

- group_event_details.get(): 3-arm union. The stacktraceOnly query-param
  path returns EventSerializerResponse (EventSerializer denylist) via
  typed-variable; the normal path returns GroupEventDetailsResponse from
  wrap_event_response; multiple error paths return DetailResponse. Pin
  the `error_response` literal as DetailResponse so mypy reads it
  correctly.

- preprod_artifact_snapshot.post(): tighten to
  Response[SnapshotCreateResponseDict] | Response[DetailResponse]. The
  success-path dict literal already matches the TypedDict; many
  validation paths emit {"detail": ...}.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 8, 2026
@azulus azulus marked this pull request as ready for review June 8, 2026 23:33
@azulus azulus requested review from a team as code owners June 8, 2026 23:33
@azulus azulus merged commit a0c427a into master Jun 9, 2026
65 checks passed
@azulus azulus deleted the jeremy/tighten-release-file-details branch June 9, 2026 00:30
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.

2 participants