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
22 changes: 12 additions & 10 deletions .github/workflows/issue-investigation.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 24 additions & 7 deletions .github/workflows/issue-investigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,23 @@ safe-outputs:
auto-close-issue: false
fallback-as-issue: false
allowed-branches: ["investigate/**"]
# Pushes with GITHUB_TOKEN do not start CI; a maintainer reviews the draft before running it.
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token-for-extra-empty-commit: ${{ '' }}
Comment thread
theelliotm marked this conversation as resolved.
Resolved
# Source and data files only: no CI scripts, e2e configs, or build/package files.
allowed-files:
- "docs/**"
- "tests/**"
- "sdk/node/tests/**"
- "sdk/dotnet/Microsoft.Mxc.Sdk.Tests/**"
- "docs/*.md"
- "docs/**/*.md"
Comment thread
theelliotm marked this conversation as resolved.
Resolved
- "tests/*.md"
- "tests/**/*.md"
- "tests/policy/*.json"
- "tests/policy/**/*.json"
- "tests/fixtures/*.json"
- "tests/fixtures/**/*.json"
- "sdk/node/tests/*.ts"
- "sdk/node/tests/**/*.ts"
- "sdk/dotnet/Microsoft.Mxc.Sdk.Tests/*.cs"
- "sdk/dotnet/Microsoft.Mxc.Sdk.Tests/**/*.cs"
protected-files: blocked
timeout-minutes: 20
max-ai-credits: 1000
Expand Down Expand Up @@ -69,8 +81,8 @@ assess, classify, request diagnostics, create a PR, or repeat sensitive details.

For a non-security issue touching credentials, permissions, host isolation,
containment behavior, schemas, generated SDK artifacts, production code, CI,
dependencies, build scripts, versioning, releases, or publishing, investigate
and report normally but do not create a pull request.
test scripts, dependencies, build scripts, versioning, releases, or publishing,
investigate and report normally but do not create a pull request.

## Investigation

Expand Down Expand Up @@ -104,7 +116,12 @@ and report normally but do not create a pull request.
## Draft PR rule

Create one draft pull request only when the fix is documentation- or test-only,
small, unambiguous, and every changed path matches the safe-output allowlist.
small, unambiguous, and every changed path matches the safe-output allowlist:
Markdown under `docs/` or `tests/`, JSON under `tests/policy/` or
`tests/fixtures/`, Node SDK test `.ts` files, or .NET SDK test `.cs` files.
Comment thread
theelliotm marked this conversation as resolved.
Resolved
Files named `README.md`, `CHANGELOG.md`, `CONTRIBUTING.md`, `SECURITY.md`,
`CODE_OF_CONDUCT.md`, `DESIGN.md`, `AGENTS.md`, `CLAUDE.md`, or `GEMINI.md` are
protected in every directory and cannot be changed.
Run relevant formatting, linting, and targeted tests first, and record the exact
commands and outcomes in the PR body. Otherwise do not create a PR: state the
reason in the investigation comment. If a tool or inspection fails, name the
Expand Down
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ that outcome.
For a small, unambiguous documentation or test-only change, it may also create
one draft PR. It never merges, releases, assigns owners, changes labels, or
updates an existing PR. It does not create PRs for production code, schemas,
generated SDK files, containment behavior, CI, dependencies, versioning, or
security-sensitive work.
generated SDK files, containment behavior, CI, test scripts or end-to-end
configs, build or project files, dependencies, versioning, security-sensitive
work, or files with protected names such as `README.md` in any folder. CI does
not start automatically on its draft PR.
After reviewing the changes, close and reopen the PR or push a commit to it to
run CI.

Do not use `/investigate` for a security report. Follow
[SECURITY.md](./SECURITY.md) instead.
Expand Down
12 changes: 4 additions & 8 deletions scripts/tests/w365-fixtures.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,10 @@ test("the validation runbook dispatches the canonical workflow with a supported
assert.ok(section);
const example = section[1].match(/```powershell\r?\n([\s\S]*?)```/);
assert.ok(example, "dispatch the existing workflow rather than copying its job graph");
const result = spawnSync("pwsh", ["-NoLogo", "-NoProfile", "-Command", `
$ErrorActionPreference = 'Stop'
function gh { ConvertTo-Json -Compress -InputObject @($args) }
${example[1]}
`], { encoding: "utf8", timeout: 30_000 });
assert.ifError(result.error);
assert.equal(result.status, 0, result.stdout + result.stderr);
const args = JSON.parse(result.stdout);
const command = example[1].replace(/`\r?\n/g, " ").trim();
assert.ok(!/[\r\n;|&$`(){}<>]/.test(command), `expected one literal command: ${command}`);
const [program, ...args] = command.split(/\s+/);
assert.equal(program, "gh");
assert.deepEqual(args.slice(0, 3), ["workflow", "run", "Validation.Tests.Scheduled.yml"]);
const value = flag => {
const index = args.indexOf(flag);
Expand Down
Loading