Skip to content

Suppress startup-failure reports for cancelled agent jobs - #72405

Merged
pelikhan merged 2 commits into
mainfrom
copilot/fix-agent-startup-failure
Oct 27, 2026
Merged

pelikhan merged 2 commits into
mainfrom
copilot/fix-agent-startup-failure

Conversation

Copilot AI commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

When concurrency cancellation occurs before the engine starts, the collector reports agent_startup_failure, causing a failure issue for a superseded run.

  • Cancellation handling: Extend the existing missing_terminal_safe_output exemption to collector-reported agent_startup_failure, excluding synthetic diagnostics from mixed-output reports.
  • Preserved behavior: Continue reporting independent failures, non-cancelled startup failures, and agent-authored incomplete reports without collector corroboration.
  • Regression coverage: Extend cancellation and failure-classification cases to cover startup failures.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix reporting of agent startup failures on job cancellation Suppress startup-failure reports for cancelled agent jobs Oct 27, 2026
Copilot AI requested a review from pelikhan October 27, 2026 10:55
@pelikhan
pelikhan marked this pull request as ready for review October 27, 2026 11:10
Copilot AI max review requested due to automatic review settings October 27, 2026 11:10
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

βœ… Design Decision Gate πŸ—οΈ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Design Decision Gate πŸ—οΈ

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Design Decision Gate πŸ—οΈ Β· opus55 Β· ~11 AIC Β· βŒ– ~33 AIC Β· β—‡ ~3 AIC Β· ⊞ 1.9K Β· β—·

πŸ—οΈ ADR gate enforced by Design Decision Gate πŸ—οΈ

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

βœ… PR Code Quality Reviewer completed the code quality review.

πŸ”Ž Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

βœ… Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Test Quality Sentinel Β· haiku45 Β· ~6 AIC Β· βŒ– ~7 AIC Β· β—‡ ~2 AIC Β· ⊞ 8.8K Β· β—·

πŸ§ͺ Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. βœ…

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

βœ… Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Ponytail Reviewer Β· gpt56 Β· ~9 AIC Β· βŒ– ~6 AIC Β· ⊞ 14.8K Β· β—·

Generated by Ponytail Reviewer for #72405

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟑 Changes recommended

The exemption also suppresses genuine setup failures caused by job-level timeouts.

1 open issue
What changed in this PR

This PR extends gh-aw’s conclusion-stage failure handling to suppress collector-reported startup failures when agent jobs are cancelled before execution, addressing #72367.

Changes:

  • Applies the cancellation exemption to agent_startup_failure, including mixed-output diagnostics.
  • Expands regression cases for cancellation suppression and preserved failure reporting.
File Description
actions/​setup/​js/​handle_agent_failure.test.cjs Extends cancellation and failure-classification test cases.
actions/​setup/​js/​handle_agent_failure.cjs Adds startup failures to the collector-backed cancellation exemption.

Review effort: Max

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-10-27T11:34:22Z
review_event: COMMENT
top_themes:
  - cancelled startup failure classification can be masked by model configuration errors
files_reviewed:
  - actions/setup/js/handle_agent_failure.cjs
  - actions/setup/js/handle_agent_failure.test.cjs
comment_count: 1

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

πŸ”Ž Code quality review by PR Code Quality Reviewer Β· copilot Β· gpt50 Β· ~2 AIC Β· βŒ– ~1 AIC Β· ⊞ 1.6K Β· β—·
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review

One medium-severity classification regression needs attention; the inline comment explains how cancelled startup failures combined with model configuration errors can lose their startup diagnostic. The remaining changes and tests are otherwise covered by the existing behavior.

πŸ”Ž Code quality review by PR Code Quality Reviewer Β· copilot Β· gpt50 Β· ~2 AIC Β· βŒ– ~1 AIC Β· ⊞ 1.6K
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /diagnosing-bugs β€” this is a clean, well-targeted fix.

πŸ“‹ Analysis

Root cause match: The fix exactly matches the root cause in the linked issue (#72367): the cancellation exemption only covered collectorEmptyOutputCause === "missing_terminal_safe_output", missing the agent_startup_failure case when cancellation happens before the engine starts (e.g. during custom steps:). Extending the check to an array (["missing_terminal_safe_output", "agent_startup_failure"]) and renaming isCancelledMissingTerminalOutput β†’ isCancelledEmptyOutput is a minimal, surgical change.

Consistency check: I traced all 5 usages of the renamed flag (lines 4238, 4282, 4503, 4505, 4510) plus downstream consumers (failureCategories via emptyOutputCause, buildFailureDiagnosticsContext's isGenericFailure check, and getFailedAgentDiagnostics({ startupFailure })). All remain correctly derived and unaffected by the rename β€” no stale references to the old name remain.

Regression coverage: The it.each parameterization is a textbook example of /tdd edge-case coverage β€” it symmetrically extends the cancellation-exemption tests, the agent-authored (non-corroborated) test, the mixed-output diagnostics-suppression test, and (importantly) the negative case: non-cancelled startup failures (success, failure, timed_out conclusions with agent_startup_failure reason) still correctly produce failure issues. This guards against over-broadly suppressing legitimate startup-failure reports.

No gaps found: No doc updates needed (the cancellation-exemption mechanism is an internal implementation detail, not part of the public failure-category reference table). No other files needed the same fix (empty_output_outcome.cjs only defines cause labels, not the cancellation exemption logic).

No actionable issues found β€” approving.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer Β· copilot Β· sonnet50 Β· ~69 AIC Β· βŒ– ~16 AIC Β· ⊞ 10.2K
Comment /matt to run again

@pelikhan
pelikhan merged commit d555585 into main Oct 27, 2026
77 checks passed
@pelikhan
pelikhan deleted the copilot/fix-agent-startup-failure branch October 27, 2026 11:43
@github-actions

Copy link
Copy Markdown
Contributor

πŸŽ‰ This pull request is included in a new release.

Release: v1.0.1

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.

Agent jobs cancelled by engine.concurrency.cancel-in-progress before the engine starts are reported as agent_startup_failure

3 participants