-
Notifications
You must be signed in to change notification settings - Fork 46
Propagate create-discussion errors to conclusion job failure tracking #13399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Track failed create_discussion messages in safe_output_handler_manager.cjs - Export create_discussion_errors and create_discussion_error_count as outputs - Add outputs to safe_outputs job in compiler_safe_outputs_job.go - Pass errors as environment variables to conclusion job in notify_comment.go - Update handle_agent_failure.cjs to include create_discussion errors in issue/comment - Update agent failure templates to include create_discussion_errors_context placeholder Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
All tests passing. Feature is ready for review. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…er function Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot merge main and recompile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Propagates create_discussion safe-output failures from the safe_outputs job into the conclusion job so they can be reported in failure tracking issues/comments.
Changes:
- Export
create_discussion_errorsandcreate_discussion_error_countfromsafe_output_handler_manager.cjs. - Wire new outputs through the Go workflow compiler into the conclusion job env vars.
- Render create-discussion failure details in
handle_agent_failure.cjsand corresponding templates/tests.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/notify_comment.go | Passes create-discussion error outputs to the conclusion job via env vars when create-discussions is configured. |
| pkg/workflow/compiler_safe_outputs_job.go | Adds create_discussion_errors and create_discussion_error_count to safe_outputs job outputs. |
| actions/setup/md/agent_failure_issue.md | Adds {create_discussion_errors_context} placeholder to failure issue template. |
| actions/setup/md/agent_failure_comment.md | Adds {create_discussion_errors_context} placeholder to failure comment template. |
| actions/setup/js/safe_output_handler_manager.cjs | Collects failed create_discussion results and exports them as step outputs. |
| actions/setup/js/handle_agent_failure.cjs | Builds and injects a “Create Discussion Failed” section into failure issue/comment bodies. |
| actions/setup/js/handle_agent_failure.test.cjs | Adds a test asserting create-discussion errors appear in the created failure issue body. |
| .github/workflows/cli-consistency-checker.lock.yml | Exposes new safe_outputs job outputs for create-discussion errors. |
| .github/workflows/claude-code-user-docs-review.lock.yml | Exposes new safe_outputs outputs and passes them into the failure handler env. |
| .github/workflows/ci-doctor.lock.yml | Exposes new safe_outputs job outputs for create-discussion errors. |
| .github/workflows/ci-coach.lock.yml | Exposes new safe_outputs job outputs for create-discussion errors. |
| .github/workflows/changeset.lock.yml | Exposes new safe_outputs job outputs for create-discussion errors. |
| .github/workflows/breaking-change-checker.lock.yml | Exposes new safe_outputs job outputs for create-discussion errors. |
| .github/workflows/brave.lock.yml | Exposes new safe_outputs job outputs for create-discussion errors. |
| .github/workflows/blog-auditor.lock.yml | Exposes new safe_outputs outputs and passes them into the failure handler env. |
| .github/workflows/auto-triage-issues.lock.yml | Exposes new safe_outputs outputs and passes them into the failure handler env. |
| .github/workflows/audit-workflows.lock.yml | Exposes new safe_outputs outputs and passes them into the failure handler env. |
| .github/workflows/artifacts-summary.lock.yml | Exposes new safe_outputs outputs and passes them into the failure handler env. |
| .github/workflows/archie.lock.yml | Exposes new safe_outputs job outputs for create-discussion errors. |
| .github/workflows/ai-moderator.lock.yml | Exposes new safe_outputs job outputs for create-discussion errors. |
| .github/workflows/agent-persona-explorer.lock.yml | Exposes new safe_outputs outputs and passes them into the failure handler env. |
| .github/workflows/agent-performance-analyzer.lock.yml | Exposes new safe_outputs outputs and passes them into the failure handler env. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const parts = errorLine.split(":"); | ||
| if (parts.length >= 4) { | ||
| // parts[0] is "discussion", parts[1] is index - both unused | ||
| const repo = parts[2]; | ||
| const title = parts[3]; | ||
| const error = parts.slice(4).join(":"); // Rest is the error message | ||
| context += `- Discussion "${title}" in ${repo}: ${error}\n`; | ||
| } |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buildCreateDiscussionErrorsContext() checks parts.length >= 4, but then reads parts[3] and uses parts.slice(4) for the error message. For malformed/short lines this will render an empty error; consider requiring parts.length >= 5 (or adding an explicit fallback) to avoid emitting incomplete/broken list items.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Summary: Propagate create-discussion Errors to Conclusion Job
Problem
When a create-discussion safe output fails, the error is not propagated to the agent failure tracking in the conclusion job, so failures are not reported in tracking issues/comments.
Reference: https://github.com/github/gh-aw/actions/runs/21615216168/job/62293027909#step:6:1
Solution
Implemented error tracking for create_discussion following the same pattern as assign_to_agent. All code review feedback addressed.
Implementation Complete ✅
Changes Made
JavaScript Changes
Go Changes
Tests
This ensures create_discussion failures are properly tracked and reported in failure tracking issues/comments.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.