Skip to content

feature: Feature/azure compute/enablemachinemanagement#2069

Open
rakal-dyh wants to merge 16 commits intomicrosoft:mainfrom
rakal-dyh:feature/azure-compute/enablemachinemanagement
Open

feature: Feature/azure compute/enablemachinemanagement#2069
rakal-dyh wants to merge 16 commits intomicrosoft:mainfrom
rakal-dyh:feature/azure-compute/enablemachinemanagement

Conversation

@rakal-dyh
Copy link
Copy Markdown
Collaborator

Description

Checklist

  • Tests pass locally (cd tests && npm test)
  • If modifying skill descriptions: verified routing correctness with integration tests (npm run test:skills:integration -- <skill>)
  • If modifying skill USE FOR / DO NOT USE FOR / PREFER OVER clauses: confirmed no routing regressions for competing skills
  • Version bumped in skill frontmatter (if skill files changed)

Related Issues

Yinghui Dong and others added 3 commits April 21, 2026 13:57
- Add 'Should Trigger - Essential Machine Management' section with 7 EMM prompts
- Add 'Essential Machine Management Workflow' unit tests (sections, routing, API, errors)
- Add 'EMM Reference Files' unit tests (all 4 refs exist, content assertions)
- Update router test to verify EMM description keywords and routing
- Add 2 EMM integration test cases (enable flow, enrollment status)
- Update snapshot with new EMM keywords

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…r-Azure into feature/azure-compute/enablemachinemanagement
@rakal-dyh
Copy link
Copy Markdown
Collaborator Author

verify the integration test now

tmeschter
tmeschter previously approved these changes Apr 27, 2026
@tmeschter
Copy link
Copy Markdown
Member

Update the PR title to start with "feature:" to have this automatically included in the CHANGELOG.md.

@rakal-dyh rakal-dyh changed the title Feature/azure compute/enablemachinemanagement feature: Feature/azure compute/enablemachinemanagement Apr 27, 2026
Copy link
Copy Markdown
Collaborator

@jongio jongio left a comment

Choose a reason for hiding this comment

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

Two things to address in this EMM sub-workflow addition:

1. Contradictory "Portal-only" statement (emm-overview.md, Key Characteristics section)

The overview states:

Portal-only during preview: No CLI/API-only enrollment flow is officially supported yet

But emm-enable-flow.md documents a complete 8-step Copilot-guided flow using REST API calls (PUT to Microsoft.ManagedOps/managedOps/default). If the agent reads the overview first, it'll tell users EMM is portal-only and skip the API flow - which is the whole point of this skill.

Suggestion: rephrase to clarify that the REST API exists and the Copilot-guided flow uses it, even if Microsoft's official docs focus on the portal experience.

2. Offboard instructions split with different approaches

essential-machine-management.md says offboard via portal UI (navigate, select, click Offboard). emm-enable-flow.md documents a DELETE API call for the same action. The parent workflow's routing doesn't point to the API-based offboard path. Consider consolidating - either add the API path to the parent routing tree, or remove the duplicate from the enable-flow reference.

- **Subscription-level scope:** Enables for all VMs in a subscription at once
- **No VM exclusion:** Currently no ability to exclude individual VMs
- **Existing services preserved:** If a VM already has Update Manager with a maintenance schedule, it keeps that schedule
- **Portal-only during preview:** No CLI/API-only enrollment flow is officially supported yet
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This contradicts emm-enable-flow.md which documents a full REST API enrollment flow. The agent might read this first and tell users EMM is portal-only, refusing to guide them through the Copilot flow.

Consider rephrasing to something like: "Official docs focus on the portal experience, but a REST API (Microsoft.ManagedOps) is available and used by the Copilot-guided flow."

Copy link
Copy Markdown
Collaborator Author

@rakal-dyh rakal-dyh Apr 28, 2026

Choose a reason for hiding this comment

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

for 1, update based on the suggestion, saying 'a REST API (Microsoft.ManagedOps) is available and used by the Copilot-guided flow'

for 2, update the essential-machine-management.md, saying unless customer explicitly mention portal, the emm-enable-flow-portal-guidance.md (renamed from emm-enable-flow-portal.md) will be used. Otherwise in other place no portal related info is mentioned

Yinghui Dong and others added 3 commits April 27, 2026 17:07
…lability

