Skip to content

Add trusted fast path for extension release PRs - #19608

Merged
Adam Ratzman (adamint) merged 11 commits into
microsoft:mainfrom
SankeerthNara:reduce-extension-release-ci-friction
Aug 25, 2026
Merged

Adam Ratzman (adamint) merged 11 commits into
microsoft:mainfrom
SankeerthNara:reduce-extension-release-ci-friction

Conversation

@SankeerthNara

@SankeerthNara Sankeerth Nara (SankeerthNara) commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds a fail-closed fast path for trusted VS Code extension release PRs.

  • Classifies only same-repository aspire-repo-bot[bot] PRs targeting main from extension-release/v* branches.
  • Validates the patch from the trusted base workflow: exactly extension/package.json and extension/CHANGELOG.md, a version-only package update, and one matching changelog entry that preserves prior notes.
  • Runs only the Windows extension unit tests for trusted release PRs. Test selection, builds, packaging, CLI archives, E2E, stabilization, and result aggregation remain skipped while the existing Final Results context still gates the PR.
  • Falls back to normal CI if trusted classifier checkout or execution fails.
  • Keeps native Copilot review and teaches the repository review skill to ignore the temporary extension-release changelog placeholder. Generic API review is limited to stable ATS breaks; the dedicated api-review skill continues to cover C# API design and compatibility.
  • Adds production-shaped Infrastructure.Tests coverage for the trust boundary, patch validation, workflow routing, fallback behavior, permissions, and release-only test graph.

Normal PR and push behavior is unchanged.

Fixes #19581

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
          • The trust boundary is fail-closed and covered by focused behavior tests, but this has not had a formal security sign-off.
    • No

Adds a dedicated fast path for the bot-authored VS Code extension
release PR so it no longer goes through full Copilot review and CI.

