From f877c16511500d20fa2a59f54dccaa500fad551b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 05:19:10 +0000 Subject: [PATCH 1/2] Initial plan From ecaabfe6e3474f199e608336c0f4779a6ca4e0fe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 05:29:18 +0000 Subject: [PATCH 2/2] fix: fix awf-runner timeout detection and no-docker test timeouts --- tests/fixtures/awf-runner.ts | 26 ++++++++++++++++++++++++++ tests/integration/no-docker.test.ts | 8 ++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/tests/fixtures/awf-runner.ts b/tests/fixtures/awf-runner.ts index 79e53181..4540ad2f 100644 --- a/tests/fixtures/awf-runner.ts +++ b/tests/fixtures/awf-runner.ts @@ -195,6 +195,19 @@ export class AwfRunner { throw error; } + // With reject: false, execa returns instead of throwing on timeout. + // Detect this case and return a proper timeout result. + if (result.timedOut) { + return { + exitCode: -1, + stdout: result.stdout || '', + stderr: result.stderr || '', + success: false, + timedOut: true, + workDir: this.extractWorkDir(result.stderr || ''), + }; + } + // Extract work directory from stderr logs const workDir = this.extractWorkDir(result.stderr || ''); @@ -389,6 +402,19 @@ export class AwfRunner { throw error; } + // With reject: false, execa returns instead of throwing on timeout. + // Detect this case and return a proper timeout result. + if (result.timedOut) { + return { + exitCode: -1, + stdout: result.stdout || '', + stderr: result.stderr || '', + success: false, + timedOut: true, + workDir: this.extractWorkDir(result.stderr || ''), + }; + } + const workDir = this.extractWorkDir(result.stderr || ''); // Normalize exit code to handle undefined (defaults to 0) diff --git a/tests/integration/no-docker.test.ts b/tests/integration/no-docker.test.ts index 0a27f3d3..a4bb0b57 100644 --- a/tests/integration/no-docker.test.ts +++ b/tests/integration/no-docker.test.ts @@ -50,7 +50,7 @@ describe('Docker-in-Docker removal (PR #205)', () => { { allowDomains: ['github.com'], logLevel: 'debug', - timeout: 30000, + timeout: 120000, buildLocal: true, } ); @@ -63,7 +63,7 @@ describe('Docker-in-Docker removal (PR #205)', () => { const result = await runner.runWithSudo('docker run alpine echo hello', { allowDomains: ['github.com'], logLevel: 'debug', - timeout: 30000, + timeout: 120000, buildLocal: true, }); @@ -78,7 +78,7 @@ describe('Docker-in-Docker removal (PR #205)', () => { const result = await runner.runWithSudo('which docker-compose', { allowDomains: ['github.com'], logLevel: 'debug', - timeout: 30000, + timeout: 120000, buildLocal: true, }); @@ -93,7 +93,7 @@ describe('Docker-in-Docker removal (PR #205)', () => { { allowDomains: ['github.com'], logLevel: 'debug', - timeout: 30000, + timeout: 120000, buildLocal: true, } );