The 'portal-only' statement contradicted emm-enable-flow.md which documents
a full Copilot-guided REST API enrollment flow via Microsoft.ManagedOps.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove 'Via Portal' sub-section from Browse (keep Copilot-guided API approach)
- Point Offboard to emm-enable-flow.md#disable-emm-offboard instead of portal steps
- Keep portal routing entry for users who explicitly mention portal

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update all references in SKILL.md, essential-machine-management.md, and unit tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The #disable-emm-offboard anchor doesn't work when the agent reads files.
Reference the file directly and mention the section name in text.

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

@jongio jongio left a comment

Choose a reason for hiding this comment

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

Addresses my previous feedback - the "portal-only" contradiction is fixed and offboard instructions are consolidated. Clean changes.

Two new issues in the latest commits:

  1. integration.test.ts: The describe block was renamed from "skill-invocation" to "11skill-invocation11". This looks like accidental debug characters left in. It'll affect test output/filtering.

  2. .playwright-mcp/page-2026-04-20T21-13-59-247Z.yml was committed - looks like an accidental Playwright MCP artifact. Should be removed and probably added to .gitignore.

Comment thread tests/azure-compute/integration.test.ts Outdated
}

describe("skill-invocation", () => {
describe("11skill-invocation11", () => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This renames the test suite from "skill-invocation" to "11skill-invocation11" - looks like accidental debug characters. Should be reverted to "skill-invocation".

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

revert the change

@jongio
Copy link
Copy Markdown
Collaborator

jongio commented Apr 28, 2026

.playwright-mcp/page-2026-04-20T21-13-59-247Z.yml was committed - looks like an accidental Playwright MCP artifact. Should be removed and .playwright-mcp/ added to .gitignore.

@rakal-dyh
Copy link
Copy Markdown
Collaborator Author

adress the latest comment, remove the mistakenly committed file

Copy link
Copy Markdown
Collaborator

@jongio jongio left a comment

Choose a reason for hiding this comment

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

Addresses my previous feedback. Both items fixed:

  • "11skill-invocation11" reverted to "skill-invocation"
  • .playwright-mcp/ artifact removed

No new issues found in the incremental diff. All CI green.

…r-Azure into feature/azure-compute/enablemachinemanagement
Copilot AI review requested due to automatic review settings April 30, 2026 05:08
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

Adds Essential Machine Management (EMM) coverage to the azure-compute skill by introducing a new EMM workflow + reference docs and extending unit/trigger/integration tests to validate routing and keyword matching.

Changes:

  • Added an EMM workflow (essential-machine-management.md) with routing, browse/offboard guidance, and error handling.
  • Added EMM reference docs (overview, prerequisites, enable flow, portal enable flow).
  • Updated azure-compute skill metadata/routing and extended tests + snapshots to cover EMM prompts and routing.

Reviewed changes

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

Show a summary per file
File Description
tests/azure-compute/unit.test.ts Adds unit assertions for EMM description keywords, routing link presence, and validates new workflow/reference file content.
tests/azure-compute/triggers.test.ts Adds trigger prompts ensuring EMM queries trigger the azure-compute skill.
tests/azure-compute/integration.test.ts Adds integration prompts to verify EMM queries route to the new workflow at/above the invocation threshold.
tests/azure-compute/snapshots/triggers.test.ts.snap Updates snapshot to include EMM in description and extracted keywords.
plugin/skills/azure-compute/workflows/essential-machine-management/essential-machine-management.md New workflow router for EMM intents (enable/portal/overview/prereqs/browse/offboard/troubleshoot).
plugin/skills/azure-compute/workflows/essential-machine-management/references/emm-enable-flow.md New Copilot-guided enablement flow and API/CLI guidance for enrolling/offboarding EMM.
plugin/skills/azure-compute/workflows/essential-machine-management/references/emm-enable-flow-portal-guidance.md New portal-specific enablement walkthrough for users explicitly requesting portal steps.
plugin/skills/azure-compute/workflows/essential-machine-management/references/emm-overview.md New EMM feature/tier/pricing overview reference.
plugin/skills/azure-compute/workflows/essential-machine-management/references/emm-prerequisites.md New prerequisites (resources, roles, RPs) reference.
plugin/skills/azure-compute/SKILL.md Extends skill description + routing to include EMM and link to the new workflow and references.

- **Workspaces** — Log Analytics and Azure Monitor workspace resource IDs
- **Created by / date** — who enrolled and when (in `systemData`)

To scan multiple subscriptions, use `azure-subscription_list` to list available subscriptions, then query each one. Report results as a table:
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

azure-subscription_list here doesn’t match the repo’s established Azure MCP tool naming pattern (e.g., mcp_azure_mcp_subscription_list). Please update to the correct tool name for consistency and to keep the workflow executable.

Suggested change
To scan multiple subscriptions, use `azure-subscription_list` to list available subscriptions, then query each one. Report results as a table:
To scan multiple subscriptions, use `mcp_azure_mcp_subscription_list` to list available subscriptions, then query each one. Report results as a table:

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

solved


| MCP Tool | Purpose |
| -------- | ------- |
| `azure-subscription_list` | List available subscriptions |
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

The MCP tool name azure-subscription_list doesn’t match the repo’s established Azure MCP naming pattern (e.g., mcp_azure_mcp_subscription_list used in other skills like plugin/skills/azure-deploy/SKILL.md). Please align this to the correct Azure MCP tool name so agents can actually invoke it.

Suggested change
| `azure-subscription_list` | List available subscriptions |
| `mcp_azure_mcp_subscription_list` | List available subscriptions |

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

solved

Comment on lines +91 to +93
| Log Analytics workspace | `azure-monitor` | List existing workspaces or create new |
| Azure Monitor workspace | `azure-monitor` | List existing workspaces or create new |

Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

azure-monitor is referenced here as an MCP tool, but this tool name doesn’t appear elsewhere in the repo’s Azure MCP usage (which generally uses mcp_azure_mcp_<service> tools or explicit CLI generation). Please update this to the correct Azure MCP tool(s) for listing/creating Log Analytics + Azure Monitor workspaces (or document the CLI fallback) to avoid non-runnable guidance.

Suggested change
| Log Analytics workspace | `azure-monitor` | List existing workspaces or create new |
| Azure Monitor workspace | `azure-monitor` | List existing workspaces or create new |
| Log Analytics workspace | `N/A - use Azure CLI fallback` | List with `az monitor log-analytics workspace list` or create with `az monitor log-analytics workspace create` |
| Azure Monitor workspace | `N/A - use Azure CLI fallback` | List with `az monitor account list` or create with `az monitor account create` |
> 💡 **Tip:** Do not invoke `azure-monitor` as an MCP tool here unless a verified repo-supported Azure MCP command is available. For this workflow, prefer Azure CLI generation/execution for workspace discovery and creation.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

update and remove the mcp and using cli now

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleAssignments?api-version=2022-04-01&$filter=assignedTo('{objectId}')
```

> 💡 **Tip:** The `assignedTo` filter scopes results to the current user's assignments — this works even without `Microsoft.Authorization/roleAssignments/read` permission at subscription level.
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

There’s an internal inconsistency about role-assignment read permissions: the Tip says the assignedTo filter works even without Microsoft.Authorization/roleAssignments/read, but the Error Handling table says a 403 can occur because the user can’t read role assignments. Please reconcile these statements (either adjust the tip, or clarify exactly when 403 can still happen).

Suggested change
> 💡 **Tip:** The `assignedTo` filter scopes results to the current user's assignments — this works even without `Microsoft.Authorization/roleAssignments/read` permission at subscription level.
> 💡 **Tip:** The `assignedTo` filter scopes results to the current user's assignments and may work in cases where the caller does not have broad permission to list all role assignments. However, it does **not** guarantee access: a `403 Forbidden` can still occur if the caller is not allowed to read role assignments at the requested scope, or if the API enforces `Microsoft.Authorization/roleAssignments/read` for that request.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

update the error handling

Copy link
Copy Markdown
Collaborator

@jongio jongio left a comment

Choose a reason for hiding this comment

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

Latest commits address the Copilot bot findings:

  • MCP tool names fixed to mcp_azure_mcp_subscription_list (both router and enable-flow)
  • azure-monitor MCP tool refs replaced with explicit CLI commands for Log Analytics and Azure Monitor workspaces
  • Role check tip and 403 error handling now consistent - both correctly explain that assignedTo is self-scoped but requires at least one role on the subscription

All prior review items resolved. CI green. No new issues.

…r-Azure into feature/azure-compute/enablemachinemanagement
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.

4 participants