Skip to content

test(test-selection): pin the degradation on a selection we predate - #122

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/alexandregaubert/devs/alexandregaubert/pin-unknown-test-selection-forward-compat/pin-degradation-selection-we-predate--fccfcfb1
Aug 31, 2026
Merged

test(test-selection): pin the degradation on a selection we predate#122
mergify[bot] merged 1 commit into
mainfrom
devs/alexandregaubert/devs/alexandregaubert/pin-unknown-test-selection-forward-compat/pin-degradation-selection-we-predate--fccfcfb1

Conversation

@AlexandreGaubert

Copy link
Copy Markdown
Contributor

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

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
@mergify
mergify Bot deployed to Mergify Merge Protections August 28, 2026 08:08 Active
@mergify

mergify Bot commented Aug 28, 2026

Copy link
Copy Markdown

Merge Protections

🟢 All 6 merge protections satisfied — ready to merge.

Show 6 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success=ci-gate

🟢 👀 Review Requirements

  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|internal|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?!?:

🟢 🔎 Reviews

  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

@mergify
mergify Bot requested a review from a team August 28, 2026 08:10
@mergify
mergify Bot requested a review from a team August 28, 2026 12:47
@mergify

mergify Bot commented Aug 31, 2026

Copy link
Copy Markdown

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

@mergify mergify Bot mentioned this pull request Aug 31, 2026
36 tasks
@mergify mergify Bot added the queued label Aug 31, 2026
@mergify
mergify Bot merged commit 96b124c into main Aug 31, 2026
22 checks passed
@mergify
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
@mergify mergify Bot removed the queued label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants