Skip to content

fix: improve Foundry Copilot app preflight - #3061

Merged
anchenyi merged 4 commits into
microsoft:mainfrom
qinezh:fix/foundry-copilot-app-preflight
Aug 13, 2026
Merged

fix: improve Foundry Copilot app preflight#3061
anchenyi merged 4 commits into
microsoft:mainfrom
qinezh:fix/foundry-copilot-app-preflight

Conversation

@qinezh

@qinezh qinezh commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

  • locate the GitHub Copilot CLI from PATH, explicit overrides, or GitHub Copilot App SDK data/cache directories
  • make the Copilot app preflight read-only and return an actionable plugin install command instead of installing silently
  • remove the Bash python3 dependency while preserving plugin detection
  • document consent behavior, successful-install new-session messaging, and non-blocking install failures
  • emit an [OK] result when the GitHub Copilot App is not detected

Copilot AI lite review requested due to automatic review settings August 12, 2026 07:35
@qinezh
qinezh marked this pull request as draft August 12, 2026 07:35

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

This PR updates the Microsoft Foundry “Copilot app entry” preflight to be read-only, improve GitHub Copilot CLI discovery (PATH, overrides, and github-copilot-sdk bundled locations), and update the hosted-agent docs to reflect the new [OK]/[WARN]/[ACTION] semantics and consent/install guidance.

Changes:

  • Enhance Bash/PowerShell preflight scripts to locate the Copilot CLI from multiple sources and report whether the microsoft-foundry plugin is installed (without silently installing it).
  • Remove the Bash python3 dependency by switching to a lightweight JSON-name match for plugin detection.
  • Update hosted-agent markdown workflows to document the new preflight behavior and the required user-facing messaging after successful install.

Reviewed changes

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

File Description
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/scripts/check-copilot-app-entry.sh Adds multi-source Copilot CLI discovery and read-only plugin detection; emits [OK]/[WARN]/[ACTION] with exit code semantics.
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/scripts/check-copilot-app-entry.ps1 Mirrors the read-only preflight behavior in PowerShell, including CLI discovery and plugin detection.
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/quick-start-hosted.md Updates quickstart instructions for the new preflight output semantics and consent/install flow.
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/create-hosted.md Updates the full workflow to treat Copilot plugin installation as non-blocking while keeping environment verification [ACTION] items blocking.
Suppressed comments (2)

plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/scripts/check-copilot-app-entry.sh:77

  • The COPILOT_CLI_PATH override only checks for file existence (-f), but the path is executed later. If it points to a non-executable file, the script will stop searching and then fail at runtime. Checking -x avoids selecting an unusable CLI and allows fallback discovery to proceed.
  if [ -n "${COPILOT_CLI_PATH:-}" ] && [ -f "$COPILOT_CLI_PATH" ]; then

plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/scripts/check-copilot-app-entry.sh:102

  • COPILOT_CLI_EXTRACT_DIR/copilot is only checked with -f, but the script executes it. Using -x here prevents selecting a non-executable file and better matches the intent of locating an executable CLI.
  if [ -n "${COPILOT_CLI_EXTRACT_DIR:-}" ] && [ -f "$COPILOT_CLI_EXTRACT_DIR/copilot" ]; then

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@qinezh
qinezh marked this pull request as ready for review August 12, 2026 07:41
@anchenyi
anchenyi merged commit ac6f80d into microsoft:main Aug 13, 2026
12 checks passed
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