test(test-selection): pin the degradation on a selection we predate - #122
Merged
Conversation
The engine is gaining a third answer on the test-selection endpoint -- `selection: "empty"`, meaning "run no test, the predecessor already ran them and they passed" (Mergifyio/monorepo#39373). Every published client predates it, and each degrades correctly today only by accident of three unpinned facts: the decoder types `selection` as a free `String`, `test_selection_dict` always sets the `tests` key, and `TestSelection.__post_init__` normalises anything that is not a non-empty `subset` back to a full run. Tighten `selection` into a closed enum for hygiene -- the obvious next edit -- and every already-shipped client stops decoding any answer the server invents. Pin the two ends of that property: decoding an `empty` payload in mergify-ci-api, and normalising an unrecognised selection to "run everything" rather than "run nothing" in the plugin. Both were verified to fail under the edit they guard against. The marshalling comment claiming a missing `tests` means a `full` answer is corrected -- it holds for any answer carrying no subset. pytest only: vitest and playwright share the decoder but normalise in their own TypeScript, and the pilot does not enable them. Related to MRGFY-8931 Change-Id: Ifccfcfb1a7a205b6985329744da4aed644b61ddb
Merge Protections🟢 All 6 merge protections satisfied — ready to merge. Show 6 satisfied protections🟢 🤖 Continuous Integration
🟢 👀 Review Requirements
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 Reviews
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
jd
approved these changes
Aug 28, 2026
sileht
approved these changes
Aug 31, 2026
Merge Queue Status
This pull request spent 3 minutes 58 seconds in the queue, including 3 minutes 1 second running CI. Required conditions to merge
|
36 tasks
mergify
Bot
deleted the
devs/alexandregaubert/devs/alexandregaubert/pin-unknown-test-selection-forward-compat/pin-degradation-selection-we-predate--fccfcfb1
branch
August 31, 2026 12:38
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.
The engine is gaining a third answer on the test-selection endpoint --
selection: "empty", meaning "run no test, the predecessor already ranthem and they passed" (Mergifyio/monorepo#39373). Every published client
predates it, and each degrades correctly today only by accident of three
unpinned facts: the decoder types
selectionas a freeString,test_selection_dictalways sets thetestskey, andTestSelection.__post_init__normalises anything that is not a non-emptysubsetback to a full run. Tightenselectioninto a closed enum forhygiene -- the obvious next edit -- and every already-shipped client stops
decoding any answer the server invents.
Pin the two ends of that property: decoding an
emptypayload inmergify-ci-api, and normalising an unrecognised selection to "run
everything" rather than "run nothing" in the plugin. Both were verified to
fail under the edit they guard against. The marshalling comment claiming a
missing
testsmeans afullanswer is corrected -- it holds for anyanswer carrying no subset.
pytest only: vitest and playwright share the decoder but normalise in
their own TypeScript, and the pilot does not enable them.
Related to MRGFY-8931