- .github/actions/is-trusted-extension-release-pr: shared predicate
  (base=main, same-repo head, aspire-repo-bot[bot] author,
  extension-release/* head branch)
- .github/workflows/copilot-review-dispatch.yml: pull_request_target
  workflow that requests Copilot review for every PR except the
  trusted release PR
- .github/workflows/extension-unit-tests-reusable.yml: extracted
  Windows extension unit-test steps, shared by normal CI and the
  fast path
- .github/workflows/ci.yml: classifies the trusted release PR once
  in prepare_for_ci, adds extension_release_unit_tests fast-path job,
  skips tests/stabilization_check on that path, updates Final Results
- .github/workflows/tests.yml: extension_tests_win now calls the
  shared reusable workflow

Requires a follow-up manual step: remove copilot_code_review from
ruleset 3659502 on microsoft/aspire (repo admin only).

Addresses microsoft#19581
Copilot AI balanced review requested due to automatic review settings August 23, 2026 06:54
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19608

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19608"

@github-actions github-actions Bot added the area-engineering-systems infrastructure helix infra engineering repo stuff label Aug 23, 2026

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

Adds a trusted fast path for bot-authored VS Code extension release PRs.

Changes:

  • Adds shared release-PR classification and Copilot review dispatch.
  • Routes trusted releases to extension unit tests only.
  • Extracts extension tests into a reusable workflow.

Reviewed changes

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

Show a summary per file
File Description
.github/actions/is-trusted-extension-release-pr/action.yml Defines the trust predicate.
.github/workflows/copilot-review-dispatch.yml Dispatches Copilot reviews for ordinary PRs.
.github/workflows/ci.yml Adds fast-path CI routing and result aggregation.
.github/workflows/extension-unit-tests-reusable.yml Provides reusable Windows extension tests.
.github/workflows/tests.yml Calls reusable extension tests and changes CLI validation jobs.

Comment thread .github/workflows/tests.yml Resolved
Comment thread .github/workflows/tests.yml Resolved
Comment thread .github/workflows/tests.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@ellahathaway Ella Hathaway (ellahathaway) 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.

The PR follows the design proposed in #19581, but I don't think that a narrow extension-release exception should not replace native Copilot review with a pull_request_target dispatcher for every PR. That creates a repository-wide write-capable failure point, requires an out-of-band ruleset change, and the new pull_request_target workflow does not run from this PR branch, so the behavior being used to replace the native rule is not exercised by this PR's checks.

I would scope this PR to the CI fast path and leave the native Copilot rule in place. If suppressing Copilot review remains mandatory, we should solve that separately at the policy/identity layer rather than reimplementing automatic review in Actions.

The trusted predicate also needs hardening. PR author is fixed when the PR is created and does not identify who pushes later commits. The predicate does not validate the patch, so any later commit that reaches a bot-created release branch continues to match regardless of who pushed it or what it contains. Before allowing the fast path, we need restrictions on who can update these branches plus validation of the expected content—not only filenames, since package.json can change scripts and dependencies.

Please also:

  • Remove the unrelated cli_starter_validation_* rewrite; it references a workflow that is not included and changes normal PR routing.
  • Prefer a release-only mode in the existing tests.yml/extension_tests_win path, with packaging disabled, rather than adding another workflow.
  • Preserve or update the existing Infrastructure.Tests contracts for extension packaging and selective CI.
  • Add behavior tests for trusted and untrusted cases, fallback behavior, patch validation, and Final Results.
  • Make Final Results enforce mutually exclusive graphs: the trusted path must skip normal tests/stabilization, while the normal path must skip the fast-path job.

This is blocking for me in its current form.

@adamint Adam Ratzman (adamint) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the copilot 'rule' to avoid commenting on placeholder extension release notes should be added to the code review skill that ghcp uses instead of a hard ci change

Adam Ratzman (adamint) and others added 6 commits August 24, 2026 15:46
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0526e1a0-923b-49e5-aee1-354f44d5580f
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0526e1a0-923b-49e5-aee1-354f44d5580f
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0526e1a0-923b-49e5-aee1-354f44d5580f
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0526e1a0-923b-49e5-aee1-354f44d5580f
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 0526e1a0-923b-49e5-aee1-354f44d5580f
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0526e1a0-923b-49e5-aee1-354f44d5580f
Copilot AI review requested due to automatic review settings August 24, 2026 20:44
Grant the release-only reusable workflow caller the same permissions as the normal test graph, including permissions requested by statically skipped jobs.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0526e1a0-923b-49e5-aee1-354f44d5580f

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.

Review details

  • Files reviewed: 8/8 changed files
  • Comments generated: 4
  • Review effort level: Balanced

Comment thread .github/workflows/ci.yml Resolved
Comment thread .agents/skills/code-review/SKILL.md Resolved
Copilot AI review requested due to automatic review settings August 24, 2026 20:51
Allow bot-authored release PRs to retain the fast path after maintainer finalization, and skip test result aggregation in release-only workflow calls.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0526e1a0-923b-49e5-aee1-354f44d5580f

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/tests.yml Resolved
Copilot AI review requested due to automatic review settings August 24, 2026 20:58

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0526e1a0-923b-49e5-aee1-354f44d5580f
Copilot AI review requested due to automatic review settings August 24, 2026 21:11

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.

Review details

  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

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.

I rereviewed the updated fast path, including the existing review threads. The earlier CI and trust-boundary issues are addressed: classification runs from the base revision, validates the semantic patch, fails closed to normal CI, and the release-only graph runs the Windows extension unit tests without packaging or the broader build/test graph.

I have two remaining scope and traceability questions. First, the API/ATS exclusions in .agents/skills/code-review/SKILL.md go beyond the release-placeholder exception discussed here. Since api-review is separately invoked against generated API diffs rather than automatically composed into generic source reviews, I would prefer to keep only the placeholder exception in this PR and consider the broader review-policy change separately.

Second, Fixes #19581 will close the issue even though the “do not request Copilot review” requirement was intentionally deferred and native review-on-push remains. It may be better to change the closing keyword or track that remaining requirement separately. It is also worth confirming that .agents/skills/** is consumed by the native review bot; otherwise the placeholder exception may need to live on a native instruction surface.

Neither point changes my assessment of the CI fast-path implementation itself, which otherwise looks sound.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ CI Failure Analysis: Possible Flaky Test(s)

The CI build failed due to test failure(s) that appear unrelated to the PR changes. These may be flaky tests.

Suspected flaky test(s):

Suggested actions:

  • Re-run the failed CI jobs to confirm if the failure is intermittent
  • If the test continues to fail, consider quarantining it using /quarantine-test <test name> <issue URL>
  • Search existing issues to see if this test is already known to be flaky

You can re-run the failed jobs from the workflow run page.

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-engineering-systems infrastructure helix infra engineering repo stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[VS Code] Reduce extension release friction

4 participants