Skip to content

Validate JSON response shapes - #3212

Merged
adamtheturtle merged 1 commit into
mainfrom
validate-json-response-shapes
Sep 8, 2026
Merged

Validate JSON response shapes#3212
adamtheturtle merged 1 commit into
mainfrom
validate-json-response-shapes

Conversation

@adamtheturtle

@adamtheturtle adamtheturtle commented Sep 8, 2026

Copy link
Copy Markdown
Member

Repeated JSON response parsing left values as unknown to the type checker, so callers suppressed 21 real boundary-type errors.

This adds one runtime-validated JSON boundary for objects, strings, string lists, and object lists, and routes the sync and async VWS, query, VuMark, and exception paths through it. Malformed response shapes now fail clearly instead of being trusted through inline ignores.

Malformed payload coverage exercises the public VWS and CloudRecoService clients only; there are no direct tests of the private JSON helpers.

Validation:

  • uv run --group=dev pytest --cov-fail-under 100 --cov=src/ --cov=tests/ . -q (449 passed, 100% line and branch coverage)
  • uv run prek run --all-files
  • uv run prek run --all-files --hook-stage pre-push
  • uv run prek run --all-files --hook-stage manual

@adamtheturtle
adamtheturtle force-pushed the validate-json-response-shapes branch from 9ec08cb to 3c0fcad Compare September 8, 2026 20:38
@autofix-ci
autofix-ci Bot deployed to development September 8, 2026 20:39 Active
@adamtheturtle
adamtheturtle force-pushed the validate-json-response-shapes branch from a89f66f to a15e8c2 Compare September 8, 2026 20:44
@adamtheturtle
adamtheturtle force-pushed the validate-json-response-shapes branch from a15e8c2 to 17e32e1 Compare September 8, 2026 20:48
@adamtheturtle
adamtheturtle force-pushed the validate-json-response-shapes branch from 17e32e1 to 8945fa5 Compare September 8, 2026 21:05
@adamtheturtle
adamtheturtle force-pushed the validate-json-response-shapes branch from 8945fa5 to 82296d2 Compare September 8, 2026 21:47
@adamtheturtle
adamtheturtle merged commit c8094d2 into main Sep 8, 2026
13 checks passed
@adamtheturtle
adamtheturtle deleted the validate-json-response-shapes branch September 8, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant