Test Model Target errors through vws-python-mock - #3171
Merged
Conversation
adamtheturtle
force-pushed
the
codex/issue-3169
branch
from
August 26, 2026 10:36
9587a4e to
66c5311
Compare
adamtheturtle
force-pushed
the
codex/issue-3169
branch
from
August 26, 2026 10:37
66c5311 to
70aab3e
Compare
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.
Closes #3169.
Updates the development dependency to
vws-python-mock 2026.8.26.1and exercises synchronous and asynchronous Model Target failures through the normal public HTTP paths. The tests cover authentication, JSON and non-JSON 4xx responses, rate limiting, and server errors while preserving response status and body.This removes the reachable
# pragma: no coverexclusions from the 429 and 5xx response mappings. It also updates existing Model Target tests to the current released mock contract for dataset archives, shared route visibility, and required view fields.Validation:
uv run --extra=dev coverage run -m pytest -q(413 passed)uv run --extra=dev coverage report(100% statements and branches)uv run --extra=dev prek run --all-filesuv run --extra=dev prek run --all-files --hook-stage manualNote
Low Risk
Test and dev-dependency updates plus coverage pragma removal; production error-handling logic is unchanged aside from making existing branches fully covered.
Overview
Bumps the dev dependency vws-python-mock to
2026.8.26.1and adds parameterized sync/async tests that drive datasetcreatefailures throughMockVWS(model_target_failure_response=...), asserting the right exceptions and preserved status/body for auth, generic 4xx (JSON and non-JSON), 429, and 5xx.Removes
# pragma: no coveron the rate-limit and server-error branches inraise_for_errorso those paths are counted in coverage. Replaces the custom invalid-bearer transport test with the mock-based error suite.Aligns existing lifecycle tests with the updated mock: downloaded archives are
MTDataset.dat/MTDataset.xml, standard and advanced routes share datasets by UUID, and some models pass explicitviews=[].Reviewed by Cursor Bugbot for commit 70aab3e. Bugbot is set up for automated code reviews on this repo. Configure here.