Skip to content

More test-quarantine improvements#66158

Merged
wtgodbe merged 4 commits intomainfrom
wtgodbe/FixTODO-aw-refs
Apr 4, 2026
Merged

More test-quarantine improvements#66158
wtgodbe merged 4 commits intomainfrom
wtgodbe/FixTODO-aw-refs

Conversation

@wtgodbe
Copy link
Copy Markdown
Member

@wtgodbe wtgodbe commented Apr 4, 2026

Attempt to fix a couple more errors w/ the test-quarantine workflow:

  • Fix agent putting "TODO" in the quarantine issue URL field. Instead use placeholder values that the framework should replace programmatically after the agent runs
  • Be more explicit about telling the agent only to use main branch PR builds, and only to look at builds from merged PRs
  • Require full build links in PR descriptions, rather than just build numbers. Makes it easier to double check that the data sources were good

wtgodbe and others added 2 commits April 4, 2026 13:08
1. Use #aw_<temporary_id> references in [QuarantinedTest] URLs instead
   of placeholder text. The safeoutputs framework resolves these to real
   issue numbers when creating the PR.

2. Add explicit target-branch check (must be main) to Source B PR build
   filtering. Add stronger language requiring the agent to call
   pull_request_read for each PR to verify merge status and target
   branch, since the agent was skipping this check and including
   builds from open PRs targeting release branches.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 4, 2026 20:13
@wtgodbe wtgodbe requested a review from a team as a code owner April 4, 2026 20:13
@github-actions github-actions Bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Apr 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 agentic test-quarantine workflow guidance to reduce incorrect quarantine metadata (issue URL placeholders) and tighten the build-selection criteria, while refreshing generated lock workflows to newer gh-aw/AWF versions.

Changes:

  • Tightens “Merged PR failures” selection rules to require main-targeted, merged PRs verified via pull_request_read.
  • Switches quarantine issue URL guidance from ad-hoc placeholders to #aw_<temporary_id>-style deferred-resolution references.
  • Regenerates workflow lock files with gh-aw v0.66.1 / AWF v0.25.13 and related pinned assets.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/test-quarantine.md Refines agent instructions for selecting PR builds and referencing quarantine issues via deferred IDs.
.github/workflows/test-quarantine.lock.yml Regenerated lock workflow with updated gh-aw/AWF versions and minor environment/step updates.
.github/workflows/issue-triage-agent.lock.yml Regenerated lock workflow with updated gh-aw/AWF versions and minor environment/step updates.
.github/aw/actions-lock.json Adds the pinned sha entry for github/gh-aw-actions/setup@v0.66.1.

Comment thread .github/workflows/test-quarantine.md Outdated
Comment on lines 240 to 241
- **`[QuarantinedTest]` attributes must reference a real GitHub issue URL** with a numeric issue number (e.g., `https://github.com/dotnet/aspnetcore/issues/12345`). Never use placeholder strings, descriptive text, or non-numeric identifiers. Since issues are created via the `create_issue` safe-output tool (which uses deferred creation), use the `#aw_<temporary_id>` reference syntax in the URL — e.g., `[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/#aw_myid")]` where `myid` is the `temporary_id` you passed to `create_issue`. The framework will resolve `#aw_myid` to the actual issue number when creating the PR. **Never** use placeholder text like `TODO`, `TBD`, or descriptive strings — always use the `#aw_` temporary ID reference.
- **When checking the 30-day quarantine age**, verify that the `[QuarantinedTest]` attribute contains a valid numeric issue URL. If it contains a non-numeric placeholder, skip the test — it was quarantined incorrectly and should not be unquarantined until the issue URL is fixed.
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The rule says [QuarantinedTest] attributes must reference a numeric issue URL, but then immediately instructs using the non-numeric #aw_<temporary_id> placeholder. To avoid agents interpreting this as a contradiction, clarify that the final committed code must contain a numeric URL and that #aw_... is only an intermediate placeholder that the framework replaces before PR creation.

