Skip to content

Add workflow ID and run URL to agent failure template prompt#14793

Merged
pelikhan merged 7 commits intomainfrom
copilot/update-failure-template
Feb 10, 2026
Merged

Add workflow ID and run URL to agent failure template prompt#14793
pelikhan merged 7 commits intomainfrom
copilot/update-failure-template

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

Failure issues now include a pre-filled command with the specific workflow ID and run URL for debugging.

Changes

  • Go: Pass GH_AW_WORKFLOW_ID environment variable (derived from workflow filename) to agent failure handler (pkg/workflow/notify_comment.go)
  • Template: Update prompt from generic instruction to specific command with {workflow_id} and {run_url} placeholders (actions/setup/md/agent_failure_issue.md)
  • JavaScript: Pass workflow ID and run URL directly to template context (actions/setup/js/handle_agent_failure.cjs)
  • Tests: Verify new command format appears in generated issues

Example

Before:

/agent agentic-workflows

When prompted, instruct the agent to debug this workflow failure.

After:

/agent agentic-workflows debug the agentic workflow archie failure in https://github.com/owner/repo/actions/runs/123456

The command now includes the actual workflow ID derived from the markdown filename (e.g., archie, ai-moderator) and the full run URL for direct debugging access, eliminating manual lookup.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update agentic workflows failure template with workflow ID and run URL Add workflow ID and run ID to agent failure template prompt Feb 10, 2026
Copilot AI requested a review from pelikhan February 10, 2026 15:23
agentFailureEnvVars = append(agentFailureEnvVars, buildWorkflowMetadataEnvVarsWithTrackerID(data.Name, data.Source, data.TrackerID)...)
agentFailureEnvVars = append(agentFailureEnvVars, " GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n")
agentFailureEnvVars = append(agentFailureEnvVars, fmt.Sprintf(" GH_AW_AGENT_CONCLUSION: ${{ needs.%s.result }}\n", mainJobName))
agentFailureEnvVars = append(agentFailureEnvVars, fmt.Sprintf(" GH_AW_WORKFLOW_ID: %q\n", mainJobName))
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot this should be the agentic workflow id, not the main job name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to use data.WorkflowID (the workflow filename like "archie", "ai-moderator") instead of mainJobName (the job name "agent"). The workflow ID is now correctly derived from the markdown filename. (commit 611d937)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Add workflow ID and run ID to agent failure template prompt Add workflow ID and run URL to agent failure template prompt Feb 10, 2026
Copilot AI requested a review from pelikhan February 10, 2026 15:38
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review February 10, 2026 15:51
Copilot AI review requested due to automatic review settings February 10, 2026 15:51
…rity and organization

- Changed workflow ID from "agent" to specific workflow names in multiple YAML files, including:
  - python-data-charts
  - q
  - release
  - repo-audit-analyzer
  - repo-tree-map
  - repository-quality-improver
  - research
  - safe-output-health
  - schema-consistency-checker
  - scout
  - security-compliance
  - security-guard
  - security-review
  - semantic-function-refactor
  - sergo
  - slide-deck-maintainer
  - smoke-claude
  - smoke-codex
  - smoke-copilot
  - smoke-opencode
  - smoke-project
  - smoke-test-tools
  - stale-repo-identifier
  - static-analysis-report
  - step-name-alignment
  - sub-issue-closer
  - super-linter
  - technical-doc-writer
  - terminal-stylist
  - test-create-pr-error-handling
  - test-dispatcher
  - test-project-url-default
  - tidy
  - typist
  - ubuntu-image-analyzer
  - unbloat-docs
  - video-analyzer
  - weekly-issue-summary
  - workflow-generator
  - workflow-health-manager
  - workflow-normalizer
  - workflow-skill-extractor
@pelikhan pelikhan merged commit 5de1c79 into main Feb 10, 2026
45 checks passed
@pelikhan pelikhan deleted the copilot/update-failure-template branch February 10, 2026 15:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the agent-failure issue template so newly created failure issues include a pre-filled /agent command that embeds the workflow ID and the specific Actions run URL, making debugging more direct.

Changes:

  • Add GH_AW_WORKFLOW_ID to the conclusion job’s agent-failure handler environment (Go compiler output).
  • Update the failure issue prompt template to include {workflow_id} and {run_url} in the /agent command.
  • Extend the JS failure handler + tests to pass/render the new template variables.

Reviewed changes

