Skip to content

Dispatch Issue Monster for CI incidents - #55788

Merged
nagilson merged 4 commits into
dotnet:mainfrom
nagilson:nagilson/ci-quality-monitor-dispatch-issue-monster
Aug 14, 2026
Merged

nagilson merged 4 commits into
dotnet:mainfrom
nagilson:nagilson/ci-quality-monitor-dispatch-issue-monster

Conversation

@nagilson

@nagilson nagilson commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Summary

The issue monster is immediately dispatched following the discovery of a live-build-incident.
Currently it is a limited schedule. This enables the 'fix' to be generated right after an 'incident' is detected - this is a large part of the feedback loop, because the fix can be verified in CI, ideally before an engineer is even blocked by the incident.

Interesting components:

  • The issue monster orchestrator prevents assigning issues in the same area group to try to avoid merge conflicts. I accepted the risk of merge conflicts from several different infrastructure/ci flake fixes.

  • The gh-aw API only returns the first issue number, and the temporary id map is what contains all issue numbers. We must resolve the map to allow multiple issues to be filed if there are multiple flakes, so a script was added to map the temporary ids to the actual created issue ids.

Why this approach

#55786 was the initial experiment. It triggered Issue Monster from issues.opened when a live-build-incident issue was created, but it was closed because issues created by github-actions [bot] do not trigger another workflow's issue event. Removing the issue-author restriction would not avoid that GitHub event-suppression behavior.

This change instead performs an explicit workflow_dispatch after Safe Outputs has created the issue. That avoids coupling the investigator agent prompt to Issue Monster while using one of the workflow events GitHub permits repository automation to dispatch.

Token separation

The credentials remain separated by purpose:

  • COPILOT_PAT_* is selected by pat_pool for Copilot inference.
  • GH_AW_GITHUB_TOKEN, falling back to GITHUB_TOKEN, performs the Issue Monster workflow dispatch and matches the existing orchestrator-to-assigner dispatch pattern.
  • ISSUE_MONSTER_ASSIGNMENT_TOKEN remains scoped to the issue-monster environment and is still used by Issue Monster Assigner's assign-to-agent Safe Output. This branch does not replace or broaden that assignment credential.

Validation

The complete chain succeeded on the fork:

The workflow-policy tests also require the production dispatch token fallback, and the dispatch helper covers multiple created issues and the first-created-issue fallback.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

After safe outputs create CI incident issues, dispatch Issue Monster with every created issue number using the existing workflow_dispatch entry point. Allow the github-actions bot dispatch through Issue Monster's activation gate.

Validated end to end with investigator run https://github.com/nagilson/sdk/actions/runs/31825069177, orchestrator run https://github.com/nagilson/sdk/actions/runs/31825453260, assigner run https://github.com/nagilson/sdk/actions/runs/31825738905, and created issue #170.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: f0e9fdc4-8cf7-4010-8e09-cbed86757c2f
@nagilson
nagilson force-pushed the nagilson/ci-quality-monitor-dispatch-issue-monster branch from 43238f5 to 4f8f3fa Compare August 14, 2026 18:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Dispatches newly created CI incident issues directly to Issue Monster, avoiding the scheduled queue delay.

Changes:

  • Adds deterministic dispatching for all created issues with token fallback.
  • Allows workflow-originated Issue Monster activation.
  • Adds tests and updates workflow documentation.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/issue-monster.md Allows automated workflow dispatch activation.
.github/workflows/issue-monster.lock.yml Regenerates the Issue Monster workflow.
.github/workflows/ci-quality-monitor.README.md Documents immediate dispatch behavior.
.github/workflows/ci-quality-monitor.md Dispatches Issue Monster after issue creation.
.github/workflows/ci-quality-monitor.lock.yml Regenerates the investigator workflow.
.github/ci-quality-monitor/test/workflow-policy.test.mjs Verifies dispatch policy and authentication.
.github/ci-quality-monitor/test/issue-monster-dispatch.test.mjs Tests issue collection and dispatching.
.github/ci-quality-monitor/README.md Documents the dispatch sequence.
.github/ci-quality-monitor/issue-monster-dispatch.js Implements multi-issue workflow dispatching.

Use the complete safe-output temporary ID map as the authority for whether issues were created. This avoids gating dispatch on the singular first-created issue output and safely performs no dispatches when the map is empty.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: f0e9fdc4-8cf7-4010-8e09-cbed86757c2f
@nagilson
nagilson marked this pull request as ready for review August 14, 2026 19:09
@nagilson
nagilson requested a review from a team August 14, 2026 19:10
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: b8cf6607-ad87-4194-917a-61fe89dc6b13
@nagilson
nagilson merged commit 887dc12 into dotnet:main Aug 14, 2026
19 of 22 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Aug 16, 2026

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — 2937843d Deployed Aug 14, 2026 by nagilson via pre_activation #30
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.

3 participants