Skip to content

Fix pr-docs-check docs PR flow#16149

Merged
IEvangelist merged 2 commits intomicrosoft:mainfrom
IEvangelist:dapine/docs-pr-check-aw
Apr 14, 2026
Merged

Fix pr-docs-check docs PR flow#16149
IEvangelist merged 2 commits intomicrosoft:mainfrom
IEvangelist:dapine/docs-pr-check-aw

Conversation

@IEvangelist
Copy link
Copy Markdown
Member

Description

Update the pr-docs-check agentic workflow so it first gates on significant user-facing changes and only drafts an aspire.dev PR when there is a real documentation gap.

This change also:

  • recompiles the workflow with gh aw v0.68.1
  • refreshes .github/aw/actions-lock.json
  • restores the manual _repos/aspire.dev safe-outputs checkout override that gh aw still drops from source, which is required for the safe_outputs job to switch into microsoft/aspire.dev and create the draft PR successfully

Validation:

  • gh aw compile pr-docs-check --json --no-emit

Fixes # (issue)

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
    • No
  • Does the change require an update in our Aspire docs?

Gate the workflow on significant user-facing changes and only draft aspire.dev documentation PRs when there is a clear docs gap.

Recompile the workflow with gh aw v0.68.1, refresh the shared action lock, and restore the required safe_outputs checkout override for microsoft/aspire.dev under _repos/aspire.dev so cross-repo draft PR creation can switch repositories correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 14, 2026 14:36
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

🚀 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 -- 16149

Or

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

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

Note

Copilot was unable to run its full agentic suite in this review.

Updates the pr-docs-check agentic workflow to gate on significant user-facing changes before drafting an aspire.dev documentation PR, and refreshes the generated/locked workflow outputs to match the updated gh aw toolchain.

Changes:

  • Refines the workflow prompt/instructions to first detect significant user-facing changes and only create docs PRs when there is an actual documentation gap.
  • Recompiles the workflow with gh aw v0.68.1, updating the generated lock workflow and associated action pins.
  • Restores the _repos/aspire.dev checkout path override needed for safe-outputs PR creation against microsoft/aspire.dev.

Reviewed changes

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

File Description
.github/workflows/pr-docs-check.md Updates the agent instructions to gate on significant user-facing changes before creating an aspire.dev docs PR.
.github/workflows/pr-docs-check.lock.yml Recompiled workflow output with updated action versions/pins and restored _repos/aspire.dev safe-outputs checkout path behavior.
.github/aw/actions-lock.json Refreshes the actions lock mapping (notably adding actions/github-script@v9 and bumping gh-aw-actions/setup).

Comment thread .github/workflows/pr-docs-check.lock.yml Outdated
Comment thread .github/workflows/pr-docs-check.lock.yml
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread .github/workflows/pr-docs-check.md
@github-actions
Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@github-actions
Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@IEvangelist IEvangelist merged commit 35c6dab into microsoft:main Apr 14, 2026
831 of 837 checks passed
@github-actions github-actions bot added this to the 13.3 milestone Apr 14, 2026
radical pushed a commit that referenced this pull request Apr 15, 2026
* Fix pr-docs-check docs PR flow

Gate the workflow on significant user-facing changes and only draft aspire.dev documentation PRs when there is a clear docs gap.

Recompile the workflow with gh aw v0.68.1, refresh the shared action lock, and restore the required safe_outputs checkout override for microsoft/aspire.dev under _repos/aspire.dev so cross-repo draft PR creation can switch repositories correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix pr-docs-check source-only checkouts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
radical added a commit that referenced this pull request Apr 15, 2026
* Wrap script execution in main() with BASH_SOURCE guard

Enable sourcing get-aspire-cli.sh and get-aspire-cli-pr.sh to load
function definitions without executing the main flow. This is required
for unit-testing individual script functions in isolation.

Also initialize `local config_file=""` to prevent unbound-variable
errors under `set -u` when no shell config file is found.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Consolidate ProcessExtensions into Aspire.TestUtilities

Move ProcessExtensions from Infrastructure.Tests (internal) to
Aspire.TestUtilities (public) so it can be shared by the new
acquisition test project. Update Infrastructure.Tests to reference
the shared version. Simplify CommandResult and ToolCommandException
to use primary constructors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Surface PR metadata and GH_TOKEN for Acquisition tests in CI

Extend the existing requiresCliArchive token/metadata exports to also
trigger when testShortName == 'Acquisition', so integration tests can
access GitHub API when run as outerloop.

Remove unrelated create-failing-test-issue.* entry from CI trigger
skip-list.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add Aspire.Acquisition.Tests with 160 tests for CLI scripts

New test project covering get-aspire-cli.sh, get-aspire-cli-pr.sh,
and their PowerShell equivalents. Tests are organized in tiers:

