Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
},
"metadata": {
"description": "Plugins for Azure Chaos Studio — managed resilience testing for Azure.",
"version": "0.3.0"
"version": "0.4.0"
},
"plugins": [
{
"name": "startchaos",
"source": "./copilot-cli-plugin",
"description": "Guide Azure customers through the end-to-end Chaos Studio v2 Workspace experience: provision a workspace, configure scenarios, run experiments, and analyze impact with Azure Monitor correlation. Ships interactive skills and an MCP server for autonomous agents.",
"version": "0.3.0",
"description": "Guide Azure customers through Chaos Studio v2 workspace operations, impact analysis, and an evidence-gated resilience remediation loop. Ships interactive skills and an MCP server for autonomous agents.",
"version": "0.4.0",
"author": { "name": "Azure Chaos Studio" },
"homepage": "https://learn.microsoft.com/azure/chaos-studio/",
"repository": "https://github.com/microsoft/chaos-studio",
"license": "MIT",
"keywords": ["azure", "chaos", "chaos-studio", "workspace", "scenario", "reliability", "mcp"]
"keywords": ["azure", "chaos", "chaos-studio", "workspace", "scenario", "reliability", "resilience", "remediation", "mcp"]
}
]
}
49 changes: 49 additions & 0 deletions copilot-cli-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,45 @@ the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html

## [Unreleased]

### Added

- **Chaos Loop workspace preflight.** A run now starts with a required,
validated `workspaceRequest` (subscription, resource group, region, managed
scopes, optional preferred name, optional managed identity) and a
deterministic workspace preflight that runs before any phase:
`chaos_list_workspaces` discovery → `workspace-plan` (reuse-or-create, no
state mutation) → `chaos_get_workspace` readback or `chaos_create_workspace`
→ `workspace-finalize`. Reuse requires the requested region, the pinned
identity when specified, `Succeeded` provisioning, and managed scopes that
cover the requested scopes and every target resource; selection precedence is
exact preferred name, exact managed-scope set, then stable case-insensitive
ARM ID, with the remaining candidates recorded as alternatives and caveats.
With no compatible candidate the create request uses the preferred name or a
deterministic hash-derived name plus exactly the requested scopes, region, and
identity. Any tool failure, failed RBAC grant, non-`Succeeded` provisioning,
or readback mismatch persists a concrete `remediationBrief` and terminates the
run `escalated` (`workspace-fail` records list/get/create permission and
policy failures the same way). Only a ready workspace lets `evaluate`/`apply`
proceed, and the selected workspace is immutable for the rest of the run — no
later phase rediscovers it, and there is still no mid-loop workspace question.
The two normal customer interaction stops are unchanged.
- `chaos_list_workspaces(subscription_id, resource_group=None)` MCP tool and the
`azure.arm_list` paging helper: read-only enumeration of
`Microsoft.Chaos/workspaces` at subscription or resource-group scope,
following `nextLink`, on the same `2026-05-01-preview` API version.
`chaos_create_workspace` remains the only write path. The `chaos-mcp`
package version is now `0.4.0` for this public tool addition.
- `schemas/chaos-loop/workspace-plan.v1.schema.json` and
`examples/chaos-loop/workspace-plan.json`.

### Changed

- Chaos Loop policy version is now `chaos-loop-policy/v2`; `run-state.v1`
gains a required `workspace` object (status, normalized request, decision,
selected workspace, alternatives, caveats, discovery/provisioning evidence,
`observedAt`, remediation brief). `migrate` upgrades an earlier run and
migrates it to a `pending` workspace so an in-flight run cannot bypass
preflight; supply the missing request with `migrate --workspace-request`.
- The PowerShell skills (`create-workspace`, `setup-scenario`, `run-scenario`)
now drive all Chaos Studio v2 control-plane operations through the first-party
**`az chaos` CLI extension** instead of raw `az rest` calls, via a new shared
Expand Down Expand Up @@ -43,6 +80,18 @@ the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html

### Added

- `chaos-loop` controller and five bounded phase skills for an automatically
advancing resilience-analysis, single-fault execution, diagnostic, advisory,
coding, deployment-gate, and identical verification cycle. Deterministic
Python policy owns durable state, validation, calculations, routing, verdict
eligibility, advisory ledgers, and merge/build/artifact/deployment/live
revision gate checks. The only normal customer pauses are advisory approval
and PR delivery awaiting complete deployment evidence.
- Versioned Chaos Loop state and external-gate schemas, Scenario catalog,
examples, package validation, and Azure SRE Agent setup guidance. The
standalone archive reuses the repository's `chaos-studio` MCP server rather
than shipping overlapping Azure wrappers.

- New `chaos-impact` skill: pulls a `ScenarioRun`, queries Azure Monitor
(metrics, logs via KQL, Activity Log, alerts, Service Health) across the
run window plus a configurable buffer, and emits a Markdown report card +
Expand Down
25 changes: 25 additions & 0 deletions copilot-cli-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,30 @@ session for auth.
| `setup-scenario` | Discover, configure, validate scenarios |
| `run-scenario` | Execute and stream experiment results |
| `chaos-impact` | Analyze run impact — correlate Azure Monitor signals to targeted resources |
| `chaos-loop` | Run or resume the evidence-gated remediation and identical-verification loop |

### Chaos Loop

`/chaos-loop` is a single public controller over five bounded internal phases:
resilience analysis, one frozen fault execution, diagnostic, advisory, and
approved coding. Every run starts with a required, validated `workspaceRequest`
and a deterministic workspace preflight that lists existing workspaces, reuses
the best compatible one or creates exactly the planned one, and proves the
result before analysis begins. Deterministic Python owns state revisions,
validation, calculations, routing, verdict eligibility, advisory ledgers, and
the hard merge/build/artifact/deployment/live-revision gate. The controller
auto-advances through decisive handoffs and pauses normally only for advisory
approval and PR delivery awaiting deployment evidence.

The phases reuse the bundled `chaos-studio` MCP server; no parallel Azure
wrapper is shipped. Build the standalone Azure SRE Agent bundle with:

```powershell
pwsh -NoProfile -File .\scripts\Build-ChaosLoopPackage.ps1
```

See [`docs/chaos-loop.md`](docs/chaos-loop.md) and
[`docs/sre-agent-chaos-loop-import.md`](docs/sre-agent-chaos-loop-import.md).

## MCP tools (for agents)

Expand Down Expand Up @@ -86,6 +110,7 @@ Per-client config snippets (Claude Desktop, Cursor, Codex CLI) are in

| Tool | Purpose |
|---|---|
| `chaos_list_workspaces` | List existing workspaces (subscription or resource group, paged) so one can be reused |
| `chaos_create_workspace` | Provision workspace + identity + Reader RBAC |
| `chaos_get_workspace` | Fetch workspace |
| `chaos_refresh_recommendations` | Trigger workspace evaluation |
Expand Down
Loading
Loading