fix: [AI-7675] accept reused/unknown run statuses in run_results v1-v5 parsers#108
Merged
Merged
Conversation
…-v5 parsers Mirror of the v6 `Status` shim (AI-7435, PR #106) for the pre-v6 schemas, closing the residual of AI-7675 finding #2: any run status outside `success`/`error`/`skipped` (e.g. dbt 2.0 `reused`, or any future status) raised a `ValidationError` in run_results v1-v5 and the ingestion worker silently dropped the entire `run_results.json`. - Make `Status` a `str, Enum`, add `reused`, and add the `_missing_` forward-compat fallback so unknown statuses surface as real members instead of failing validation (identical to the v6 fix). - Reorder `RunResultOutput.status` to `Union[Status1, Status2, Status]` so test/freshness statuses (`pass`/`fail`/`warn`/`runtime error`) keep resolving via the strict enums and the permissive run `Status` is tried last (same reordering as v6). - Add parameterized regression tests over v1-v5 mirroring `test_run_results_v6.py`, including full-file `parse_run_results`. Freshness-specific enums (`Status3`/`Status4` in v3/v4) are untouched, matching the v6 fix scope. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (6 files)
The Reviewed by glm-5.2 · Input: 35.7K · Output: 8.4K · Cached: 432.3K |
mdesmet
approved these changes
Jul 22, 2026
Sourabhchrs93
added a commit
that referenced
this pull request
Jul 22, 2026
…#110) `tests/test_vendor/test_run_results_pre_v6.py` (PR #108) was not formatted to the repo's `black` line-length (140), which fails the `pre-commit` gate inside `release.sh`/`tox` and blocked the v0.3.4 PyPI publish in the tag-release workflow. Formatting-only change; tests unchanged semantically (36 pass). This PR carries the `version-bump` label so its merge re-triggers tag-release and publishes 0.3.4 (the previous unpublished v0.3.4 tag is deleted so the workflow can recreate it at this commit). Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Closes the residual of AI-7675 finding #2: the
reused-status shim shipped for run_results v6 in 0.3.2 (AI-7435, PR #106) was never applied to v1–v5. Any run status outsidesuccess/error/skippedstill raises aValidationErroron those schema versions, and the backend ingestion worker silently drops the entirerun_results.json(batch stays green — same silent-drop failure mode as AI-7435/AI-7856).Changes
Exact mirror of the v6 fix, applied to
run_results_v{1..5}.py:Statusbecomesstr, Enum, gainsreused, and gains the_missing_forward-compat fallback — unknown future dbt statuses parse as real members instead of failing validation.RunResultOutput.statusunion reordered toUnion[Status1, Status2, Status]so test/freshness statuses (pass/fail/warn/runtime error) keep resolving via the strict enums; the permissive runStatusis tried last.Status3/Status4in v3/v4) untouched — matching the v6 fix scope.Tests
New
tests/test_vendor/test_run_results_pre_v6.py, parameterized over v1–v5, mirroringtest_run_results_v6.py:Also verified against a real sunrun v4 production artifact (
run_498571806from S3): parses toRunResultsV4with all results intact. Adjacent consumers (tests/clients/altimate/test_utils.py,tests/core/platform/dbt/test_artifact_loaders.py) pass.ruffclean on the new test; zero new violations in the generated vendor files (pre-existing UP007 counts unchanged).Scope notes
🤖 Generated with Claude Code