fix(cicd): always include data key in flaky-tests search request body#151
Merged
platinummonkey merged 1 commit intomainfrom Mar 3, 2026
Merged
Conversation
When no --query is provided, the code sent an empty {} body that the API
rejected with 400 "document is missing required top-level members; must
have one of: data, meta, errors".
Fix by always constructing FlakyTestsSearchRequestData with the required
type field, adding the filter only when a query is supplied. The wasm32
path is fixed the same way.
Closes #150
Co-Authored-By: Claude Sonnet 4.6 (1M context) <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
When
pup cicd flaky-tests searchis run with no--query, the code sent an empty{}body that the API rejected with a 400 error. Fix by always constructing thedataobject with the required type field, adding the filter only when a query is supplied.Changes
src/commands/cicd.rs:477— restructuredflaky_tests_search(non-wasm32) to always buildFlakyTestsSearchRequestDatawithtype_set; filter is added only whenqueryisSomesrc/commands/cicd.rs:501— same fix for the wasm32 path usingserde_jsonTesting
cargo buildcompiles cleanlycargo clippy -- -D warningspasses with no warningscargo testpasses all 342 testsRelated Issues
Closes #150
🤖 Generated with Claude Code