Suggested change
- **`[QuarantinedTest]` attributes must reference a real GitHub issue URL** with a numeric issue number (e.g., `https://github.com/dotnet/aspnetcore/issues/12345`). Never use placeholder strings, descriptive text, or non-numeric identifiers. Since issues are created via the `create_issue` safe-output tool (which uses deferred creation), use the `#aw_<temporary_id>` reference syntax in the URL — e.g., `[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/#aw_myid")]` where `myid` is the `temporary_id` you passed to `create_issue`. The framework will resolve `#aw_myid` to the actual issue number when creating the PR. **Never** use placeholder text like `TODO`, `TBD`, or descriptive strings — always use the `#aw_` temporary ID reference.
- **When checking the 30-day quarantine age**, verify that the `[QuarantinedTest]` attribute contains a valid numeric issue URL. If it contains a non-numeric placeholder, skip the test — it was quarantined incorrectly and should not be unquarantined until the issue URL is fixed.
- **`[QuarantinedTest]` attributes in final committed code must reference a real GitHub issue URL** with a numeric issue number (e.g., `https://github.com/dotnet/aspnetcore/issues/12345`). Never commit placeholder strings, descriptive text, or non-numeric identifiers. Since issues are created via the `create_issue` safe-output tool (which uses deferred creation), you may use the `#aw_<temporary_id>` reference syntax as an intermediate placeholder while preparing the change — e.g., `[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/#aw_myid")]` where `myid` is the `temporary_id` you passed to `create_issue`. The framework will resolve `#aw_myid` to the actual numeric issue number before creating the PR, so the final committed code must contain the numeric URL. **Never** use placeholder text like `TODO`, `TBD`, or descriptive strings.
- **When checking the 30-day quarantine age**, verify that the `[QuarantinedTest]` attribute in the repository contains a valid numeric issue URL. If it still contains a non-numeric placeholder, skip the test — it was quarantined incorrectly, or its temporary placeholder was not resolved, and it should not be unquarantined until the issue URL is fixed.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/test-quarantine.md Outdated
Comment on lines +319 to +321
- Adds `[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/#aw_{TEMPORARY_ID}")]` to the test method (or class), where `{TEMPORARY_ID}` is the `temporary_id` you used when calling `create_issue` in step 1. The framework will resolve `#aw_{TEMPORARY_ID}` to the actual numeric issue number when creating the PR. For example, if you called `create_issue(temporary_id: "aw_http2ign", ...)`, use `[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/#aw_http2ign")]`. **Never** use placeholder text like `TODO`, `TBD`, or descriptive strings.
- Adds `using Microsoft.AspNetCore.InternalTesting;` if not already present in the file
- References the issue in the PR body with `Associated issue: #{ISSUE_NUMBER}`. Do **not** use the word `Fixes` or `Closes` — quarantine PRs open tracking issues, they do not fix them, and GitHub would auto-close the issue when the PR merges.
- References the issue in the PR body with `Associated issue: #aw_{TEMPORARY_ID}` (using the same `temporary_id` from `create_issue`). Do **not** use the word `Fixes` or `Closes` — quarantine PRs open tracking issues, they do not fix them, and GitHub would auto-close the issue when the PR merges.
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The #aw_<temporary_id> syntax description is internally inconsistent with the example: it says to use #aw_{TEMPORARY_ID}, but the example uses create_issue(temporary_id: "aw_http2ign")#aw_http2ign (which only matches if the placeholder is #{temporary_id} or if temporary_id should not include the aw_ prefix). Please standardize the guidance (either require temporary_id values without the aw_ prefix, or change the placeholder format to reference the temporary_id verbatim).

Copilot uses AI. Check for mistakes.
…yntax

1. Clarify that #aw_<temporary_id> is an intermediate placeholder resolved
   by the framework before PR creation, not a contradiction with the
   numeric URL requirement.

2. Fix inconsistent syntax: temporary_id values already include the aw_
   prefix (e.g., 'aw_http2ign'), so the reference format is
   #{TEMPORARY_ID} (producing #aw_http2ign), not #aw_{TEMPORARY_ID}
   (which would produce #aw_aw_http2ign).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wtgodbe wtgodbe merged commit 0f3cfa5 into main Apr 4, 2026
9 of 10 checks passed
@wtgodbe wtgodbe deleted the wtgodbe/FixTODO-aw-refs branch April 4, 2026 21:39
@dotnet-policy-service dotnet-policy-service Bot added this to the 11.0-preview4 milestone Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants