From 59fcf4ec032692a307d7e8daf4295088f80d27eb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 27 May 2026 03:47:07 +0000 Subject: [PATCH 1/2] Initial plan From fe158371b9d637fe362c0c513a22c08a42b3eea6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 27 May 2026 03:53:01 +0000 Subject: [PATCH 2/2] fix: remove dead cleanupFirewallNetwork export --- src/host-iptables-network.test.ts | 22 ---------------------- src/host-iptables-network.ts | 17 ----------------- 2 files changed, 39 deletions(-) diff --git a/src/host-iptables-network.test.ts b/src/host-iptables-network.test.ts index 25d650b22..a100b9f5d 100644 --- a/src/host-iptables-network.test.ts +++ b/src/host-iptables-network.test.ts @@ -1,5 +1,4 @@ import { execaResult, mockedExeca, setupHostIptablesTestSuite } from './test-helpers/host-iptables-test-setup'; -import { cleanupFirewallNetwork } from './host-iptables-network'; import { ensureFirewallNetwork } from './host-iptables'; import { iptablesSharedTestHelpers } from './host-iptables-shared'; @@ -61,25 +60,4 @@ describe('host-iptables (network)', () => { ], { env: expect.any(Object) }); }); }); - - describe('cleanupFirewallNetwork', () => { - it('should remove the firewall network', async () => { - mockedExeca.mockResolvedValue(execaResult({ - stdout: '', - stderr: '', - exitCode: 0, - })); - - await cleanupFirewallNetwork(); - - expect(mockedExeca).toHaveBeenCalledWith('docker', ['network', 'rm', 'awf-net'], { reject: false, env: expect.any(Object) }); - }); - - it('should not throw on errors (best-effort cleanup)', async () => { - mockedExeca.mockRejectedValue(new Error('network removal error')); - - // Should not throw - await expect(cleanupFirewallNetwork()).resolves.not.toThrow(); - }); - }); }); diff --git a/src/host-iptables-network.ts b/src/host-iptables-network.ts index c9fdbca2d..4f86c2683 100644 --- a/src/host-iptables-network.ts +++ b/src/host-iptables-network.ts @@ -47,20 +47,3 @@ export async function ensureFirewallNetwork(): Promise<{ proxyIp: '172.30.0.30', }; } - -/** - * Removes the firewall network. - * - * @internal Test-only helper for cleaning up the dedicated firewall network. - */ -export async function cleanupFirewallNetwork(): Promise { - logger.debug(`Removing firewall network '${NETWORK_NAME}'...`); - - try { - await execa('docker', ['network', 'rm', NETWORK_NAME], { reject: false, env: getLocalDockerEnv() }); - logger.debug('Firewall network removed'); - } catch (error) { - logger.debug('Error removing firewall network:', error); - // Don't throw - cleanup should be best-effort - } -}