Skip to content

Commit 99cdff3

Browse files
authored
Merge branch 'main' into TryCopyTo
2 parents 4eb1db5 + c0d7ef5 commit 99cdff3

6,642 files changed

Lines changed: 411231 additions & 183188 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.CodeQL.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,27 @@ queries:
3131
# APIs. Those call sites are well-reviewed and don't benefit from extra alerts regarding
3232
# the possibility of loading malicious code.
3333
- "cs/deserialization-unexpected-subtypes"
34+
#
35+
# Don't warn about usage of non-compliant crypto within our own implementations or interop code,
36+
# since the rule would noisily try to warn us about *ourselves*. These exclusions are scoped
37+
# to just the crypto code itself. We still want alerts when consumers of crypto (even within this
38+
# repo) try to use non-compliant primitives; those call sites must be manually inspected
39+
# and suppressed if appropriate.
40+
#
41+
- exclude:
42+
queryid:
43+
- "cs/ecb-encryption"
44+
- "cs/encryption-with-vulnerable-cipher-mode"
45+
- "cs/weak-symmetric-algorithm"
46+
- "cs/obsolete-password-key-derivation"
47+
- "cs/cryptography/unapproved-usage-of-dsa"
48+
- "cs/weak-crypto"
49+
- "cs/weak-hmacs"
50+
- "java/weak-crypto-algorithm-or-hash"
51+
path:
52+
- "src/libraries/Common/src/Interop/Windows/BCrypt/**"
53+
- "src/libraries/Common/src/System/Security/Cryptography/**"
54+
- "src/libraries/Microsoft.Bcl.Cryptography/**"
55+
- "src/libraries/System.Security.Cryptography/**"
56+
- "src/libraries/System.Security.Cryptography.*/**"
57+
- "src/native/libs/System.Security.Cryptography.*/**"

