Skip to content

fix: skipped code-push should not trigger fail-fast; retry PR review on unresolvable line#21976

Merged
pelikhan merged 6 commits intomainfrom
copilot/investigate-failure
Mar 20, 2026
Merged

fix: skipped code-push should not trigger fail-fast; retry PR review on unresolvable line#21976
pelikhan merged 6 commits intomainfrom
copilot/investigate-failure

Conversation

Copy link
Contributor

Copilot AI commented Mar 20, 2026

Two bugs in safe output processing caused the Smoke Claude workflow to fail even when the agent made no code changes and attempted valid PR review comments.

Changes

  • safe_output_handler_manager.cjspush_to_pull_request_branch returning { success: false, skipped: true } (i.e. if_no_changes: warn/ignore with no patch) was incorrectly treated as a hard code-push failure, cancelling all subsequent messages (create_issue, add_comment, add_labels). Added an explicit skipped-result path that records the result as skipped without populating codePushFailures.

  • pr_review_buffer.cjs — When the GitHub API rejects a review with "Line could not be resolved" (inline comment references a line not in the diff), added a fallback retry that strips the comments array and submits a body-only review, preserving the review body and footer.

// Before: push with no changes + if_no_changes: warn → fail-fast → cancel subsequent messages
// After:  push with no changes + if_no_changes: warn → skipped  → subsequent messages proceed