- Function-level tests (ScriptFunctionCommand): source a script and
  call individual functions in isolation — URL construction, platform
  detection, input validation, shell profile handling, archive ops.

- Script-level tests (ScriptToolCommand): run full scripts with mock
  gh CLI and --dry-run to validate end-to-end parameter handling.

- Piped install tests (ScriptHostFixture): serve scripts over HTTP
  and test curl|bash and irm|iex patterns against a real pipe.

- Integration tests (RealGitHubPRFixture): query real GitHub PRs
  with --dry-run, gated behind OuterloopTest + Category=integration.

Test infrastructure:
- TestEnvironment: isolated temp dirs with mock HOME
- FakeArchiveHelper: generates tar.gz/zip with .sha512 sidecars
- Mock gh CLI: canned JSON for pr/run/api commands

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: iex quoting for Windows + add timeouts to piped install tests

Fix Windows test failures where double quotes in ProcessStartInfo.Arguments
were consumed as argument delimiters by MSVCRT command-line parser. Wrap the
entire iex expression in outer quotes with escaped inner quotes so they
survive as literal characters for pwsh -Command.

Add 60-second timeouts to all piped install tests to prevent CI hang dumps.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: quote bash -c args and add -Help to PR script

Fix macOS test failures where .NET's ProcessStartInfo.Arguments parser
splits compound bash -c commands on spaces. Wrap the entire command
string in quotes so it stays as a single argv entry.

Add missing -Help switch parameter to get-aspire-cli-pr.ps1 (the release
script has it but the PR script was missing it, causing iex test to fail
with 'parameter not found').

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix missing disposal of ScriptToolCommand in PR script tests

Add 'using' to all CreateCommandWithMockGhAsync call sites to ensure
ToolCommand.Dispose() is called, which kills any running process.
Without disposal, hung processes could accumulate under CI contention.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address review feedback: mock gh api fidelity and XDG_CONFIG_HOME isolation

1. Mock gh api now returns endpoint-aware responses instead of always
   returning {}. PR endpoint returns a realistic SHA, workflow endpoint
   returns a realistic run ID. When --jq is present, returns the
   pre-extracted value; otherwise returns the full JSON structure.
   This ensures tests actually validate the PR lookup contract.

2. Override XDG_CONFIG_HOME in both ScriptFunctionCommand and
   ScriptToolCommand to prevent bash scripts that consult
   ${XDG_CONFIG_HOME:-$HOME/.config} from reading real profile files
   outside the test's temp home on developer machines with
   XDG_CONFIG_HOME set.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix milestone workflow: restore permissions and update to github-script v9 (#16174)

- Restore pull-requests: write permission (required by the Issues API
  when updating PR resources, confirmed by 403 error in run #24421110155)
- Update actions/github-script from v7.0.1 (Node.js 20) to v9.0.0
  (Node.js 24) to avoid the June 2026 Node.js 20 deprecation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Clarify dashboard clear telemetry labels (#16128)

* Rename describe endpoints column to URLs (#16144)

* Bump next in /extension in the npm_and_yarn group across 1 directory (#16041)

Bumps the npm_and_yarn group with 1 update in the /tests/Aspire.Cli.EndToEnd.Tests/Fixtures/JsPublish/nextjs directory: [next](https://github.com/vercel/next.js).


Updates `next` from 15.5.14 to 15.5.15
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](vercel/next.js@v15.5.14...v15.5.15)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.5.15
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix pr-docs-check docs PR flow (#16149)

* Fix pr-docs-check docs PR flow

Gate the workflow on significant user-facing changes and only draft aspire.dev documentation PRs when there is a clear docs gap.

Recompile the workflow with gh aw v0.68.1, refresh the shared action lock, and restore the required safe_outputs checkout override for microsoft/aspire.dev under _repos/aspire.dev so cross-repo draft PR creation can switch repositories correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix pr-docs-check source-only checkouts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR #15995 review feedback

- Remove Acquisition-specific GH_TOKEN injection from run-tests.yml (#14)
- Rename s_-prefixed test classes to PascalCase (#15)
- Add retry loop for TOCTOU port race in ScriptHostFixture (#16)
- Add missing [RequiresTools(["pwsh"])] attributes (#17)
- Add default 60s timeout to ScriptToolCommand/ScriptFunctionCommand (#18)
- Fix CTS disposal in PowerShellCommand and NodeCommand (#19/#20)
- Move ToolCommandException into Aspire.Templates.Tests namespace (#21)
- Expand comment on broad readonly override in bash sourcing (#22)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com>
Co-authored-by: Adam Ratzman <adam@adamratzman.com>
Co-authored-by: James Newton-King <james@newtonking.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Pine <david.pine@microsoft.com>
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.

3 participants