Skip to content

fix(seer): validate autofix API responses - #1627

Merged
betegon merged 1 commit into
mainfrom
bt/seer-response-validation
Sep 23, 2026
Merged

betegon merged 1 commit into
mainfrom
bt/seer-response-validation

Conversation

@betegon

@betegon betegon commented Sep 23, 2026

Copy link
Copy Markdown
Member

Summary

Malformed Seer autofix responses can cause a TypeError when the CLI reads the response or normalizes its status. Validate responses with the existing AutofixResponseSchema so these failures produce an ApiError at the API boundary.

Existing autofix: null responses and passthrough blocks/artifacts are preserved. This does not add validation of block contents.

Test plan

  • Three regression cases cover a null response and missing/non-string status. All three fail against the original implementation and pass with the fix.
  • Compatibility assertion verifies that blocks and artifacts survive validation.
  • pnpm exec vitest run test/lib/api-client.seer.test.ts test/types/seer.test.ts — 60 tests passed.
  • Biome checks on the two changed files — passed.
  • git diff --check — passed.
  • No live Seer request was run locally.

@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Sep 23, 2026 2:41pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Sep 23, 2026 2:41pm UTC

Request Review

@betegon
betegon marked this pull request as ready for review September 23, 2026 14:42
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Sep 23, 2026
@betegon
betegon merged commit 97d5486 into main Sep 23, 2026
36 checks passed
@betegon
betegon deleted the bt/seer-response-validation branch September 23, 2026 15:02

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 17382431 Deployed Sep 23, 2026 by vercel[bot]
Preview – sentry-local — 17382431 Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant