Skip to content

Render report_incomplete reasons in agent failure comment and issue templates#33087

Merged
pelikhan merged 4 commits into
mainfrom
copilot/fix-missing-report-incomplete-context
May 18, 2026
Merged

Render report_incomplete reasons in agent failure comment and issue templates#33087
pelikhan merged 4 commits into
mainfrom
copilot/fix-missing-report-incomplete-context

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 18, 2026

handle_agent_failure.cjs already builds report_incomplete_context, but both agent_failure_comment.md and agent_failure_issue.md omitted the placeholder, so the agent’s incomplete-run reason was silently discarded from rendered output. This change wires that context through the templates and adds coverage for the regression.

  • Template fix

    • Added {report_incomplete_context} to both failure templates in the existing context ordering, between {permission_denied_context} and {missing_safe_outputs_context}.
    • This preserves the handler’s current template context contract and ensures structured incomplete-run reasons are surfaced to readers.
  • Regression coverage

    • Added a focused test that renders the real comment and issue templates with a generated report_incomplete context and asserts the reason text is present in both outputs.
    • This closes the gap that allowed renderTemplate() to silently drop the value without test failure.
  • Rendered behavior

    {permission_denied_context}{report_incomplete_context}{missing_safe_outputs_context}

    With a report_incomplete item such as:

    { "type": "report_incomplete", "reason": "cannot continue" }

    the rendered failure comment/issue now includes the agent’s stated reason instead of only generic boilerplate.

Copilot AI and others added 3 commits May 18, 2026 16:38
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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] Fix missing {report_incomplete_context} placeholder in agent failure templates Render report_incomplete reasons in agent failure comment and issue templates May 18, 2026
Copilot AI requested a review from pelikhan May 18, 2026 16:47
@pelikhan pelikhan marked this pull request as ready for review May 18, 2026 16:55
Copilot AI review requested due to automatic review settings May 18, 2026 16:55
@pelikhan pelikhan merged commit a6ff487 into main May 18, 2026
@pelikhan pelikhan deleted the copilot/fix-missing-report-incomplete-context branch May 18, 2026 16:55
Copy link
Copy Markdown
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 ensures agent report_incomplete reasons are surfaced in rendered failure comments/issues (instead of being silently dropped) and adds a regression test to prevent reoccurrence.

Changes:

  • Added {report_incomplete_context} to agent_failure_comment.md and agent_failure_issue.md in the existing context ordering.
  • Added a focused template-rendering regression test to assert report_incomplete reason text appears in both rendered outputs.
  • Regenerated .github/workflows/pr-description-caveman.lock.yml (large workflow lockfile update).
Show a summary per file
File Description
actions/setup/md/agent_failure_issue.md Adds {report_incomplete_context} placeholder so incomplete-run reasons appear in failure issues.
actions/setup/md/agent_failure_comment.md Adds {report_incomplete_context} placeholder so incomplete-run reasons appear in failure comments.
actions/setup/js/handle_agent_failure.test.cjs Adds regression coverage by rendering real templates and asserting the reason text is present.
.github/workflows/pr-description-caveman.lock.yml Large lockfile regeneration with many workflow/runtime/version/step changes beyond the template fix.

Copilot's findings

Tip

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

  • Files reviewed: 4/4 changed files
  • Comments generated: 1

Comment on lines +1 to 5
# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"d323adc7f9e87e820faddb72dc94b0db9f74299868e4ca982ddcecc4a4edc777","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":"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.46"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.46"},{"image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.25.46"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.46"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.9","digest":"sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]}
# ___ _ _
# / _ \ | | (_)
# | |_| | __ _ ___ _ __ | |_ _ ___
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.

report_incomplete context silently dropped: {report_incomplete_context} placeholder missing from agent_failure_comment.md and agent_failure_issue.md

3 participants