Skip to content

Detect step-level engine timeout in detect_copilot_errors.cjs#25896

Merged
pelikhan merged 4 commits intomainfrom
copilot/aw-fix-jsweep-javascript-unbloater
Apr 12, 2026
Merged

Detect step-level engine timeout in detect_copilot_errors.cjs#25896
pelikhan merged 4 commits intomainfrom
copilot/aw-fix-jsweep-javascript-unbloater

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 12, 2026

Step-level timeouts (timeout-minutes on the engine execution step) were not detected as timeouts. The conclusion job only checked agentConclusion === "timed_out", which only fires for job-level timeouts. Step-level timeouts produce agentConclusion === "failure", so the timeout context and messaging were silently skipped.

Detection

  • Added AGENTIC_ENGINE_TIMEOUT_PATTERN to detect_copilot_errors.cjs — matches signal=SIGTERM|SIGKILL|SIGINT in the agent stdio log (signals sent by the runner when a step exceeds timeout-minutes). The pattern is engine-agnostic, detecting timeout signals from any engine.
  • New agentic_engine_timeout output, alongside existing inference_access_error and mcp_policy_error

Plumbing

  • compiler_main_job.go — added agentic_engine_timeout to agent job outputs
  • notify_comment.go — forwards GH_AW_AGENTIC_ENGINE_TIMEOUT env var to the conclusion job
  • handle_agent_failure.cjs — timeout check is now agentConclusion === "timed_out" || agenticEngineTimeout, catching both job-level and step-level timeouts

Tests

  • New tests in detect_copilot_errors.test.cjs covering SIGTERM/SIGKILL/SIGINT patterns, embedded-in-log matching, non-copilot engine signals, and negative cases
  • Updated 5 golden files with new agentic_engine_timeout output
  • Recompiled all 187 workflow lock files

Copilot AI linked an issue Apr 12, 2026 that may be closed by this pull request
Add SIGTERM/SIGKILL/SIGINT signal detection to the Copilot error
detection step. When GitHub Actions cancels a step due to timeout-minutes,
the runner sends signals to the process group. The copilot_driver logs
these signals, and detect_copilot_errors.cjs now detects them and sets
a copilot_timeout output.

The copilot_timeout output flows through the same pipeline as
inference_access_error and mcp_policy_error:
1. detect_copilot_errors.cjs sets the output
2. compiler_main_job.go adds it to agent job outputs
3. notify_comment.go forwards GH_AW_COPILOT_TIMEOUT to conclusion job
4. handle_agent_failure.cjs uses it for timeout detection

This fixes the case where a step-level timeout (timeout-minutes on the
Copilot CLI step) was not detected as a timeout in the conclusion job,
because agentConclusion was "failure" rather than "timed_out".

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/919be85a-8564-45a3-a5a8-0a42711335c3

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix jsweep JavaScript Unbloater workflow failure Detect copilot step-level timeout in detect_copilot_errors.cjs Apr 12, 2026
Copilot AI requested a review from pelikhan April 12, 2026 10:32
GH_AW_WORKFLOW_ID_SANITIZED: agentperformanceanalyzer
outputs:
checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }}
copilot_timeout: ${{ steps.detect-copilot-errors.outputs.copilot_timeout || 'false' }}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot make it generic: "agentic_engine_timeout"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Renamed to agentic_engine_timeout across all files and also broadened the regex to match signal=SIG(TERM|KILL|INT) from any engine's log output (no longer scoped to [copilot-driver]). Commit 679f3c6.

Make the timeout detection generic (engine-agnostic) instead of
Copilot-specific. The regex pattern now matches signal=SIG(TERM|KILL|INT)
from any engine's log output, not just [copilot-driver] lines.

Renamed across:
- detect_copilot_errors.cjs: AGENTIC_ENGINE_TIMEOUT_PATTERN, agenticEngineTimeout
- handle_agent_failure.cjs: GH_AW_AGENTIC_ENGINE_TIMEOUT
- compiler_main_job.go: agentic_engine_timeout output
- notify_comment.go: GH_AW_AGENTIC_ENGINE_TIMEOUT env var
- Golden files and all 187 recompiled lock files

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/55bb5f99-cdf0-4023-8b5a-7ea12f527c68

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review April 12, 2026 11:00
Copilot AI review requested due to automatic review settings April 12, 2026 11:00
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 12, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

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://github.com/api/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -pack /home/REDACTED/work/gh-aw/gh-aw/cmd/gh-aw/main.go (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GI2rj53/jN4fyF2Y-C (http block)
  • https://github.com/api/repos/actions/upload-artifact/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha rs.outputs.copilot_timeout/agentic_engine_timeout: ${{ steps.detect-copilot-errors.outputs.agentgit h-imports.golden $name) { hasDiscussionsEnabled } } (http block)
  • https://github.com/api/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha (http block)
  • https://github.com/api/repos/docker/build-push-action/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v7 --jq .object.sha (http block)
  • https://github.com/api/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility (http block)
  • https://github.com/api/repos/githubnext/agentics/git/ref/tags/-
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/- --jq .object.sha (http block)

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

Copilot AI changed the title Detect copilot step-level timeout in detect_copilot_errors.cjs Detect step-level engine timeout in detect_copilot_errors.cjs Apr 12, 2026
Copilot AI requested a review from pelikhan April 12, 2026 11:03
@github-actions github-actions bot mentioned this pull request Apr 12, 2026
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 fixes missing detection for step-level timeouts (timeout-minutes on the Copilot CLI step) by adding a log-based timeout signal and plumbing it through the workflow outputs/env so the conclusion job can treat it as a timeout (in addition to job-level timed_out).

Changes:

  • Added AGENTIC_ENGINE_TIMEOUT_PATTERN to detect_copilot_errors.cjs and a new agentic_engine_timeout output.
  • Plumbed agentic_engine_timeout through the agent job outputs and into the conclusion job via GH_AW_AGENTIC_ENGINE_TIMEOUT, and updated timeout detection logic in handle_agent_failure.cjs.
  • Updated/regen’d workflow golden fixtures and workflow lock files to include the new output/env wiring.
Show a summary per file
File Description
actions/setup/js/detect_copilot_errors.cjs Adds signal-based timeout detection and emits agentic_engine_timeout output.
actions/setup/js/detect_copilot_errors.test.cjs Adds unit tests for the new timeout regex + detectErrors output.
actions/setup/js/handle_agent_failure.cjs Treats step-level (signal-detected) timeouts as timeouts in conclusion handling.
pkg/workflow/compiler_main_job.go Exposes agentic_engine_timeout as an agent job output for Copilot engine workflows.
pkg/workflow/notify_comment.go Forwards GH_AW_AGENTIC_ENGINE_TIMEOUT to the conclusion job for Copilot engine workflows.
pkg/workflow/copilot_engine_execution.go Updates documentation for the Copilot error detection step to include the new output.
pkg/workflow/testdata/wasm_golden/WasmBinary/basic-copilot.golden Golden fixture updated to include agentic_engine_timeout output.
pkg/workflow/testdata/wasm_golden/WasmBinary/with-imports.golden Golden fixture updated to include agentic_engine_timeout output.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden Golden fixture updated to include agentic_engine_timeout output.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden Golden fixture updated to include agentic_engine_timeout output.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden Golden fixture updated to include agentic_engine_timeout output.
.github/workflows/ace-editor.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/agent-performance-analyzer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/agent-persona-explorer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/agentic-observability-kit.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/archie.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/architecture-guardian.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/artifacts-summary.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/auto-triage-issues.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/bot-detection.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/brave.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/breaking-change-checker.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/ci-coach.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/cli-consistency-checker.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/code-scanning-fixer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/code-simplifier.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/contribution-check.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/constraint-solving-potd.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/copilot-cli-deep-research.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/copilot-pr-merged-report.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/copilot-pr-nlp-analysis.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/copilot-pr-prompt-analysis.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/copilot-token-audit.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/copilot-token-optimizer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/craft.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-architecture-diagram.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-assign-issue-to-user.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-cli-performance.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-cli-tools-tester.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-community-attribution.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-compiler-quality.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-file-diet.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-firewall-report.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-integrity-analysis.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-issues-report.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-malicious-code-scan.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-mcp-concurrency-analysis.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-news.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-performance-summary.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-regulatory.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-repo-chronicle.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-safe-output-integrator.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-secrets-analysis.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-semgrep-scan.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-syntax-error-quality.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-team-status.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-testify-uber-super-expert.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/daily-workflow-updater.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/dead-code-remover.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/delight.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/dependabot-burner.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/dependabot-go-checker.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/dev-hawk.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/dev.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/dictation-prompt.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/discussion-task-miner.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/docs-noob-tester.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/draft-pr-cleanup.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/example-permissions-warning.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/firewall-escape.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/firewall.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/functional-pragmatist.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/github-remote-mcp-auth-test.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/glossary-maintainer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/gpclean.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/issue-monster.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/issue-triage-agent.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/jsweep.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/layout-spec-maintainer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/mcp-inspector.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/mergefest.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/metrics-collector.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/notion-issue-summary.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/org-health-report.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/pdf-summary.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/plan.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/poem-bot.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/portfolio-analyst.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/pr-nitpick-reviewer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/pr-triage-agent.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/python-data-charts.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/q.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/refactoring-cadence.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/refiner.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/release.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/repo-audit-analyzer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/repo-tree-map.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/repository-quality-improver.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/research.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/security-compliance.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/security-review.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/slide-deck-maintainer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/smoke-copilot-arm.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/smoke-copilot.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/smoke-create-cross-repo-pr.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/smoke-multi-pr.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/smoke-project.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/smoke-service-ports.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/smoke-temporary-id.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/smoke-test-tools.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/smoke-update-cross-repo-pr.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/smoke-workflow-call-with-inputs.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/smoke-workflow-call.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/stale-repo-identifier.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/sub-issue-closer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/super-linter.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/technical-doc-writer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/terminal-stylist.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/test-dispatcher.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/test-project-url-default.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/test-quality-sentinel.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/test-workflow.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/tidy.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/ubuntu-image-analyzer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/update-astro.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/video-analyzer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/weekly-blog-post-writer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/weekly-editors-health-check.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/weekly-issue-summary.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/weekly-safe-outputs-spec-review.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/workflow-generator.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/workflow-health-manager.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/workflow-normalizer.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.
.github/workflows/workflow-skill-extractor.lock.yml Regenerated lock file to wire agentic_engine_timeout output/env.

Copilot's findings

Tip

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

  • Files reviewed: 134/134 changed files
  • Comments generated: 2

Comment on lines +13 to +15
* - agentic_engine_timeout: The agentic engine process was killed by a
* signal (SIGTERM/SIGKILL/SIGINT), typically due to the step
* timeout-minutes limit being reached.
Comment on lines +1010 to +1015
// Check if the agent timed out.
// A job-level timeout sets agentConclusion to "timed_out".
// A step-level timeout (timeout-minutes on the engine execution step) is detected by
// the detect-copilot-errors step which checks for SIGTERM/SIGKILL/SIGINT signals
// in the engine output and sets the agentic_engine_timeout output.
const isTimedOut = agentConclusion === "timed_out" || agenticEngineTimeout;
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot review comments

Add 6 tests verifying the isTimedOut classification logic that combines
job-level timeout (agentConclusion === "timed_out") with step-level
engine timeout (agenticEngineTimeout from signal detection). This ensures
the key scenario — agentConclusion === "failure" with GH_AW_AGENTIC_ENGINE_TIMEOUT=true
— is explicitly covered.

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/c0fb085d-caf5-4e11-9ee5-a08b5f31ee9d

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 12, 2026

@copilot review comments

Addressed both review comments:

  1. PR description alignment — already uses agentic_engine_timeout / GH_AW_AGENTIC_ENGINE_TIMEOUT naming throughout.
  2. Missing timeout classification test — added 6 tests in handle_agent_failure.test.cjs covering the isTimedOut logic, including the key step-level scenario (agentConclusion === "failure" + GH_AW_AGENTIC_ENGINE_TIMEOUT=true). Commit 4786800.

@pelikhan pelikhan merged commit 273d8c4 into main Apr 12, 2026
@pelikhan pelikhan deleted the copilot/aw-fix-jsweep-javascript-unbloater branch April 12, 2026 11:13
Copilot stopped work on behalf of pelikhan due to an error April 12, 2026 11:13
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.

[aw] jsweep - JavaScript Unbloater failed

3 participants