From 3576d3a234a1b5d3c7806f147582565dfe61cd5b Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 1 Jun 2026 22:13:21 +0000
Subject: [PATCH 1/3] Initial plan
From 189698da2aeaaf54398e7e971eb6a6cf3f0ded43 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 1 Jun 2026 22:30:05 +0000
Subject: [PATCH 2/3] workflow: dedupe lint-monster function-length tracking
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
---
.github/workflows/lint-monster.lock.yml | 107 ++++++++++++++++++++----
.github/workflows/lint-monster.md | 34 ++++++--
2 files changed, 115 insertions(+), 26 deletions(-)
diff --git a/.github/workflows/lint-monster.lock.yml b/.github/workflows/lint-monster.lock.yml
index 3b2d93da048..547cea01639 100644
--- a/.github/workflows/lint-monster.lock.yml
+++ b/.github/workflows/lint-monster.lock.yml
@@ -1,4 +1,4 @@
-# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"87ccd9f961bd4a8b98f36d84bdfe534303b7ea9c01496c378599345ef2a53773","body_hash":"ee546e4cc7d52205784d1120f06ad1961cb7e24c94b174274312e5a414aac2b1","strict":true,"agent_id":"copilot","agent_model":"claude-haiku-4.5"}
+# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"911070ed786676ae9688d421c26749941d9d5d248c0ff5e3464c171791679139","body_hash":"06a42280e1c6e723d84c8bf63b258047b66ca8c3bdf5b44828f456efabcc17c3","strict":true,"agent_id":"copilot","agent_model":"claude-haiku-4.5"}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_AGENT_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GH_AW_OTEL_GRAFANA_AUTHORIZATION","GH_AW_OTEL_GRAFANA_ENDPOINT","GH_AW_OTEL_SENTRY_AUTHORIZATION","GH_AW_OTEL_SENTRY_ENDPOINT","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.58"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.58"},{"image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.25.58"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.58"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.22"},{"image":"ghcr.io/github/github-mcp-server:v1.1.0"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]}
# ___ _ _
# / _ \ | | (_)
@@ -205,20 +205,20 @@ jobs:
run: |
bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh"
{
- cat << 'GH_AW_PROMPT_bb87a6b8728ce09a_EOF'
+ cat << 'GH_AW_PROMPT_7b14ce021264c33c_EOF'
- GH_AW_PROMPT_bb87a6b8728ce09a_EOF
+ GH_AW_PROMPT_7b14ce021264c33c_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md"
- cat << 'GH_AW_PROMPT_bb87a6b8728ce09a_EOF'
+ cat << 'GH_AW_PROMPT_7b14ce021264c33c_EOF'
- Tools: create_issue(max:3), create_discussion, assign_to_agent(max:3), missing_tool, missing_data, noop
+ Tools: create_issue(max:3), close_issue(max:10), update_issue(max:10), create_discussion, assign_to_agent(max:3), missing_tool, missing_data, noop
- GH_AW_PROMPT_bb87a6b8728ce09a_EOF
+ GH_AW_PROMPT_7b14ce021264c33c_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md"
- cat << 'GH_AW_PROMPT_bb87a6b8728ce09a_EOF'
+ cat << 'GH_AW_PROMPT_7b14ce021264c33c_EOF'
The following GitHub context information is available for this workflow:
{{#if github.actor}}
@@ -247,13 +247,13 @@ jobs:
{{/if}}
- GH_AW_PROMPT_bb87a6b8728ce09a_EOF
+ GH_AW_PROMPT_7b14ce021264c33c_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md"
- cat << 'GH_AW_PROMPT_bb87a6b8728ce09a_EOF'
+ cat << 'GH_AW_PROMPT_7b14ce021264c33c_EOF'
{{#runtime-import .github/workflows/shared/otlp.md}}
{{#runtime-import .github/workflows/lint-monster.md}}
- GH_AW_PROMPT_bb87a6b8728ce09a_EOF
+ GH_AW_PROMPT_7b14ce021264c33c_EOF
} > "$GH_AW_PROMPT"
- name: Interpolate variables and render templates
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
@@ -479,17 +479,19 @@ jobs:
mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs"
mkdir -p /tmp/gh-aw/safeoutputs
mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs
- cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_774d43afd534f14d_EOF'
- {"assign_to_agent":{"allowed":["copilot"],"max":3,"target":"*"},"create_discussion":{"category":"reports","close_older_discussions":true,"expires":48,"fallback_to_issue":true,"max":1,"title_prefix":"[lint-monster] "},"create_issue":{"expires":168,"labels":["automation","lint","cookie"],"max":3,"title_prefix":"[lint-monster] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{}}
- GH_AW_SAFE_OUTPUTS_CONFIG_774d43afd534f14d_EOF
+ cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_6bfaa5d9351f175f_EOF'
+ {"assign_to_agent":{"allowed":["copilot"],"max":3,"target":"*"},"close_issue":{"max":10,"required_title_prefix":"[lint-monster] "},"create_discussion":{"category":"reports","close_older_discussions":true,"expires":48,"fallback_to_issue":true,"max":1,"title_prefix":"[lint-monster] "},"create_issue":{"expires":168,"labels":["automation","lint","cookie"],"max":3,"title_prefix":"[lint-monster] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{},"update_issue":{"allow_body":true,"max":10,"title_prefix":"[lint-monster] "}}
+ GH_AW_SAFE_OUTPUTS_CONFIG_6bfaa5d9351f175f_EOF
- name: Generate Safe Outputs Tools
env:
GH_AW_TOOLS_META_JSON: |
{
"description_suffixes": {
"assign_to_agent": " CONSTRAINTS: Maximum 3 issue(s) can be assigned to agent.",
+ "close_issue": " CONSTRAINTS: Maximum 10 issue(s) can be closed. Only issues with title prefix \"[lint-monster] \" can be closed.",
"create_discussion": " CONSTRAINTS: Maximum 1 discussion(s) can be created. Title will be prefixed with \"[lint-monster] \". Discussions will be created in category \"reports\".",
- "create_issue": " CONSTRAINTS: Maximum 3 issue(s) can be created. Title will be prefixed with \"[lint-monster] \". Labels [\"automation\" \"lint\" \"cookie\"] will be automatically added."
+ "create_issue": " CONSTRAINTS: Maximum 3 issue(s) can be created. Title will be prefixed with \"[lint-monster] \". Labels [\"automation\" \"lint\" \"cookie\"] will be automatically added.",
+ "update_issue": " CONSTRAINTS: Maximum 10 issue(s) can be updated. The target issue title must start with \"[lint-monster] \"."
},
"repo_params": {},
"dynamic_tools": []
@@ -521,6 +523,23 @@ jobs:
},
"customValidation": "requiresOneOf:issue_number,pull_number"
},
+ "close_issue": {
+ "defaultMax": 1,
+ "fields": {
+ "body": {
+ "type": "string",
+ "sanitize": true,
+ "maxLength": 65000
+ },
+ "issue_number": {
+ "optionalPositiveInteger": true
+ },
+ "repo": {
+ "type": "string",
+ "maxLength": 256
+ }
+ }
+ },
"create_discussion": {
"defaultMax": 1,
"fields": {
@@ -656,6 +675,60 @@ jobs:
"maxLength": 1024
}
}
+ },
+ "update_issue": {
+ "defaultMax": 1,
+ "fields": {
+ "assignees": {
+ "type": "array",
+ "itemType": "string",
+ "itemSanitize": true,
+ "itemMaxLength": 39
+ },
+ "body": {
+ "type": "string",
+ "sanitize": true,
+ "maxLength": 65000
+ },
+ "issue_number": {
+ "issueOrPRNumber": true
+ },
+ "labels": {
+ "type": "array",
+ "itemType": "string",
+ "itemSanitize": true,
+ "itemMaxLength": 128
+ },
+ "milestone": {
+ "optionalPositiveInteger": true
+ },
+ "operation": {
+ "type": "string",
+ "enum": [
+ "replace",
+ "append",
+ "prepend",
+ "replace-island"
+ ]
+ },
+ "repo": {
+ "type": "string",
+ "maxLength": 256
+ },
+ "status": {
+ "type": "string",
+ "enum": [
+ "open",
+ "closed"
+ ]
+ },
+ "title": {
+ "type": "string",
+ "sanitize": true,
+ "maxLength": 128
+ }
+ },
+ "customValidation": "requiresOneOf:status,title,body"
}
}
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
@@ -742,7 +815,7 @@ jobs:
mkdir -p /home/runner/.copilot
GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node)
- cat << GH_AW_MCP_CONFIG_d6ad60524c06e562_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
+ cat << GH_AW_MCP_CONFIG_787a40f82138194d_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
{
"mcpServers": {
"safeoutputs": {
@@ -772,7 +845,7 @@ jobs:
}
}
}
- GH_AW_MCP_CONFIG_d6ad60524c06e562_EOF
+ GH_AW_MCP_CONFIG_787a40f82138194d_EOF
- name: Mount MCP servers as CLIs
id: mount-mcp-clis
continue-on-error: true
@@ -1543,7 +1616,7 @@ jobs:
GH_AW_ALLOWED_DOMAINS: "*.grafana.net,*.sentry.io,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_API_URL: ${{ github.api_url }}
- GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"assign_to_agent\":{\"allowed\":[\"copilot\"],\"max\":3,\"target\":\"*\"},\"create_discussion\":{\"category\":\"reports\",\"close_older_discussions\":true,\"expires\":48,\"fallback_to_issue\":true,\"max\":1,\"title_prefix\":\"[lint-monster] \"},\"create_issue\":{\"expires\":168,\"labels\":[\"automation\",\"lint\",\"cookie\"],\"max\":3,\"title_prefix\":\"[lint-monster] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"report_incomplete\":{}}"
+ GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"assign_to_agent\":{\"allowed\":[\"copilot\"],\"max\":3,\"target\":\"*\"},\"close_issue\":{\"max\":10,\"required_title_prefix\":\"[lint-monster] \"},\"create_discussion\":{\"category\":\"reports\",\"close_older_discussions\":true,\"expires\":48,\"fallback_to_issue\":true,\"max\":1,\"title_prefix\":\"[lint-monster] \"},\"create_issue\":{\"expires\":168,\"labels\":[\"automation\",\"lint\",\"cookie\"],\"max\":3,\"title_prefix\":\"[lint-monster] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"report_incomplete\":{},\"update_issue\":{\"allow_body\":true,\"max\":10,\"title_prefix\":\"[lint-monster] \"}}"
GH_AW_ASSIGN_TO_AGENT_TOKEN: ${{ secrets.GH_AW_AGENT_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
with:
github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/lint-monster.md b/.github/workflows/lint-monster.md
index 685b52d3c47..4cbc2be02c4 100644
--- a/.github/workflows/lint-monster.md
+++ b/.github/workflows/lint-monster.md
@@ -57,6 +57,12 @@ safe-outputs:
title-prefix: "[lint-monster] "
labels: [automation, lint, cookie]
max: 3
+ close-issue:
+ max: 10
+ required-title-prefix: "[lint-monster] "
+ update-issue:
+ max: 10
+ title-prefix: "[lint-monster] "
assign-to-agent:
max: 3
target: "*"
@@ -108,21 +114,31 @@ Convert fused guidance into clear, actionable instructions that Copilot can exec
## Required flow
1. If `/tmp/gh-aw/agent/lint-clean.flag` exists, call `noop` and stop.
-2. Group findings from `/tmp/gh-aw/agent/lint-diagnostics.txt` into **at most three** distinct sets (for example by subsystem/path prefix).
-3. For each selected group:
- - Create one issue summarizing findings (paths, representative diagnostics, expected outcome).
+2. Group findings from `/tmp/gh-aw/agent/lint-diagnostics.txt` into **at most three** distinct sets by root cause first, then subsystem/path prefix when helpful.
+3. Treat all `largefunc` / long-function / function-length findings in `pkg/workflow` and `pkg/cli` as **one shared tracking topic** named `function-length refactoring`.
+ - Do **not** open separate issues for `pkg/workflow`, `pkg/cli`, "part 1 / part 2", or differing count snapshots of the same function-length backlog.
+ - Use the current lint run as the single source of truth for the current function-length finding count.
+ - Search open and recent closed `lint-monster` issues for matching function-length tracking work before creating anything new.
+ - Pick one authoritative issue (prefer an existing open issue if it already tracks the same backlog); otherwise create one new epic-style issue.
+ - If an authoritative issue already exists, use `update_issue` to refresh it with the current count, affected paths, and a checklist of next slices to refactor.
+ - For any older open duplicates that cover the same function-length backlog, close them with `close_issue` using a pointer comment to the authoritative issue and `state_reason: "duplicate"`.
+4. For each selected group:
+ - Create or update one issue summarizing findings (paths, representative diagnostics, expected outcome).
- Include a concise remediation checklist using fused skill guidance.
- - Assign the created issue to Copilot using `assign_to_agent`.
-4. If at least one assignment succeeded, create one discussion report containing:
+ - For the `function-length refactoring` group, explicitly mention the current authoritative count and list any duplicate issues that were linked/closed.
+ - Only assign a Copilot agent when you created a new issue that needs execution work right now; do not create a fresh assignment just to duplicate an already-open tracking epic.
+5. If at least one assignment succeeded **or** you updated/closed an existing function-length tracking issue, create one discussion report containing:
- Daily lint scan summary
- Group definitions and finding counts
- - Issues created and agent assignments
+ - Issues created or updated, plus any duplicate issues closed
+ - Agent assignments, if any
- Any groups skipped and why
-5. If no assignments were made, call `noop` with a short reason.
+6. If no assignments were made and no existing tracking issue was updated, call `noop` with a short reason.
## Output rules
- Launch **no more than three** agent sessions total.
- Never assign the same group twice.
-- Always use safe outputs for issue creation, assignment, and discussion creation.
-- Final action must be `create_discussion` when agents were launched, otherwise `noop`.
+- Keep exactly one authoritative open issue for the shared `function-length refactoring` backlog.
+- Always use safe outputs for issue creation, issue updates, comments, assignment, and discussion creation.
+- Final action must be `create_discussion` when agents were launched or when existing function-length tracking issues were updated/closed; otherwise `noop`.
From dadc3f66ce0b6c1681c112671efbc9753b11fa16 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 1 Jun 2026 22:33:58 +0000
Subject: [PATCH 3/3] workflow: tighten lint-monster duplicate handling
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
---
.github/workflows/lint-monster.lock.yml | 30 ++++++++++++-------------
.github/workflows/lint-monster.md | 7 +++---
2 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/.github/workflows/lint-monster.lock.yml b/.github/workflows/lint-monster.lock.yml
index 547cea01639..7ee47aa65f7 100644
--- a/.github/workflows/lint-monster.lock.yml
+++ b/.github/workflows/lint-monster.lock.yml
@@ -1,4 +1,4 @@
-# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"911070ed786676ae9688d421c26749941d9d5d248c0ff5e3464c171791679139","body_hash":"06a42280e1c6e723d84c8bf63b258047b66ca8c3bdf5b44828f456efabcc17c3","strict":true,"agent_id":"copilot","agent_model":"claude-haiku-4.5"}
+# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"a86ef62e6d8cf2e8e4a8aa4d1e283c08b0d857f3752d0770b304c3b5add55f1c","body_hash":"b20ce5e3f74590f7862e4117c98b61d92695bf9162f9669c662618b859aaf24d","strict":true,"agent_id":"copilot","agent_model":"claude-haiku-4.5"}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_AGENT_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GH_AW_OTEL_GRAFANA_AUTHORIZATION","GH_AW_OTEL_GRAFANA_ENDPOINT","GH_AW_OTEL_SENTRY_AUTHORIZATION","GH_AW_OTEL_SENTRY_ENDPOINT","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.58"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.58"},{"image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.25.58"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.58"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.22"},{"image":"ghcr.io/github/github-mcp-server:v1.1.0"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]}
# ___ _ _
# / _ \ | | (_)
@@ -205,20 +205,20 @@ jobs:
run: |
bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh"
{
- cat << 'GH_AW_PROMPT_7b14ce021264c33c_EOF'
+ cat << 'GH_AW_PROMPT_d3f030b31ab545a4_EOF'
- GH_AW_PROMPT_7b14ce021264c33c_EOF
+ GH_AW_PROMPT_d3f030b31ab545a4_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md"
- cat << 'GH_AW_PROMPT_7b14ce021264c33c_EOF'
+ cat << 'GH_AW_PROMPT_d3f030b31ab545a4_EOF'
Tools: create_issue(max:3), close_issue(max:10), update_issue(max:10), create_discussion, assign_to_agent(max:3), missing_tool, missing_data, noop
- GH_AW_PROMPT_7b14ce021264c33c_EOF
+ GH_AW_PROMPT_d3f030b31ab545a4_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md"
- cat << 'GH_AW_PROMPT_7b14ce021264c33c_EOF'
+ cat << 'GH_AW_PROMPT_d3f030b31ab545a4_EOF'
The following GitHub context information is available for this workflow:
{{#if github.actor}}
@@ -247,13 +247,13 @@ jobs:
{{/if}}
- GH_AW_PROMPT_7b14ce021264c33c_EOF
+ GH_AW_PROMPT_d3f030b31ab545a4_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/cli_proxy_with_safeoutputs_prompt.md"
- cat << 'GH_AW_PROMPT_7b14ce021264c33c_EOF'
+ cat << 'GH_AW_PROMPT_d3f030b31ab545a4_EOF'
{{#runtime-import .github/workflows/shared/otlp.md}}
{{#runtime-import .github/workflows/lint-monster.md}}
- GH_AW_PROMPT_7b14ce021264c33c_EOF
+ GH_AW_PROMPT_d3f030b31ab545a4_EOF
} > "$GH_AW_PROMPT"
- name: Interpolate variables and render templates
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
@@ -479,9 +479,9 @@ jobs:
mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs"
mkdir -p /tmp/gh-aw/safeoutputs
mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs
- cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_6bfaa5d9351f175f_EOF'
- {"assign_to_agent":{"allowed":["copilot"],"max":3,"target":"*"},"close_issue":{"max":10,"required_title_prefix":"[lint-monster] "},"create_discussion":{"category":"reports","close_older_discussions":true,"expires":48,"fallback_to_issue":true,"max":1,"title_prefix":"[lint-monster] "},"create_issue":{"expires":168,"labels":["automation","lint","cookie"],"max":3,"title_prefix":"[lint-monster] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{},"update_issue":{"allow_body":true,"max":10,"title_prefix":"[lint-monster] "}}
- GH_AW_SAFE_OUTPUTS_CONFIG_6bfaa5d9351f175f_EOF
+ cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_732153115e8732c8_EOF'
+ {"assign_to_agent":{"allowed":["copilot"],"max":3,"target":"*"},"close_issue":{"max":10,"required_title_prefix":"[lint-monster] ","state_reason":"duplicate"},"create_discussion":{"category":"reports","close_older_discussions":true,"expires":48,"fallback_to_issue":true,"max":1,"title_prefix":"[lint-monster] "},"create_issue":{"expires":168,"labels":["automation","lint","cookie"],"max":3,"title_prefix":"[lint-monster] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{},"update_issue":{"allow_body":true,"max":10,"title_prefix":"[lint-monster] "}}
+ GH_AW_SAFE_OUTPUTS_CONFIG_732153115e8732c8_EOF
- name: Generate Safe Outputs Tools
env:
GH_AW_TOOLS_META_JSON: |
@@ -815,7 +815,7 @@ jobs:
mkdir -p /home/runner/.copilot
GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node)
- cat << GH_AW_MCP_CONFIG_787a40f82138194d_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
+ cat << GH_AW_MCP_CONFIG_bcf8c2e1c78addfb_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
{
"mcpServers": {
"safeoutputs": {
@@ -845,7 +845,7 @@ jobs:
}
}
}
- GH_AW_MCP_CONFIG_787a40f82138194d_EOF
+ GH_AW_MCP_CONFIG_bcf8c2e1c78addfb_EOF
- name: Mount MCP servers as CLIs
id: mount-mcp-clis
continue-on-error: true
@@ -1616,7 +1616,7 @@ jobs:
GH_AW_ALLOWED_DOMAINS: "*.grafana.net,*.sentry.io,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_API_URL: ${{ github.api_url }}
- GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"assign_to_agent\":{\"allowed\":[\"copilot\"],\"max\":3,\"target\":\"*\"},\"close_issue\":{\"max\":10,\"required_title_prefix\":\"[lint-monster] \"},\"create_discussion\":{\"category\":\"reports\",\"close_older_discussions\":true,\"expires\":48,\"fallback_to_issue\":true,\"max\":1,\"title_prefix\":\"[lint-monster] \"},\"create_issue\":{\"expires\":168,\"labels\":[\"automation\",\"lint\",\"cookie\"],\"max\":3,\"title_prefix\":\"[lint-monster] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"report_incomplete\":{},\"update_issue\":{\"allow_body\":true,\"max\":10,\"title_prefix\":\"[lint-monster] \"}}"
+ GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"assign_to_agent\":{\"allowed\":[\"copilot\"],\"max\":3,\"target\":\"*\"},\"close_issue\":{\"max\":10,\"required_title_prefix\":\"[lint-monster] \",\"state_reason\":\"duplicate\"},\"create_discussion\":{\"category\":\"reports\",\"close_older_discussions\":true,\"expires\":48,\"fallback_to_issue\":true,\"max\":1,\"title_prefix\":\"[lint-monster] \"},\"create_issue\":{\"expires\":168,\"labels\":[\"automation\",\"lint\",\"cookie\"],\"max\":3,\"title_prefix\":\"[lint-monster] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"report_incomplete\":{},\"update_issue\":{\"allow_body\":true,\"max\":10,\"title_prefix\":\"[lint-monster] \"}}"
GH_AW_ASSIGN_TO_AGENT_TOKEN: ${{ secrets.GH_AW_AGENT_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
with:
github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/lint-monster.md b/.github/workflows/lint-monster.md
index 4cbc2be02c4..baf21f60800 100644
--- a/.github/workflows/lint-monster.md
+++ b/.github/workflows/lint-monster.md
@@ -60,6 +60,7 @@ safe-outputs:
close-issue:
max: 10
required-title-prefix: "[lint-monster] "
+ state-reason: duplicate
update-issue:
max: 10
title-prefix: "[lint-monster] "
@@ -119,14 +120,14 @@ Convert fused guidance into clear, actionable instructions that Copilot can exec
- Do **not** open separate issues for `pkg/workflow`, `pkg/cli`, "part 1 / part 2", or differing count snapshots of the same function-length backlog.
- Use the current lint run as the single source of truth for the current function-length finding count.
- Search open and recent closed `lint-monster` issues for matching function-length tracking work before creating anything new.
- - Pick one authoritative issue (prefer an existing open issue if it already tracks the same backlog); otherwise create one new epic-style issue.
+ - Pick one authoritative issue (prefer an existing open issue if it already tracks the same backlog); otherwise create one new consolidated tracking issue.
- If an authoritative issue already exists, use `update_issue` to refresh it with the current count, affected paths, and a checklist of next slices to refactor.
- - For any older open duplicates that cover the same function-length backlog, close them with `close_issue` using a pointer comment to the authoritative issue and `state_reason: "duplicate"`.
+ - For any older open duplicates that cover the same function-length backlog, close them with `close_issue` using a pointer comment to the authoritative issue.
4. For each selected group:
- Create or update one issue summarizing findings (paths, representative diagnostics, expected outcome).
- Include a concise remediation checklist using fused skill guidance.
- For the `function-length refactoring` group, explicitly mention the current authoritative count and list any duplicate issues that were linked/closed.
- - Only assign a Copilot agent when you created a new issue that needs execution work right now; do not create a fresh assignment just to duplicate an already-open tracking epic.
+ - Only assign a Copilot agent when you created a new issue that needs execution work right now; do not create a fresh assignment just to duplicate an already-open tracking issue.
5. If at least one assignment succeeded **or** you updated/closed an existing function-length tracking issue, create one discussion report containing:
- Daily lint scan summary
- Group definitions and finding counts