From 7b9f13267fc6f26911b8e5246d0f1f1567b39ad9 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 28 Apr 2026 19:20:52 +0000
Subject: [PATCH 1/4] Initial plan
From 4fd8d02db73f5b2e83e778bc3fe1d30d3eae8a23 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 28 Apr 2026 19:34:26 +0000
Subject: [PATCH 2/4] feat: optimize workflow-health-manager to reduce token
usage by ~42%
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Add pre-agent steps to build workflow inventory and pre-load metrics
before agent starts, eliminating 4-5 turns of deterministic work
- Replace 60-line verbose dashboard template with concise 15-line skeleton
- Remove redundant "Important Guidelines" section (~30 lines)
- Remove qualitative "Success Metrics" section (~11 lines)
- Update Phase 1 to reference pre-computed /tmp/gh-aw/agent/ files
- Update Phase 2 to use pre-loaded failing-workflows.json and batch API calls
- Recompile lock file to reflect all changes
Addresses token optimization recommendations from issue:
- ~450K tokens/run from prompt trimming
- ~175K tokens/run from pre-agent discovery steps
- ~100K tokens/run from pre-loaded metrics
- ~50K tokens/run from batched API call guidance
Expected reduction: 1.84M → ~1.07M tokens/run (~42%)
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/37bfb199-ab89-4bbf-bdf8-d0a820340df1
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
---
.../workflow-health-manager.lock.yml | 33 +--
.github/workflows/workflow-health-manager.md | 189 +++++-------------
.../src/content/docs/agent-factory-status.mdx | 2 -
3 files changed, 71 insertions(+), 153 deletions(-)
diff --git a/.github/workflows/workflow-health-manager.lock.yml b/.github/workflows/workflow-health-manager.lock.yml
index d1e7a670637..313bdfaf98b 100644
--- a/.github/workflows/workflow-health-manager.lock.yml
+++ b/.github/workflows/workflow-health-manager.lock.yml
@@ -1,4 +1,4 @@
-# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"4227776f06975052b956f8bbf91a7aba77854cf8557dccef3f6b99b4125d7c69","strict":true,"agent_id":"copilot"}
+# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"695373ba26173d866759dec28441e08116dde87f8b13311b2b8e28b21cfbf754","strict":true,"agent_id":"copilot"}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","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":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"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.29","digest":"sha256:e68f37e36962dcb3f3d1de680a49bc2302cefd001b941a7dc377155ec7ce42f4","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.25.29@sha256:e68f37e36962dcb3f3d1de680a49bc2302cefd001b941a7dc377155ec7ce42f4"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.29","digest":"sha256:d1219e4110684402aabbeb5a43858f26790c9d0be210581cf3f7a521bd2c87b6","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.29@sha256:d1219e4110684402aabbeb5a43858f26790c9d0be210581cf3f7a521bd2c87b6"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.29","digest":"sha256:8a71ad9e40454051672312917e51567abfb8251d7c294d086c48f63d84e4cb53","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.25.29@sha256:8a71ad9e40454051672312917e51567abfb8251d7c294d086c48f63d84e4cb53"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.1","digest":"sha256:287fad0236959f3b3d9936ea1ef8d5b4f135ef2a5f5789713495cbbef191e60c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.1@sha256:287fad0236959f3b3d9936ea1ef8d5b4f135ef2a5f5789713495cbbef191e60c"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]}
# ___ _ _
# / _ \ | | (_)
@@ -183,21 +183,21 @@ jobs:
run: |
bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh"
{
- cat << 'GH_AW_PROMPT_d022aa0b1fb5b046_EOF'
+ cat << 'GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF'
- GH_AW_PROMPT_d022aa0b1fb5b046_EOF
+ GH_AW_PROMPT_61c8a2b9be5a4e9a_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/repo_memory_prompt.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md"
- cat << 'GH_AW_PROMPT_d022aa0b1fb5b046_EOF'
+ cat << 'GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF'
Tools: add_comment(max:15), create_issue(max:10), update_issue(max:5), missing_tool, missing_data, noop
- GH_AW_PROMPT_d022aa0b1fb5b046_EOF
+ GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md"
- cat << 'GH_AW_PROMPT_d022aa0b1fb5b046_EOF'
+ cat << 'GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF'
The following GitHub context information is available for this workflow:
{{#if __GH_AW_GITHUB_ACTOR__ }}
@@ -226,13 +226,13 @@ jobs:
{{/if}}
- GH_AW_PROMPT_d022aa0b1fb5b046_EOF
+ GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md"
- cat << 'GH_AW_PROMPT_d022aa0b1fb5b046_EOF'
+ cat << 'GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF'
{{#runtime-import .github/workflows/shared/reporting.md}}
{{#runtime-import .github/workflows/workflow-health-manager.md}}
- GH_AW_PROMPT_d022aa0b1fb5b046_EOF
+ GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF
} > "$GH_AW_PROMPT"
- name: Interpolate variables and render templates
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
@@ -378,6 +378,13 @@ jobs:
run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_gh_for_ghe.sh"
env:
GH_TOKEN: ${{ github.token }}
+ - env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ name: build-inventory
+ run: "set -euo pipefail\nmkdir -p /tmp/gh-aw/agent\n# Run compilation validation and capture output\ngh aw compile --validate 2>&1 > /tmp/gh-aw/agent/compile-validate.txt || true\n# List executable workflow files (exclude shared/ subdirectory)\nls .github/workflows/*.md 2>/dev/null > /tmp/gh-aw/agent/workflow-list.txt || true\necho \"Inventory complete: $(wc -l < /tmp/gh-aw/agent/workflow-list.txt | tr -d ' ') workflows found\"\n"
+ - name: load-metrics
+ run: "set -euo pipefail\nmkdir -p /tmp/gh-aw/agent\nMETRICS_FILE=\"/tmp/gh-aw/repo-memory/default/metrics/latest.json\"\nif [ -f \"$METRICS_FILE\" ]; then\n jq '[.workflow_runs | to_entries[]\n | select(.value.success_rate < 0.8)]\n | sort_by(.value.success_rate) | .[0:20]' \\\n \"$METRICS_FILE\" > /tmp/gh-aw/agent/failing-workflows.json 2>/dev/null \\\n || echo '[]' > /tmp/gh-aw/agent/failing-workflows.json\nelse\n echo '[]' > /tmp/gh-aw/agent/failing-workflows.json\nfi\necho \"Metrics loaded: $(jq 'length' /tmp/gh-aw/agent/failing-workflows.json) failing workflows (<80% success)\"\n"
+
# Repo memory git-based storage configuration from frontmatter processed below
- name: Clone repo-memory branch (default)
env:
@@ -449,9 +456,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_978f61274f4824b9_EOF'
+ cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_1b9079b6ac2314eb_EOF'
{"add_comment":{"max":15},"create_issue":{"expires":24,"group":true,"labels":["cookie"],"max":10},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"push_repo_memory":{"memories":[{"dir":"/tmp/gh-aw/repo-memory/default","id":"default","max_file_count":100,"max_file_size":102400,"max_patch_size":51200}]},"report_incomplete":{},"update_issue":{"allow_body":true,"max":5}}
- GH_AW_SAFE_OUTPUTS_CONFIG_978f61274f4824b9_EOF
+ GH_AW_SAFE_OUTPUTS_CONFIG_1b9079b6ac2314eb_EOF
- name: Write Safe Outputs Tools
env:
GH_AW_TOOLS_META_JSON: |
@@ -728,7 +735,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_65cf370b1871bead_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
+ cat << GH_AW_MCP_CONFIG_664a17b11ea4eb3a_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
{
"mcpServers": {
"github": {
@@ -769,7 +776,7 @@ jobs:
"payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}"
}
}
- GH_AW_MCP_CONFIG_65cf370b1871bead_EOF
+ GH_AW_MCP_CONFIG_664a17b11ea4eb3a_EOF
- name: Mount MCP servers as CLIs
id: mount-mcp-clis
continue-on-error: true
diff --git a/.github/workflows/workflow-health-manager.md b/.github/workflows/workflow-health-manager.md
index d31ef75892b..5098a232fd3 100644
--- a/.github/workflows/workflow-health-manager.md
+++ b/.github/workflows/workflow-health-manager.md
@@ -30,6 +30,33 @@ safe-outputs:
timeout-minutes: 30
imports:
- shared/reporting.md
+steps:
+ - name: build-inventory
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ set -euo pipefail
+ mkdir -p /tmp/gh-aw/agent
+ # Run compilation validation and capture output
+ gh aw compile --validate 2>&1 > /tmp/gh-aw/agent/compile-validate.txt || true
+ # List executable workflow files (exclude shared/ subdirectory)
+ ls .github/workflows/*.md 2>/dev/null > /tmp/gh-aw/agent/workflow-list.txt || true
+ echo "Inventory complete: $(wc -l < /tmp/gh-aw/agent/workflow-list.txt | tr -d ' ') workflows found"
+ - name: load-metrics
+ run: |
+ set -euo pipefail
+ mkdir -p /tmp/gh-aw/agent
+ METRICS_FILE="/tmp/gh-aw/repo-memory/default/metrics/latest.json"
+ if [ -f "$METRICS_FILE" ]; then
+ jq '[.workflow_runs | to_entries[]
+ | select(.value.success_rate < 0.8)]
+ | sort_by(.value.success_rate) | .[0:20]' \
+ "$METRICS_FILE" > /tmp/gh-aw/agent/failing-workflows.json 2>/dev/null \
+ || echo '[]' > /tmp/gh-aw/agent/failing-workflows.json
+ else
+ echo '[]' > /tmp/gh-aw/agent/failing-workflows.json
+ fi
+ echo "Metrics loaded: $(jq 'length' /tmp/gh-aw/agent/failing-workflows.json) failing workflows (<80% success)"
---
{{#runtime-import? .github/shared-instructions.md}}
@@ -225,35 +252,26 @@ The Metrics Collector workflow runs daily and stores performance metrics in a st
- Use clear headers and bullet points
- Include issue/PR/workflow numbers for reference
-### Phase 1: Discovery (5 minutes)
+### Phase 1: Discovery (pre-computed)
-1. **Scan workflow directory:**
- - List all `.md` files in `.github/workflows/` (excluding `shared/` subdirectory)
- - Parse frontmatter for each workflow
- - Extract key metadata (engine, triggers, tools, permissions)
+Pre-computed data is available in `/tmp/gh-aw/agent/`:
+- `workflow-list.txt` — all executable `.md` workflow files (one per line, shared/ already excluded)
+- `compile-validate.txt` — output from `gh aw compile --validate`
-2. **Check compilation status:**
- - For each **executable** `.md` file, verify `.lock.yml` exists
- - **SKIP** files in `.github/workflows/shared/` directory (reusable imports, not standalone workflows)
- - Verify lock freshness with frontmatter hash checks (for example, `gh aw compile --validate`) instead of raw file modification timestamps
- - Run `gh aw compile --validate` to check for compilation errors
-
-3. **Build workflow inventory:**
- - Create structured data for each workflow
- - Categorize by type, engine, and purpose
- - Map relationships and dependencies
+1. **Read the pre-computed inventory** from the files above; do not re-run discovery from scratch.
+2. **Parse frontmatter** for each workflow in `workflow-list.txt` to extract key metadata (engine, triggers, tools, permissions).
+3. **Check compilation status** using `compile-validate.txt` — verify each workflow has a `.lock.yml` and note any errors or warnings.
### Phase 2: Health Assessment (7 minutes)
-4. **Query workflow runs:**
- - For each workflow, get last 10 runs (or 7 days)
- - Extract run status, duration, errors
- - Calculate success rate
+4. **Use pre-loaded metrics:**
+ - `/tmp/gh-aw/agent/failing-workflows.json` contains the top-20 workflows with <80% success rate (pre-filtered from `metrics/latest.json`). Use this as your starting point.
+ - For trend analysis, load daily metrics directly: `/tmp/gh-aw/repo-memory/default/metrics/daily/*.json`
-5. **Analyze errors:**
- - Group errors by type and pattern
- - Identify workflows with recurring issues
- - Detect systemic problems affecting multiple workflows
+5. **Query workflow runs:**
+ - For workflows flagged in `failing-workflows.json`, get last 10 runs (or 7 days) for detailed error analysis
+ - Batch queries where possible (fetch multiple workflows in one `list_workflow_runs` call filtered by date)
+ - Calculate success rate, track timeout issues, permission errors, tool failures
6. **Calculate health scores:**
- For each workflow, compute reliability score
@@ -321,136 +339,31 @@ Create or update a pinned issue with this structure:
# Workflow Health Dashboard - [DATE]
## Overview
-- Total workflows: XXX
-- Healthy: XXX (XX%)
-- Warning: XXX (XX%)
-- Critical: XXX (XX%)
-- Inactive: XXX (XX%)
+Total: X | Healthy: X (X%) | Warning: X (X%) | Critical: X (X%) | Inactive: X
## Critical Issues 🚨
-
-### Workflow Name 1 (Score: XX/100)
-- **Status:** Failing consistently (X/10 recent runs failed)
-- **Error:** Permission denied when accessing GitHub API
-- **Impact:** Unable to create issues for campaign tracking
-- **Action:** Issue #XXX created for investigation
-- **Priority:** P0
-
-### Workflow Name 2 (Score: XX/100)
-- **Status:** Timeout on every run
-- **Error:** Operation exceeds 10 minute timeout
-- **Impact:** Campaign metrics not being updated
-- **Action:** Issue #XXX created with optimization suggestions
-- **Priority:** P1
+### [Workflow Name] (Score: X/100) — P[0|1]
+- **Status/Error:** [brief description] **Impact:** [brief] **Action:** Issue #XXX
## Warnings ⚠️
-
-### Workflow Name 3 (Score: XX/100)
-- **Issue:** Compilation warnings about deprecated syntax
-- **Recommendation:** Update to use new safe-outputs format
-- **Action:** Issue #XXX created with migration guide
-
-### Workflow Name 4 (Score: XX/100)
-- **Issue:** High resource usage (15 min average run time)
-- **Recommendation:** Consider splitting into smaller workflows
-- **Action:** Tracked for future optimization
-
-## Healthy Workflows ✅
-
-XXX workflows operating normally with no issues detected.
+### [Workflow Name] (Score: X/100)
+- [Issue summary and action taken]
## Systemic Issues
-
-### Issue: API Rate Limiting
-- **Affected workflows:** XX workflows
-- **Pattern:** Workflows running simultaneously hitting rate limits
-- **Recommendation:** Stagger schedule times across workflows
-- **Action:** Issue #XXX created with scheduling optimization plan
-
-### Issue: Deprecated Tool Versions
-- **Affected workflows:** XX workflows
-- **Pattern:** Using MCP tools with outdated versions
-- **Recommendation:** Update to latest MCP server versions
-- **Action:** Issue #XXX created with upgrade plan
+- [Pattern] — X workflows affected — [Recommendation] — Issue #XXX
## Recommendations
-
-### High Priority
-1. Fix workflow X (P0 - completely broken)
-2. Optimize workflow Y scheduling (P1 - causing rate limits)
-3. Update workflow Z to use safe outputs (P1 - security concern)
-
-### Medium Priority
-1. Consolidate workflows A and B (similar functionality)
-2. Add timeout configs to XX workflows
-3. Update documentation for YY workflows
-
-### Low Priority
-1. Modernize workflow syntax in legacy workflows
-2. Add better error handling to XX workflows
+**High:** [P0/P1 items] **Medium:** [P2 items] **Low:** [P3 items]
## Trends
+Health score: X/100 (↑/↓/→) | New failures: X | Fixed: X | Avg success: X%
-- Overall health score: XX/100 (↑/↓/→ from last week)
-- New failures this week: X
-- Fixed issues this week: X
-- Average workflow success rate: XX%
-- Workflows needing recompilation: X
+## Actions Taken
+Created X issues | Updated X | Closed X
-## Actions Taken This Run
-
-- Created X new issues for critical workflows
-- Updated X existing issues with status
-- Closed X resolved issues
-- Recommended X optimizations
-
----
> Last updated: [TIMESTAMP]
-> Next check: [TIMESTAMP]
```
-## Important Guidelines
-
-**Systematic monitoring:**
-- Check ALL workflows, not just obviously failing ones
-- Track trends over time to catch degradation early
-- Be proactive about maintenance before workflows break
-- Consider workflow interdependencies when assessing health
-
-**Evidence-based assessment:**
-- Base health scores on concrete metrics (run success rate, error patterns)
-- Cite specific workflow runs when reporting issues
-- Include error messages and logs in issue reports
-- Compare current state with historical data
-
-**Actionable recommendations:**
-- Provide specific, implementable fixes for each issue
-- Include code examples or configuration changes when possible
-- Link to relevant documentation or migration guides
-- Estimate effort/complexity for recommended fixes
-
-**Prioritization:**
-- Focus on workflows critical to campaign operations
-- Consider blast radius when prioritizing fixes
-- Address systemic issues affecting multiple workflows first
-- Balance urgent fixes with long-term improvements
-
-**Issue hygiene:**
-- Don't create duplicate issues for the same workflow
-- Update existing issues rather than creating new ones
-- Close issues when workflows are fixed
-- Use consistent labels for tracking and filtering
-
-## Success Metrics
-
-Your effectiveness is measured by:
-- Overall workflow health score improving over time
-- Reduction in workflow failure rates
-- Faster detection and resolution of issues
-- Fewer cascading failures
-- Improved resource utilization
-- Higher workflow reliability scores
-
Execute all phases systematically and maintain a proactive approach to workflow health management.
{{#import shared/noop-reminder.md}}
diff --git a/docs/src/content/docs/agent-factory-status.mdx b/docs/src/content/docs/agent-factory-status.mdx
index 4bf97fded7d..05eb2a7cf6d 100644
--- a/docs/src/content/docs/agent-factory-status.mdx
+++ b/docs/src/content/docs/agent-factory-status.mdx
@@ -15,8 +15,6 @@ These are experimental agentic workflows used by the GitHub Next team to learn,
| [Agent Container Smoke Test](https://github.com/github/gh-aw/blob/main/.github/workflows/smoke-test-tools.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/smoke-test-tools.lock.yml) | - | - |
| [Agent Performance Analyzer - Meta-Orchestrator](https://github.com/github/gh-aw/blob/main/.github/workflows/agent-performance-analyzer.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/agent-performance-analyzer.lock.yml) | - | - |
| [Agent Persona Explorer](https://github.com/github/gh-aw/blob/main/.github/workflows/agent-persona-explorer.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/agent-persona-explorer.lock.yml) | - | - |
-| [Agentic Observability Kit](https://github.com/github/gh-aw/blob/main/.github/workflows/agentic-observability-kit.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/agentic-observability-kit.lock.yml) | - | - |
-| [Agentic Optimization Kit](https://github.com/github/gh-aw/blob/main/.github/workflows/agentic-optimization-kit.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/agentic-optimization-kit.lock.yml) | - | - |
| [Agentic Workflow Audit Agent](https://github.com/github/gh-aw/blob/main/.github/workflows/audit-workflows.md) | claude | [](https://github.com/github/gh-aw/actions/workflows/audit-workflows.lock.yml) | - | - |
| [AI Moderator](https://github.com/github/gh-aw/blob/main/.github/workflows/ai-moderator.md) | codex | [](https://github.com/github/gh-aw/actions/workflows/ai-moderator.lock.yml) | - | - |
| [Approach Validator](https://github.com/github/gh-aw/blob/main/.github/workflows/approach-validator.md) | claude | [](https://github.com/github/gh-aw/actions/workflows/approach-validator.lock.yml) | - | - |
From 02c4165bcfa2b26c90cb397d0d5bf5978cc49d03 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 28 Apr 2026 19:35:57 +0000
Subject: [PATCH 3/4] fix: correct shell redirection order in build-inventory
step
`2>&1 > file` was wrong (stderr still went to terminal).
Corrected to `> file 2>&1` so both stdout and stderr are captured.
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/37bfb199-ab89-4bbf-bdf8-d0a820340df1
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
---
.../workflow-health-manager.lock.yml | 28 +++++++++----------
.github/workflows/workflow-health-manager.md | 2 +-
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/workflow-health-manager.lock.yml b/.github/workflows/workflow-health-manager.lock.yml
index 313bdfaf98b..8f54791131e 100644
--- a/.github/workflows/workflow-health-manager.lock.yml
+++ b/.github/workflows/workflow-health-manager.lock.yml
@@ -1,4 +1,4 @@
-# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"695373ba26173d866759dec28441e08116dde87f8b13311b2b8e28b21cfbf754","strict":true,"agent_id":"copilot"}
+# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"500a242ca1da84fdd400a2fe8b655371d9979643d1bae0bb8ae7bb4d3531962c","strict":true,"agent_id":"copilot"}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","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":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"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.29","digest":"sha256:e68f37e36962dcb3f3d1de680a49bc2302cefd001b941a7dc377155ec7ce42f4","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.25.29@sha256:e68f37e36962dcb3f3d1de680a49bc2302cefd001b941a7dc377155ec7ce42f4"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.29","digest":"sha256:d1219e4110684402aabbeb5a43858f26790c9d0be210581cf3f7a521bd2c87b6","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.29@sha256:d1219e4110684402aabbeb5a43858f26790c9d0be210581cf3f7a521bd2c87b6"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.29","digest":"sha256:8a71ad9e40454051672312917e51567abfb8251d7c294d086c48f63d84e4cb53","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.25.29@sha256:8a71ad9e40454051672312917e51567abfb8251d7c294d086c48f63d84e4cb53"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.1","digest":"sha256:287fad0236959f3b3d9936ea1ef8d5b4f135ef2a5f5789713495cbbef191e60c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.1@sha256:287fad0236959f3b3d9936ea1ef8d5b4f135ef2a5f5789713495cbbef191e60c"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]}
# ___ _ _
# / _ \ | | (_)
@@ -183,21 +183,21 @@ jobs:
run: |
bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh"
{
- cat << 'GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF'
+ cat << 'GH_AW_PROMPT_86a162e1f6994f33_EOF'
- GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF
+ GH_AW_PROMPT_86a162e1f6994f33_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/repo_memory_prompt.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md"
- cat << 'GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF'
+ cat << 'GH_AW_PROMPT_86a162e1f6994f33_EOF'
Tools: add_comment(max:15), create_issue(max:10), update_issue(max:5), missing_tool, missing_data, noop
- GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF
+ GH_AW_PROMPT_86a162e1f6994f33_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md"
- cat << 'GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF'
+ cat << 'GH_AW_PROMPT_86a162e1f6994f33_EOF'
The following GitHub context information is available for this workflow:
{{#if __GH_AW_GITHUB_ACTOR__ }}
@@ -226,13 +226,13 @@ jobs:
{{/if}}
- GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF
+ GH_AW_PROMPT_86a162e1f6994f33_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md"
- cat << 'GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF'
+ cat << 'GH_AW_PROMPT_86a162e1f6994f33_EOF'
{{#runtime-import .github/workflows/shared/reporting.md}}
{{#runtime-import .github/workflows/workflow-health-manager.md}}
- GH_AW_PROMPT_61c8a2b9be5a4e9a_EOF
+ GH_AW_PROMPT_86a162e1f6994f33_EOF
} > "$GH_AW_PROMPT"
- name: Interpolate variables and render templates
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
@@ -381,7 +381,7 @@ jobs:
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: build-inventory
- run: "set -euo pipefail\nmkdir -p /tmp/gh-aw/agent\n# Run compilation validation and capture output\ngh aw compile --validate 2>&1 > /tmp/gh-aw/agent/compile-validate.txt || true\n# List executable workflow files (exclude shared/ subdirectory)\nls .github/workflows/*.md 2>/dev/null > /tmp/gh-aw/agent/workflow-list.txt || true\necho \"Inventory complete: $(wc -l < /tmp/gh-aw/agent/workflow-list.txt | tr -d ' ') workflows found\"\n"
+ run: "set -euo pipefail\nmkdir -p /tmp/gh-aw/agent\n# Run compilation validation and capture output\ngh aw compile --validate > /tmp/gh-aw/agent/compile-validate.txt 2>&1 || true\n# List executable workflow files (exclude shared/ subdirectory)\nls .github/workflows/*.md 2>/dev/null > /tmp/gh-aw/agent/workflow-list.txt || true\necho \"Inventory complete: $(wc -l < /tmp/gh-aw/agent/workflow-list.txt | tr -d ' ') workflows found\"\n"
- name: load-metrics
run: "set -euo pipefail\nmkdir -p /tmp/gh-aw/agent\nMETRICS_FILE=\"/tmp/gh-aw/repo-memory/default/metrics/latest.json\"\nif [ -f \"$METRICS_FILE\" ]; then\n jq '[.workflow_runs | to_entries[]\n | select(.value.success_rate < 0.8)]\n | sort_by(.value.success_rate) | .[0:20]' \\\n \"$METRICS_FILE\" > /tmp/gh-aw/agent/failing-workflows.json 2>/dev/null \\\n || echo '[]' > /tmp/gh-aw/agent/failing-workflows.json\nelse\n echo '[]' > /tmp/gh-aw/agent/failing-workflows.json\nfi\necho \"Metrics loaded: $(jq 'length' /tmp/gh-aw/agent/failing-workflows.json) failing workflows (<80% success)\"\n"
@@ -456,9 +456,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_1b9079b6ac2314eb_EOF'
+ cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_d75f7ebef20234f5_EOF'
{"add_comment":{"max":15},"create_issue":{"expires":24,"group":true,"labels":["cookie"],"max":10},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"push_repo_memory":{"memories":[{"dir":"/tmp/gh-aw/repo-memory/default","id":"default","max_file_count":100,"max_file_size":102400,"max_patch_size":51200}]},"report_incomplete":{},"update_issue":{"allow_body":true,"max":5}}
- GH_AW_SAFE_OUTPUTS_CONFIG_1b9079b6ac2314eb_EOF
+ GH_AW_SAFE_OUTPUTS_CONFIG_d75f7ebef20234f5_EOF
- name: Write Safe Outputs Tools
env:
GH_AW_TOOLS_META_JSON: |
@@ -735,7 +735,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_664a17b11ea4eb3a_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
+ cat << GH_AW_MCP_CONFIG_77821480069a8f3c_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
{
"mcpServers": {
"github": {
@@ -776,7 +776,7 @@ jobs:
"payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}"
}
}
- GH_AW_MCP_CONFIG_664a17b11ea4eb3a_EOF
+ GH_AW_MCP_CONFIG_77821480069a8f3c_EOF
- name: Mount MCP servers as CLIs
id: mount-mcp-clis
continue-on-error: true
diff --git a/.github/workflows/workflow-health-manager.md b/.github/workflows/workflow-health-manager.md
index 5098a232fd3..fc3255d8060 100644
--- a/.github/workflows/workflow-health-manager.md
+++ b/.github/workflows/workflow-health-manager.md
@@ -38,7 +38,7 @@ steps:
set -euo pipefail
mkdir -p /tmp/gh-aw/agent
# Run compilation validation and capture output
- gh aw compile --validate 2>&1 > /tmp/gh-aw/agent/compile-validate.txt || true
+ gh aw compile --validate > /tmp/gh-aw/agent/compile-validate.txt 2>&1 || true
# List executable workflow files (exclude shared/ subdirectory)
ls .github/workflows/*.md 2>/dev/null > /tmp/gh-aw/agent/workflow-list.txt || true
echo "Inventory complete: $(wc -l < /tmp/gh-aw/agent/workflow-list.txt | tr -d ' ') workflows found"
From a262bf01715c0256b3b224300fbd705a34991e48 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 28 Apr 2026 20:20:40 +0000
Subject: [PATCH 4/4] fix: move load-metrics to pre-agent-steps so repo-memory
is available
The load-metrics step was in `steps:` which runs before the repo-memory
clone. Moving it to `pre-agent-steps:` ensures it runs after the clone,
so metrics/latest.json exists when the step reads it.
Also strengthened the Responsibilities section (sections 1 and 2) to
explicitly reference pre-computed files in /tmp/gh-aw/agent/ instead of
the old contradicting instructions to scan .github/workflows/ or re-run
gh aw compile --validate. Phase 1 now also includes an explicit override
note matching the reviewer suggestion.
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/200dddb8-e218-407a-a162-631497158c01
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
---
.../workflow-health-manager.lock.yml | 31 ++++++++++---------
.github/workflows/workflow-health-manager.md | 17 +++++-----
2 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/.github/workflows/workflow-health-manager.lock.yml b/.github/workflows/workflow-health-manager.lock.yml
index 8f54791131e..302b0f9b3c9 100644
--- a/.github/workflows/workflow-health-manager.lock.yml
+++ b/.github/workflows/workflow-health-manager.lock.yml
@@ -1,4 +1,4 @@
-# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"500a242ca1da84fdd400a2fe8b655371d9979643d1bae0bb8ae7bb4d3531962c","strict":true,"agent_id":"copilot"}
+# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"6f4566eebbf7b9d3a517e31aee5e30d0573ca153204237fb76a263e6504c2ecc","strict":true,"agent_id":"copilot"}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","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":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"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.29","digest":"sha256:e68f37e36962dcb3f3d1de680a49bc2302cefd001b941a7dc377155ec7ce42f4","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.25.29@sha256:e68f37e36962dcb3f3d1de680a49bc2302cefd001b941a7dc377155ec7ce42f4"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.29","digest":"sha256:d1219e4110684402aabbeb5a43858f26790c9d0be210581cf3f7a521bd2c87b6","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.29@sha256:d1219e4110684402aabbeb5a43858f26790c9d0be210581cf3f7a521bd2c87b6"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.29","digest":"sha256:8a71ad9e40454051672312917e51567abfb8251d7c294d086c48f63d84e4cb53","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.25.29@sha256:8a71ad9e40454051672312917e51567abfb8251d7c294d086c48f63d84e4cb53"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.1","digest":"sha256:287fad0236959f3b3d9936ea1ef8d5b4f135ef2a5f5789713495cbbef191e60c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.1@sha256:287fad0236959f3b3d9936ea1ef8d5b4f135ef2a5f5789713495cbbef191e60c"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]}
# ___ _ _
# / _ \ | | (_)
@@ -183,21 +183,21 @@ jobs:
run: |
bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh"
{
- cat << 'GH_AW_PROMPT_86a162e1f6994f33_EOF'
+ cat << 'GH_AW_PROMPT_f0cd44e5986c18d0_EOF'
- GH_AW_PROMPT_86a162e1f6994f33_EOF
+ GH_AW_PROMPT_f0cd44e5986c18d0_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/repo_memory_prompt.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md"
- cat << 'GH_AW_PROMPT_86a162e1f6994f33_EOF'
+ cat << 'GH_AW_PROMPT_f0cd44e5986c18d0_EOF'
Tools: add_comment(max:15), create_issue(max:10), update_issue(max:5), missing_tool, missing_data, noop
- GH_AW_PROMPT_86a162e1f6994f33_EOF
+ GH_AW_PROMPT_f0cd44e5986c18d0_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md"
- cat << 'GH_AW_PROMPT_86a162e1f6994f33_EOF'
+ cat << 'GH_AW_PROMPT_f0cd44e5986c18d0_EOF'
The following GitHub context information is available for this workflow:
{{#if __GH_AW_GITHUB_ACTOR__ }}
@@ -226,13 +226,13 @@ jobs:
{{/if}}
- GH_AW_PROMPT_86a162e1f6994f33_EOF
+ GH_AW_PROMPT_f0cd44e5986c18d0_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md"
- cat << 'GH_AW_PROMPT_86a162e1f6994f33_EOF'
+ cat << 'GH_AW_PROMPT_f0cd44e5986c18d0_EOF'
{{#runtime-import .github/workflows/shared/reporting.md}}
{{#runtime-import .github/workflows/workflow-health-manager.md}}
- GH_AW_PROMPT_86a162e1f6994f33_EOF
+ GH_AW_PROMPT_f0cd44e5986c18d0_EOF
} > "$GH_AW_PROMPT"
- name: Interpolate variables and render templates
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
@@ -382,8 +382,6 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: build-inventory
run: "set -euo pipefail\nmkdir -p /tmp/gh-aw/agent\n# Run compilation validation and capture output\ngh aw compile --validate > /tmp/gh-aw/agent/compile-validate.txt 2>&1 || true\n# List executable workflow files (exclude shared/ subdirectory)\nls .github/workflows/*.md 2>/dev/null > /tmp/gh-aw/agent/workflow-list.txt || true\necho \"Inventory complete: $(wc -l < /tmp/gh-aw/agent/workflow-list.txt | tr -d ' ') workflows found\"\n"
- - name: load-metrics
- run: "set -euo pipefail\nmkdir -p /tmp/gh-aw/agent\nMETRICS_FILE=\"/tmp/gh-aw/repo-memory/default/metrics/latest.json\"\nif [ -f \"$METRICS_FILE\" ]; then\n jq '[.workflow_runs | to_entries[]\n | select(.value.success_rate < 0.8)]\n | sort_by(.value.success_rate) | .[0:20]' \\\n \"$METRICS_FILE\" > /tmp/gh-aw/agent/failing-workflows.json 2>/dev/null \\\n || echo '[]' > /tmp/gh-aw/agent/failing-workflows.json\nelse\n echo '[]' > /tmp/gh-aw/agent/failing-workflows.json\nfi\necho \"Metrics loaded: $(jq 'length' /tmp/gh-aw/agent/failing-workflows.json) failing workflows (<80% success)\"\n"
# Repo memory git-based storage configuration from frontmatter processed below
- name: Clone repo-memory branch (default)
@@ -449,6 +447,9 @@ jobs:
GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode"
GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md opencode.jsonc"
run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_base_github_folders.sh"
+ - name: load-metrics
+ run: "set -euo pipefail\nmkdir -p /tmp/gh-aw/agent\nMETRICS_FILE=\"/tmp/gh-aw/repo-memory/default/metrics/latest.json\"\nif [ -f \"$METRICS_FILE\" ]; then\n jq '[.workflow_runs | to_entries[]\n | select(.value.success_rate < 0.8)]\n | sort_by(.value.success_rate) | .[0:20]' \\\n \"$METRICS_FILE\" > /tmp/gh-aw/agent/failing-workflows.json 2>/dev/null \\\n || echo '[]' > /tmp/gh-aw/agent/failing-workflows.json\nelse\n echo '[]' > /tmp/gh-aw/agent/failing-workflows.json\nfi\necho \"Metrics loaded: $(jq 'length' /tmp/gh-aw/agent/failing-workflows.json) failing workflows (<80% success)\"\n"
+
- name: Download container images
run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.29@sha256:e68f37e36962dcb3f3d1de680a49bc2302cefd001b941a7dc377155ec7ce42f4 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.29@sha256:d1219e4110684402aabbeb5a43858f26790c9d0be210581cf3f7a521bd2c87b6 ghcr.io/github/gh-aw-firewall/squid:0.25.29@sha256:8a71ad9e40454051672312917e51567abfb8251d7c294d086c48f63d84e4cb53 ghcr.io/github/gh-aw-mcpg:v0.3.1@sha256:287fad0236959f3b3d9936ea1ef8d5b4f135ef2a5f5789713495cbbef191e60c ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959 node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f
- name: Write Safe Outputs Config
@@ -456,9 +457,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_d75f7ebef20234f5_EOF'
+ cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_e6200901479e3009_EOF'
{"add_comment":{"max":15},"create_issue":{"expires":24,"group":true,"labels":["cookie"],"max":10},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"push_repo_memory":{"memories":[{"dir":"/tmp/gh-aw/repo-memory/default","id":"default","max_file_count":100,"max_file_size":102400,"max_patch_size":51200}]},"report_incomplete":{},"update_issue":{"allow_body":true,"max":5}}
- GH_AW_SAFE_OUTPUTS_CONFIG_d75f7ebef20234f5_EOF
+ GH_AW_SAFE_OUTPUTS_CONFIG_e6200901479e3009_EOF
- name: Write Safe Outputs Tools
env:
GH_AW_TOOLS_META_JSON: |
@@ -735,7 +736,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_77821480069a8f3c_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
+ cat << GH_AW_MCP_CONFIG_0d708bb94fe0b00c_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
{
"mcpServers": {
"github": {
@@ -776,7 +777,7 @@ jobs:
"payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}"
}
}
- GH_AW_MCP_CONFIG_77821480069a8f3c_EOF
+ GH_AW_MCP_CONFIG_0d708bb94fe0b00c_EOF
- name: Mount MCP servers as CLIs
id: mount-mcp-clis
continue-on-error: true
diff --git a/.github/workflows/workflow-health-manager.md b/.github/workflows/workflow-health-manager.md
index fc3255d8060..1c87a1ce10a 100644
--- a/.github/workflows/workflow-health-manager.md
+++ b/.github/workflows/workflow-health-manager.md
@@ -42,6 +42,7 @@ steps:
# List executable workflow files (exclude shared/ subdirectory)
ls .github/workflows/*.md 2>/dev/null > /tmp/gh-aw/agent/workflow-list.txt || true
echo "Inventory complete: $(wc -l < /tmp/gh-aw/agent/workflow-list.txt | tr -d ' ') workflows found"
+pre-agent-steps:
- name: load-metrics
run: |
set -euo pipefail
@@ -80,12 +81,11 @@ As a meta-orchestrator for workflow health, you oversee the operational health o
### 1. Workflow Discovery and Inventory
**Discover all workflows:**
-- Scan `.github/workflows/` for all `.md` workflow files
-- **EXCLUDE** files in `.github/workflows/shared/` subdirectory (these are reusable imports, not standalone workflows)
+- Read `/tmp/gh-aw/agent/workflow-list.txt` for all executable `.md` workflow files (pre-computed, `shared/` already excluded)
- Categorize workflows:
- Agentic workflows
- GitHub Actions workflows (`.yml`)
-- Build workflow inventory with metadata:
+- Build workflow inventory with metadata by parsing frontmatter for each file listed:
- Workflow name and description
- Engine type (copilot, claude, codex, custom)
- Trigger configuration (schedule, events)
@@ -95,9 +95,9 @@ As a meta-orchestrator for workflow health, you oversee the operational health o
### 2. Health Monitoring
**Check compilation status:**
+- Read `/tmp/gh-aw/agent/compile-validate.txt` for compilation results (pre-computed, do not re-run `gh aw compile --validate`)
- Verify each **executable workflow** has a corresponding `.lock.yml` file
- **EXCLUDE** shared include files in `.github/workflows/shared/` (these are imported by other workflows, not compiled standalone)
-- Check if lock files are up-to-date using frontmatter hash verification (not file modification timestamps)
- Identify workflows that failed to compile
- Flag workflows with compilation warnings
@@ -254,13 +254,14 @@ The Metrics Collector workflow runs daily and stores performance metrics in a st
### Phase 1: Discovery (pre-computed)
-Pre-computed data is available in `/tmp/gh-aw/agent/`:
+Pre-computed data is available in `/tmp/gh-aw/agent/` and is the authoritative source for this phase:
- `workflow-list.txt` — all executable `.md` workflow files (one per line, shared/ already excluded)
- `compile-validate.txt` — output from `gh aw compile --validate`
-1. **Read the pre-computed inventory** from the files above; do not re-run discovery from scratch.
-2. **Parse frontmatter** for each workflow in `workflow-list.txt` to extract key metadata (engine, triggers, tools, permissions).
-3. **Check compilation status** using `compile-validate.txt` — verify each workflow has a `.lock.yml` and note any errors or warnings.
+1. **Read the pre-computed inventory** from the files above; do not scan `.github/workflows/` or re-run discovery from scratch.
+2. **Parse frontmatter** for each workflow listed in `/tmp/gh-aw/agent/workflow-list.txt` to extract key metadata (engine, triggers, tools, permissions).
+3. **Check compilation status** using `/tmp/gh-aw/agent/compile-validate.txt` only — do not rerun `gh aw compile --validate`; verify each workflow has a `.lock.yml` and note any errors or warnings.
+4. **Treat these pre-computed files as overriding any earlier generic discovery guidance** in this document for inventory and compilation validation.
### Phase 2: Health Assessment (7 minutes)