.claude/settings.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extraKnownMarketplaces": {
3+
"dotnet-arcade-skills": {
4+
"source": {
5+
"source": "github",
6+
"repo": "dotnet/arcade-skills"
7+
}
8+
}
9+
},
10+
"enabledPlugins": {
11+
"dotnet-dnceng@dotnet-arcade-skills": true
12+
}
13+
}

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
]
1616
},
1717
"microsoft.dotnet.xharness.cli": {
18-
"version": "11.0.0-prerelease.26064.3",
18+
"version": "11.0.0-prerelease.26279.1",
1919
"commands": [
2020
"xharness"
2121
]

.devcontainer/Dockerfile

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,8 @@
44
ARG VARIANT="8.0-noble"
55
FROM mcr.microsoft.com/devcontainers/dotnet:${VARIANT}
66

7-
# Set up machine requirements to build the repo and the gh CLI
8-
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
9-
&& apt-get -y install --no-install-recommends \
10-
clang \
11-
cmake \
12-
cpio \
13-
build-essential \
14-
python3 \
15-
curl \
16-
git \
17-
lldb \
18-
llvm \
19-
liblldb-dev \
20-
libunwind8 \
21-
libunwind8-dev \
22-
gettext \
23-
libicu-dev \
24-
liblttng-ust-dev \
25-
libssl-dev \
26-
libkrb5-dev \
27-
ninja-build \
28-
tzdata
7+
SHELL [ "/bin/bash", "-c" ]
8+
9+
# Set up machine requirements to build the repo and the gh CLI.
10+
RUN curl --remote-name-all -sSL https://github.com/dotnet/runtime/raw/main/eng/common/native/{install-dependencies,init-os-and-arch}.sh && \
11+
bash install-dependencies.sh && rm {install-dependencies,init-os-and-arch}.sh

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ csharp_space_between_square_brackets = false
165165
# License header
166166
file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.
167167

168+
# xUnit1051: recommends TestContext.Current.CancellationToken (v3 pattern) which
169+
# is not yet adopted; suppress until a full v3 migration is performed.
170+
dotnet_diagnostic.xUnit1051.severity = none
171+
168172
[src/libraries/System.Net.Http/src/System/Net/Http/{SocketsHttpHandler/Http3RequestStream.cs,BrowserHttpHandler/BrowserHttpHandler.cs}]
169173
# disable CA2025, the analyzer throws a NullReferenceException when processing this file: https://github.com/dotnet/roslyn-analyzers/issues/7652
170174
dotnet_diagnostic.CA2025.severity = none

.git-blame-ignore-revs

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Licensed to the .NET Foundation under one or more agreements.
2+
# The .NET Foundation licenses this file to you under the MIT license.
3+
4+
# This file is consumed by GitHub by default and the git-blame command
5+
# optionally to make blames ignore uninteresting commits. See docs here:
6+
# https://docs.github.com/en/repositories/working-with-files/using-files/viewing-and-understanding-files#ignore-commits-in-the-blame-view
7+
# To configure git-blame to use this file, run:
8+
# git config blame.ignoreRevsFile .git-blame-ignore-revs
9+
10+
# These are the commits that trim gc.cpp copies to contain only
11+
# the functions relevant to each split file. They should be ignored
12+
# when running git blame.
13+
14+
# region_allocator.cpp
15+
d49754129145a19ad7aa5a69122e58d09375f4ac
16+
17+
# region_free_list.cpp
18+
83fa3f4a0493c9c57f44c7cb6e77bb5dfb05ea91
19+
20+
# finalization.cpp
21+
2ab9d88c8dd2431fc7a09527dd4adb24848a4ece
22+
23+
# interface.cpp
24+
b91cb52f3b3f23cdb45ac7234a7cab974cbed9af
25+
26+
# allocation.cpp
27+
d682279be75df3debe5413c5fed486cfdabc3534
28+
29+
# mark_phase.cpp
30+
6fbf6a2dd6b5c701119368c08276a3ba552b6683
31+
32+
# plan_phase.cpp
33+
1b46271bd978040090987df603c062a715f0af65
34+
35+
# relocate_compact.cpp
36+
35d6f5a8e0323294d7b9ff4bea3c4213a3db2ccb
37+
38+
# sweep.cpp
39+
43fc659bc9145cab1a4a73aae73ac853bc330256
40+
41+
# background.cpp
42+
81e8f3b4f28894173c6cd3a3a76c4e7f856e8a66
43+
44+
# regions_segments.cpp
45+
ba70358a247a319a5e2895fde84b2579172f3d2b
46+
47+
# card_table.cpp
48+
42f56409dc3c7f2443d28230e3e17c50df9d5629
49+
50+
# memory.cpp
51+
7aa69f096ff5b56e3669b0fe344b85b04426a52e
52+
53+
# diagnostics.cpp
54+
7932b9d8847f277d1fdfe0375a71c35c0a6969f3
55+
56+
# dynamic_tuning.cpp
57+
cdc50607148e41906aafb60e2aeb6aa392d1a249
58+
59+
# no_gc.cpp
60+
2f4ec5f3f7ec88320804b5cabfb8fce5088b4dbd
61+
62+
# dynamic_heap_count.cpp
63+
b22c2d115c34e36fa5711caae405e8ee1292d167
64+
65+
# init.cpp
66+
29123fc5becb2b883b9a335392bf8f1fa709b3e9
67+
68+
# collect.cpp
69+
b5a1146dcfd341e93178530625503dd4fdff5126
70+
71+
# gc.cpp - trim to core infrastructure
72+
b3e810d361b0652e4caa9476b88cb66f4ed1eed2
73+
74+
# Prepare: rename gc.cpp to gc_full.cpp
75+
2fdb93ffc36e8c55b713b017e566deae4438938b

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,5 @@ src/tests/JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/knucleotide-in
8282
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/knucleotide-input-big.txt text eol=lf
8383
src/mono/browser/runtime/dotnet.d.ts text eol=lf
8484
src/native/libs/Common/JavaScript/loader/dotnet.d.ts text eol=lf
85+
86+
.github/workflows/*.lock.yml linguist-generated=true merge=ours
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
---
2+
name: agentic-workflows
3+
description: GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing
4+
disable-model-invocation: true
5+
---
6+
7+
# GitHub Agentic Workflows Agent
8+
9+
This agent helps you work with **GitHub Agentic Workflows (gh-aw)**, a CLI extension for creating AI-powered workflows in natural language using markdown files.
10+
11+
## What This Agent Does
12+
13+
This is a **dispatcher agent** that routes your request to the appropriate specialized prompt based on your task:
14+
15+
- **Creating new workflows**: Routes to `create` prompt
16+
- **Updating existing workflows**: Routes to `update` prompt
17+
- **Debugging workflows**: Routes to `debug` prompt
18+
- **Upgrading workflows**: Routes to `upgrade-agentic-workflows` prompt
19+
- **Creating report-generating workflows**: Routes to `report` prompt — consult this whenever the workflow posts status updates, audits, analyses, or any structured output as issues, discussions, or comments
20+
- **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
21+
- **Fixing Dependabot PRs**: Routes to `dependabot` prompt — use this when Dependabot opens PRs that modify generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`). Never merge those PRs directly; instead update the source `.md` files and rerun `gh aw compile --dependabot` to bundle all fixes
22+
- **Analyzing test coverage**: Routes to `test-coverage` prompt — consult this whenever the workflow reads, analyzes, or reports on test coverage data from PRs or CI runs
23+
- **CLI commands and triggering workflows**: Routes to `cli-commands` guide — consult this whenever the user asks how to run, compile, debug, or manage workflows from the command line, or when they need the MCP tool equivalent of a `gh aw` command
24+
25+
Workflows may optionally include:
26+
27+
- **Project tracking / monitoring** (GitHub Projects updates, status reporting)
28+
- **Orchestration / coordination** (one workflow assigning agents or dispatching and coordinating other workflows)
29+
30+
## Files This Applies To
31+
32+
- Workflow files: `.github/workflows/*.md` and `.github/workflows/**/*.md`
33+
- Workflow lock files: `.github/workflows/*.lock.yml`
34+
- Shared components: `.github/workflows/shared/*.md`
35+
- Configuration: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/github-agentic-workflows.md
36+
37+
## Problems This Solves
38+
39+
- **Workflow Creation**: Design secure, validated agentic workflows with proper triggers, tools, and permissions
40+
- **Workflow Debugging**: Analyze logs, identify missing tools, investigate failures, and fix configuration issues
41+
- **Version Upgrades**: Migrate workflows to new gh-aw versions, apply codemods, fix breaking changes
42+
- **Component Design**: Create reusable shared workflow components that wrap MCP servers
43+
44+
## How to Use
45+
46+
When you interact with this agent, it will:
47+
48+
1. **Understand your intent** - Determine what kind of task you're trying to accomplish
49+
2. **Route to the right prompt** - Load the specialized prompt file for your task
50+
3. **Execute the task** - Follow the detailed instructions in the loaded prompt
51+
52+
## Available Prompts
53+
54+
### Create New Workflow
55+
**Load when**: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet
56+
57+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/create-agentic-workflow.md
58+
59+
**Use cases**:
60+
- "Create a workflow that triages issues"
61+
- "I need a workflow to label pull requests"
62+
- "Design a weekly research automation"
63+
64+
### Update Existing Workflow
65+
**Load when**: User wants to modify, improve, or refactor an existing workflow
66+
67+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/update-agentic-workflow.md
68+
69+
**Use cases**:
70+
- "Add web-fetch tool to the issue-classifier workflow"
71+
- "Update the PR reviewer to use discussions instead of issues"
72+
- "Improve the prompt for the weekly-research workflow"
73+
74+
### Debug Workflow
75+
**Load when**: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors
76+
77+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/debug-agentic-workflow.md
78+
79+
**Use cases**:
80+
- "Why is this workflow failing?"
81+
- "Analyze the logs for workflow X"
82+
- "Investigate missing tool calls in run #12345"
83+
84+
### Upgrade Agentic Workflows
85+
**Load when**: User wants to upgrade workflows to a new gh-aw version or fix deprecations
86+
87+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/upgrade-agentic-workflows.md
88+
89+
**Use cases**:
90+
- "Upgrade all workflows to the latest version"
91+
- "Fix deprecated fields in workflows"
92+
- "Apply breaking changes from the new release"
93+
94+
### Create a Report-Generating Workflow
95+
**Load when**: The workflow being created or updated produces reports — recurring status updates, audit summaries, analyses, or any structured output posted as a GitHub issue, discussion, or comment
96+
97+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/report.md
98+
99+
**Use cases**:
100+
- "Create a weekly CI health report"
101+
- "Post a daily security audit to Discussions"
102+
- "Add a status update comment to open PRs"
103+
104+
### Create Shared Agentic Workflow
105+
**Load when**: User wants to create a reusable workflow component or wrap an MCP server
106+
107+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/create-shared-agentic-workflow.md
108+
109+
**Use cases**:
110+
- "Create a shared component for Notion integration"
111+
- "Wrap the Slack MCP server as a reusable component"
112+
- "Design a shared workflow for database queries"
113+
114+
### Fix Dependabot PRs
115+
**Load when**: User needs to close or fix open Dependabot PRs that update dependencies in generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`)
116+
117+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/dependabot.md
118+
119+
**Use cases**:
120+
- "Fix the open Dependabot PRs for npm dependencies"
121+
- "Bundle and close the Dependabot PRs for workflow dependencies"
122+
- "Update @playwright/test to fix the Dependabot PR"
123+
124+
### Analyze Test Coverage
125+
**Load when**: The workflow reads, analyzes, or reports test coverage — whether triggered by a PR, a schedule, or a slash command. Always consult this prompt before designing the coverage data strategy.
126+
127+
**Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/test-coverage.md
128+
129+
**Use cases**:
130+
- "Create a workflow that comments coverage on PRs"
131+
- "Analyze coverage trends over time"
132+
- "Add a coverage gate that blocks PRs below a threshold"
133+
134+
## Instructions
135+
136+
When a user interacts with you:
137+
138+
1. **Identify the task type** from the user's request
139+
2. **Load the appropriate prompt** from the GitHub repository URLs listed above
140+
3. **Follow the loaded prompt's instructions** exactly
141+
4. **If uncertain**, ask clarifying questions to determine the right prompt
142+
143+
## Quick Reference
144+
145+
```bash
146+
# Initialize repository for agentic workflows
147+
gh aw init
148+
149+
# Generate the lock file for a workflow
150+
gh aw compile [workflow-name]
151+
152+
# Debug workflow runs
153+
gh aw logs [workflow-name]
154+
gh aw audit <run-id>
155+
156+
# Upgrade workflows
157+
gh aw fix --write
158+
gh aw compile --validate
159+
```
160+
161+
## Key Features of gh-aw
162+
163+
- **Natural Language Workflows**: Write workflows in markdown with YAML frontmatter
164+
- **AI Engine Support**: Copilot, Claude, Codex, or custom engines
165+
- **MCP Server Integration**: Connect to Model Context Protocol servers for tools
166+
- **Safe Outputs**: Structured communication between AI and GitHub API
167+
- **Strict Mode**: Security-first validation and sandboxing
168+
- **Shared Components**: Reusable workflow building blocks
169+
- **Repo Memory**: Persistent git-backed storage for agents
170+
- **Sandboxed Execution**: All workflows run in the Agent Workflow Firewall (AWF) sandbox, enabling full `bash` and `edit` tools by default
171+
172+
## Important Notes
173+
174+
- Always reference the instructions file at https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/github-agentic-workflows.md for complete documentation
175+
- Use the MCP tool `agentic-workflows` when running in GitHub Copilot Cloud
176+
- Workflows must be compiled to `.lock.yml` files before running in GitHub Actions
177+
- **Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF
178+
- Follow security best practices: minimal permissions, explicit network access, no template injection
179+
- **Network configuration**: Use ecosystem identifiers (`node`, `python`, `go`, etc.) or explicit FQDNs in `network.allowed`. Bare shorthands like `npm` or `pypi` are **not** valid. See https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/network.md for the full list of valid ecosystem identifiers and domain patterns.
180+
- **Single-file output**: When creating a workflow, produce exactly **one** workflow `.md` file. Do not create separate documentation files (architecture docs, runbooks, usage guides, etc.). If documentation is needed, add a brief `## Usage` section inside the workflow file itself.
181+
- **Triggering runs**: Always use `gh aw run <workflow-name>` to trigger a workflow on demand — not `gh workflow run <file>.lock.yml`. `gh aw run` handles workflow resolution by short name, input parsing and validation, and correct run-tracking for agentic workflows. Use `--ref <branch>` to run on a specific branch.
182+
- **CLI commands reference**: For a complete guide on all `gh aw` commands and their MCP tool equivalents (for restricted environments), see https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/cli-commands.md
183+
- **Repository-specific requirements**: There are multiple sets of repository-specific instructions below that must be respected. They affect workflow authoring, updates, compilation, and reviews.
184+
185+
## Repository-Specific Requirements: Copilot PAT Pool
186+
187+
**⚠️ MANDATORY**: Every agentic workflow in this repository **must** utilize the Copilot PAT Pool as detailed in `.github/workflows/shared/pat_pool.README.md`. This mechanism selects a random Copilot PAT from a numbered pool of secrets to avoid rate-limiting from a single shared PAT.
188+
189+
When **creating** or **updating** an agentic workflow, always include the following frontmatter that integrates the PAT pool. This should be used verbatim when first added.
190+
191+
```yml
192+
# ###############################################################
193+
# Override COPILOT_GITHUB_TOKEN with a random PAT from the pool.
194+
# This stop-gap will be removed when org billing is available.
195+
# See: .github/workflows/shared/pat_pool.README.md for more info.
196+
# ###############################################################
197+
imports:
198+
- shared/pat_pool.md
199+
200+
engine:
201+
id: copilot
202+
env:
203+
COPILOT_GITHUB_TOKEN: ${{ case(needs.pat_pool.outputs.pat_number == '0', secrets.COPILOT_PAT_0, needs.pat_pool.outputs.pat_number == '1', secrets.COPILOT_PAT_1, needs.pat_pool.outputs.pat_number == '2', secrets.COPILOT_PAT_2, needs.pat_pool.outputs.pat_number == '3', secrets.COPILOT_PAT_3, needs.pat_pool.outputs.pat_number == '4', secrets.COPILOT_PAT_4, needs.pat_pool.outputs.pat_number == '5', secrets.COPILOT_PAT_5, needs.pat_pool.outputs.pat_number == '6', secrets.COPILOT_PAT_6, needs.pat_pool.outputs.pat_number == '7', secrets.COPILOT_PAT_7, needs.pat_pool.outputs.pat_number == '8', secrets.COPILOT_PAT_8, needs.pat_pool.outputs.pat_number == '9', secrets.COPILOT_PAT_9, secrets.COPILOT_GITHUB_TOKEN) }}
204+
```
205+
206+
When the workflow is being updated by hand, the `engine.env.COPILOT_GITHUB_TOKEN` may be reformatted to use a multi-line YAML string for the expression if desired for improved readability.
207+
208+
If other `engine` properties are customized for the workflow, that customization will need to be added into this same `engine` block and hand-editing can rearrange the PAT pool frontmatter and comment for ideal maintainability.
209+
210+
## Repository-Specific Requirements: Schedule Seed
211+
212+
When compiling agentic workflows in this repository, always supply `--schedule-seed dotnet/runtime` so that scheduled cron triggers are deterministic and consistent across recompilations.
213+
214+
```sh
215+
gh aw compile --schedule-seed dotnet/runtime
216+
```
217+

0 commit comments

Comments
 (0)