// Before: inline comment on non-diff line → review submission fails entirely
// After:  inline comment on non-diff line → retry as body-only review → success

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js origin tions/setup/node--objects git comm�� -m Initial commit tions/setup/js/n--quiet --name-status 5843137113c4651drev-list bin/git git (http block)
  • invalid.example.invalid
    • Triggering command: /usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git git add . git k/node_modules/.bin/git /tmp/bare-incremgit the new one ode-gyp-bin/git git clon�� /tmp/bare-incremental-b1U0BY . /git ranch..feature-bgit git cal/bin/git git (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Reference: https://github.com/github/gh-aw/actions/runs/23345815926/job/67912094560#step:8:1

Investigate failure


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Base automatically changed from copilot/update-mcp-gateway-v0120 to main March 20, 2026 14:06
…s gracefully

- safe_output_handler_manager.cjs: When a code-push handler returns
  { success: false, skipped: true } (e.g. if_no_changes: warn/ignore with
  no changes), don't trigger fail-fast cancellation of subsequent messages.

- pr_review_buffer.cjs: When PR review submission fails with 'Line could
  not be resolved', retry as a body-only review without inline comments so
  the overall review body and footer are still posted.

Fixes CI failure: actions/runs/23345815926/job/67912094560#step:8:1

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/047357d8-a227-429c-89c1-691ec92beda6
Copilot AI changed the title [WIP] Investigate failure in action run fix: skipped code-push should not trigger fail-fast; retry PR review on unresolvable line Mar 20, 2026
Copilot AI requested a review from pelikhan March 20, 2026 14:16
@pelikhan pelikhan marked this pull request as ready for review March 20, 2026 14:19
Copilot AI review requested due to automatic review settings March 20, 2026 14:20
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

Fixes two safe-output processing failures in the Smoke Claude workflow: (1) treating “skipped” code-push results as hard failures (triggering fail-fast cancellation), and (2) failing entire PR review submission when GitHub rejects an inline comment with “Line could not be resolved”. Also bumps the default MCP gateway image version and recompiles workflow lockfiles to reference it.

Changes:

  • Treat { success: false, skipped: true } from code-push handlers as “skipped” (non-fail-fast) so subsequent safe-output messages still run.
  • Retry PR review submission as a body-only review when the API returns “Line could not be resolved”.
  • Update MCP gateway version to v0.1.20 and refresh workflow lockfiles accordingly (+ changeset).

Reviewed changes

Copilot reviewed 186 out of 186 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/constants/constants.go Bumps default MCP gateway version to v0.1.20.
actions/setup/js/safe_output_handler_manager.cjs Adds explicit “skipped” handling so skipped code-push doesn’t trigger fail-fast cancellation.
actions/setup/js/safe_output_handler_manager.test.cjs Adds coverage for skipped code-push behavior not cancelling subsequent messages.
actions/setup/js/pr_review_buffer.cjs Adds fallback retry to submit a body-only review when inline comment lines can’t be resolved.
actions/setup/js/pr_review_buffer.test.cjs Adds tests for body-only retry behavior and retry failure propagation.
.changeset/patch-update-mcpg-v0-1-20.md Changeset noting MCP gateway image bump + workflow recompilation.
.github/workflows/workflow-health-manager.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/workflow-generator.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/weekly-issue-summary.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/video-analyzer.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/update-astro.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/ubuntu-image-analyzer.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/tidy.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/test-workflow.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/test-project-url-default.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/test-dispatcher.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/test-create-pr-error-handling.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/super-linter.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/step-name-alignment.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/static-analysis-report.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/stale-repo-identifier.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/smoke-test-tools.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/smoke-project.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/smoke-call-workflow.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/smoke-agent-scoped-approved.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/smoke-agent-public-none.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/smoke-agent-public-approved.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/smoke-agent-all-none.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/smoke-agent-all-merged.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/security-compliance.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/schema-feature-coverage.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/schema-consistency-checker.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/research.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/repo-tree-map.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/release.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/refiner.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/pr-triage-agent.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/poem-bot.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/plan.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/pdf-summary.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/org-health-report.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/metrics-collector.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/mergefest.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/lockfile-stats.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/layout-spec-maintainer.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/issue-triage-agent.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/issue-monster.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/issue-arborist.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/instructions-janitor.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/hourly-ci-cleaner.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/grumpy-reviewer.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/gpclean.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/github-mcp-tools-report.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/firewall.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/firewall-escape.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/example-permissions-warning.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/discussion-task-miner.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/dev.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/delight.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/deep-report.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/daily-team-status.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/daily-security-red-team.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/daily-issues-report.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/daily-fact.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/daily-code-metrics.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/daily-choice-test.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/craft.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/copilot-session-insights.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/copilot-agent-analysis.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/contribution-check.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/commit-changes-analyzer.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/codex-github-remote-mcp-test.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/code-simplifier.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/cli-version-checker.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/ci-doctor.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/ci-coach.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/changeset.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/bot-detection.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/artifacts-summary.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/ai-moderator.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.
.github/workflows/ace-editor.lock.yml Updates referenced gh-aw-mcpg image tag to v0.1.20.

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

Comment on lines +451 to +462
if (result && result.success === false && result.skipped === true && !result.deferred) {
const msg = result.error || "Handler returned success: false with skipped: true";
if (CODE_PUSH_TYPES.has(messageType)) {
core.info(`⏭ Message ${i + 1} (${messageType}) skipped — ${msg}`);
}
results.push({
type: messageType,
messageIndex: i,
success: false,
skipped: true,
error: msg,
});
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

Skipped results produced by handlers are recorded with an error field here, but other skipped paths in processMessages (e.g., standalone/custom-job handling) use reason and leave error undefined. This makes the per-message result shape inconsistent for skipped: true and can cause consumers/tests to treat a skip as an error. Consider populating reason (and preserving result.reason when provided) instead of error, or include both consistently across all skip paths.

Copilot uses AI. Check for mistakes.
Comment on lines 365 to +366
// DefaultMCPGatewayVersion is the default version of the MCP Gateway (gh-aw-mcpg) Docker image
const DefaultMCPGatewayVersion Version = "v0.1.19"
const DefaultMCPGatewayVersion Version = "v0.1.20"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

PR title/description focus on safe-output fail-fast + PR review retry behavior, but this change also bumps the default MCP gateway image version (and workflows are updated accordingly). Please update the PR title/description to mention the MCP gateway version bump (or split it into a separate PR) so reviewers and release notes correctly reflect the scope.

Copilot uses AI. Check for mistakes.
@pelikhan pelikhan merged commit e665d10 into main Mar 20, 2026
115 checks passed
@pelikhan pelikhan deleted the copilot/investigate-failure branch March 20, 2026 14:25
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.

3 participants