fix(preprod): Return snapshot state as enum name string - #123264
Open
NicoHinderling wants to merge 1 commit into
Open
fix(preprod): Return snapshot state as enum name string#123264NicoHinderling wants to merge 1 commit into
NicoHinderling wants to merge 1 commit into
Conversation
The snapshot-details endpoint emitted the raw `ArtifactState` int (e.g. `1`), but the documented examples and the frontend `state: string` type both expect the enum name. Serialize `state` as `ArtifactState(...).name` (e.g. `"UPLOADED"`), matching the existing convention in `installable_builds.py` and aligning runtime with the OpenAPI contract. Regenerate the golden fixtures and update the endpoint test accordingly. Claude-Session: https://claude.ai/code/session_013SAxBGjuP4a7cxRx3WmZa4
trevor-e
approved these changes
Aug 31, 2026
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
Stacked on #123239. The snapshot-details GET response serialized
stateasthe raw
ArtifactStateint (e.g.1), even though the OpenAPI examples(
"state": "UPLOADED") and the frontendstate: stringtype both expect theenum name. Emit
ArtifactState(artifact.state).nameinstead, matching theexisting
installable_builds.pyconvention and aligning runtime with theschema.
Blast radius
stateasstringand never branches on it(state-based UI reads
comparison_state), so no frontend change is needed.runtime.
Testing
pytest .../test_preprod_artifact_snapshot.py(57 passed)make build-api-docs && pnpm run validate-api-examples→ No errors foundhttps://claude.ai/code/session_013SAxBGjuP4a7cxRx3WmZa4