Skip to content

Require re-quarantine actions to always get their own dedicated PR - #67467

Merged
wtgodbe merged 1 commit into
dotnet:mainfrom
wtgodbe:quarantine-requarantine-separate-pr
Jun 29, 2026
Merged

wtgodbe merged 1 commit into
dotnet:mainfrom
wtgodbe:quarantine-requarantine-separate-pr

Conversation

@wtgodbe

@wtgodbe wtgodbe commented Jun 29, 2026

Copy link
Copy Markdown
Member

Problem

The test-quarantine workflow can bundle a new quarantine (Case A) together with a re-quarantine (Case B) in a single PR. This happened in #67459, which quarantined CanDelegateOutOfProcess (new) alongside re-quarantining RestartAppShouldNotAffectOtherApps.

Because the re-quarantine label is applied to the entire PR, and the unquarantine-exclusion check permanently bars every test whose [QuarantinedTest] attribute is added in a PR carrying that label (or with "Re-quarantine" in the title), the newly-quarantined Case A test (CanDelegateOutOfProcess) would never be auto-unquarantined.

Fix

Tighten the workflow prompt (.github/workflows/test-quarantine.md) so that:

  • A "related group" for quarantining may only contain tests that share the same single tracking issue and the same case — never a mix of Case A and Case B.
  • Re-quarantine (Case B) actions always get their own dedicated PR. Never combined with a Case A quarantine, an unquarantine, or a re-quarantine for a different issue.
  • The re-quarantine label is only ever applied to a PR whose every change is a Case B re-quarantine reusing the same single issue.
  • The same constraint is reinforced in the Case B execution step where the PR is created.

Notes

  • Prose-only change to the workflow body. The prompt body is runtime-imported by test-quarantine.lock.yml ({{#runtime-import .github/workflows/test-quarantine.md}}), so no recompile of the lock file is required and none is included.

The test-quarantine workflow bundled a new (Case A) quarantine together with
a re-quarantine (Case B) in a single PR (e.g. dotnet#67459, which
quarantined CanDelegateOutOfProcess alongside re-quarantining
RestartAppShouldNotAffectOtherApps). Because the `re-quarantine` label is
applied to the whole PR, and the unquarantine-exclusion check permanently bars
every test whose [QuarantinedTest] attribute is added in a PR carrying that
label, the newly-quarantined Case A test would never be auto-unquarantined.

Tighten the prompt so re-quarantines always get a dedicated PR and the
`re-quarantine` label is only ever applied to a PR whose every change is a
Case B re-quarantine for a single issue.

Prompt body is runtime-imported by test-quarantine.lock.yml, so no recompile
of the lock file is required for this prose-only change.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings June 29, 2026 16:13
@wtgodbe
wtgodbe requested a review from a team as a code owner June 29, 2026 16:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Test Quarantine agent workflow prompt to prevent mixing re-quarantine (Case B) actions with other quarantine/unquarantine changes in a single PR, avoiding unintended permanent exclusion of newly quarantined tests from future automated unquarantining.

Changes:

  • Tightens the “related group” definition so grouped quarantines must share the same single tracking issue and the same case (all Case A or all Case B for the same issue).
  • Adds an explicit rule that every re-quarantine (Case B) must be done in its own dedicated PR, and restricts use of the re-quarantine label accordingly.
  • Reinforces the same constraint in the Case B execution instructions where the PR is created.

@wtgodbe
wtgodbe merged commit a6732b4 into dotnet:main Jun 29, 2026
12 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants