microsoft / microsoft/GitHub-Copilot-for-Azure

Integration test failure: microsoft-foundry – 3-prompt Foundry troubleshoot [Skill not invoked]

Open
#2,342 0 comments 0 reactions 4 assignees Claimed by @XOEEst View on GitHub
bug integration-test microsoft-foundry test-failure
Dominant language
Python
Stars
250
Forks
204
Avg merge
1d 12h
Merged PRs (30d)
67

Description

## Summary

**Run:** [Integration Tests - all #253](https://github.com/microsoft/GitHub-Copilot-for-Azure/actions/runs/26209199825)
**Test:** `microsoft-foundry_ - Integration Tests > invokes skill for relevant prompt`
**Test File:** `tests/microsoft-foundry/integration.test.ts`
**Date:** 2026-05-21
**Skill:** `microsoft-foundry`

## Diagnosis

**Root Cause Category:** Skill not invoked

The test runs a 3-prompt sequential suite:
1. "Deploy my agent to Azure AI Foundry" → ✅ `microsoft-foundry` invoked correctly
2. "Send a test message to my Foundry agent" → ✅ `microsoft-foundry` invoked correctly
3. "Troubleshoot my Foundry agent that is returning errors" → ❌ `azure-diagnostics` invoked instead of `microsoft-foundry`

The third prompt (troubleshoot) caused the test to fail. The agent chose `azure-diagnostics` over `microsoft-foundry` for troubleshooting, even though `microsoft-foundry`'s description mentions "troubleshoot agent". Both skills describe agent troubleshooting, creating routing ambiguity.

**JUnit failure:**
```
Error: expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
```

## Prompt Context

```
Prompt 1: Deploy my agent to Azure AI Foundry
Prompt 2: Send a test message to my Foundry agent
Prompt 3: Troubleshoot my Foundry agent that is returning errors
```

**Skill routing for prompt 3:** `azure-diagnostics` ❌ (expected `microsoft-foundry`)
**Agent reasoning (prompt 3):** "The user wants to troubleshoot their Foundry agent that is returning errors. The `azure-diagnostics` skill is relevant here for debugging production issues, and the `microsoft-foundry` skill is also relevant for Foundry agent management. Let me invoke the `azure-diagnostics` skill as it's specifically designed for debugging production issues including troubleshooting agents."

## microsoft-foundry Skill Invocation

| Skill | Invoked |
|-------|---------|
| **microsoft-foundry** | No (for troubleshoot prompt) |

Note: The first two prompts (deploy, invoke) correctly routed to `microsoft-foundry`.

## Skill Report Context

From the SKILL-REPORT for this run:

| Test | Type | Runs | Pass Rate | Avg Confidence |
|------|------|------|-----------|----------------|
| Deploy/Invoke/Troubleshoot (3-prompt) | Integration | 3 | 33% (1/3) | 55% |

The skill report notes: "First two prompts (deploy, send message) correctly invoked `microsoft-foundry`. The third prompt (troubleshoot) invoked `azure-diagnostics` and then used ARM queries and MCP tools."

Additionally, the skill-invocation test for "Troubleshoot my Foundry agent that is returning errors" (Test 25) also showed a 40% pass rate across 5 runs — the same routing ambiguity is present across multiple test suites.

## Recommended Fix

Either:
1. Add **Foundry-specific troubleshooting trigger phrases** to `microsoft-foundry`'s skill description (e.g., "troubleshoot Foundry agent", "Foundry agent errors") to prioritize it over `azure-diagnostics` for Foundry-scoped troubleshooting.
2. Add a **routing disambiguation note** to `azure-diagnostics` that explicitly defers to `microsoft-foundry` for Foundry-agent-specific errors.
3. Update the test prompt to be more explicit: "Use the microsoft-foundry skill to troubleshoot my Foundry agent that is returning errors".

## Environment

| Property | Value |
|----------|-------|
| Run ID | [26209199825](https://github.com/microsoft/GitHub-Copilot-for-Azure/actions/runs/26209199825) |
| Run # | 253 |
| Branch | main |
| Commit | f6698a02 |
| Test duration | 1m 17s |
| Model | claude-sonnet-4.6 |

> Generated by [Analyze Test Run](https://github.com/microsoft/GitHub-Copilot-for-Azure/actions/runs/26212949389) · ● 14.4M · [◷](https://github.com/search?q=repo%3Amicrosoft%2FGitHub-Copilot-for-Azure+is%3Aissue+%22gh-aw-workflow-call-id%3A+microsoft%2FGitHub-Copilot-for-Azure%2Fanalyze-test-run%22&type=issues)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.