Copilot reviewed 145 out of 145 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/workflow/notify_comment.go Adds GH_AW_WORKFLOW_ID to the env passed into the agent failure handler step.
actions/setup/md/agent_failure_issue.md Updates the /agent command to include {workflow_id} and {run_url} placeholders.
actions/setup/js/handle_agent_failure.cjs Reads GH_AW_WORKFLOW_ID and passes it into the template context.
actions/setup/js/handle_agent_failure.test.cjs Updates the mocked template and asserts the rendered issue includes the new command format.
.github/workflows/workflow-skill-extractor.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/workflow-normalizer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/workflow-health-manager.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/workflow-generator.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/weekly-issue-summary.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/video-analyzer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/unbloat-docs.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/ubuntu-image-analyzer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/typist.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/tidy.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/test-project-url-default.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/test-dispatcher.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/test-create-pr-error-handling.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/terminal-stylist.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/technical-doc-writer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/super-linter.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/sub-issue-closer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/step-name-alignment.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/static-analysis-report.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/stale-repo-identifier.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/smoke-test-tools.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/smoke-project.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/smoke-opencode.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/smoke-copilot.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/smoke-codex.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/smoke-claude.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/slide-deck-maintainer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/sergo.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/semantic-function-refactor.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/security-review.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/security-guard.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/security-compliance.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/scout.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/schema-consistency-checker.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/safe-output-health.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/research.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/repository-quality-improver.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/repo-tree-map.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/repo-audit-analyzer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/release.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/q.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/python-data-charts.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/prompt-clustering-analysis.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/pr-triage-agent.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/pr-nitpick-reviewer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/portfolio-analyst.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/poem-bot.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/plan.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/pdf-summary.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/org-health-report.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/notion-issue-summary.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/mergefest.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/mcp-inspector.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/lockfile-stats.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/layout-spec-maintainer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/jsweep.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/issue-triage-agent.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/issue-monster.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/issue-classifier.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/issue-arborist.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/instructions-janitor.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/hourly-ci-cleaner.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/grumpy-reviewer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/go-pattern-detector.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/go-logger.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/go-fan.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/github-remote-mcp-auth-test.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/github-mcp-tools-report.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/github-mcp-structural-analysis.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/functional-pragmatist.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/firewall-escape.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/example-workflow-analyzer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/duplicate-code-detector.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/draft-pr-cleanup.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/docs-noob-tester.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/discussion-task-miner.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/dictation-prompt.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/developer-docs-consolidator.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/dev.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/dev-hawk.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/dependabot-project-manager.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/dependabot-go-checker.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/dependabot-burner.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/delight.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/deep-report.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-workflow-updater.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-testify-uber-super-expert.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-team-status.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-team-evolution-insights.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-syntax-error-quality.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-semgrep-scan.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-secrets-analysis.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-safe-output-optimizer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-repo-chronicle.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-regulatory.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-performance-summary.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-observability-report.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-news.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-multi-device-docs-tester.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-mcp-concurrency-analysis.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-malicious-code-scan.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-issues-report.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-firewall-report.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-file-diet.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-fact.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-doc-updater.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-copilot-token-report.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-compiler-quality.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-code-metrics.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-cli-tools-tester.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-cli-performance.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-choice-test.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/daily-assign-issue-to-user.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/craft.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/copilot-session-insights.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/copilot-pr-prompt-analysis.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/copilot-pr-nlp-analysis.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/copilot-pr-merged-report.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/copilot-cli-deep-research.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/copilot-agent-analysis.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/commit-changes-analyzer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/code-simplifier.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/code-scanning-fixer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/cloclo.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/cli-version-checker.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/cli-consistency-checker.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/claude-code-user-docs-review.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/ci-doctor.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/ci-coach.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/changeset.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/breaking-change-checker.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/brave.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/blog-auditor.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/auto-triage-issues.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/audit-workflows.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/artifacts-summary.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/archie.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/ai-moderator.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/agent-persona-explorer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.
.github/workflows/agent-performance-analyzer.lock.yml Propagates the new GH_AW_WORKFLOW_ID env var into the compiled workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 151 to 155
agentFailureEnvVars = append(agentFailureEnvVars, buildWorkflowMetadataEnvVarsWithTrackerID(data.Name, data.Source, data.TrackerID)...)
agentFailureEnvVars = append(agentFailureEnvVars, " GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n")
agentFailureEnvVars = append(agentFailureEnvVars, fmt.Sprintf(" GH_AW_AGENT_CONCLUSION: ${{ needs.%s.result }}\n", mainJobName))
agentFailureEnvVars = append(agentFailureEnvVars, fmt.Sprintf(" GH_AW_WORKFLOW_ID: %q\n", data.WorkflowID))

Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

GH_AW_WORKFLOW_ID is populated from data.WorkflowID, but the generated *.lock.yml files in this PR show it being set to "agent" (the job name) instead of the workflow ID derived from the markdown filename (e.g. "workflow-normalizer", "ai-moderator"). This causes the failure issue template to include the wrong workflow ID. Consider deriving the workflow ID from the markdownPath (like buildConsolidatedSafeOutputsJob does via GetWorkflowIDFromPath(markdownPath)) and passing it into buildConclusionJob, and then regenerate the lockfiles so the env var matches the workflow's markdown basename.

Copilot uses AI. Check for mistakes.
Comment on lines 333 to 336
const workflowName = process.env.GH_AW_WORKFLOW_NAME || "unknown";
const workflowID = process.env.GH_AW_WORKFLOW_ID || "unknown";
const agentConclusion = process.env.GH_AW_AGENT_CONCLUSION || "";
const runUrl = process.env.GH_AW_RUN_URL || "";
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

Variable name workflowID is inconsistent with the repository’s existing camelCase usage for IDs (e.g., workflowId in other scripts like create_pull_request/add_comment). Renaming to workflowId would improve consistency and readability (and avoid mixing initialisms in local variables).

Copilot uses AI. Check for mistakes.
Comment on lines 930 to 934
GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }}
GH_AW_WORKFLOW_ID: "workflow-normalizer"
GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.agent.outputs.secret_verification_result }}
GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }}
with:
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

This workflow sets GH_AW_WORKFLOW_ID to "agent" in the Handle Agent Failure step env, which will make the generated failure issue use the wrong workflow ID in the debug command. It should match the workflow markdown basename ("workflow-normalizer") like the safe_outputs job-level GH_AW_WORKFLOW_ID does; regenerate this lockfile after fixing the compiler output for the conclusion job.

Copilot uses AI. Check for mistakes.
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.

2 participants