Skip to content

revert: remove Squid intercept mode and all cascading fixes#541

Merged
Mossaka merged 1 commit intomainfrom
revert/intercept-mode
Feb 6, 2026
Merged

revert: remove Squid intercept mode and all cascading fixes#541
Mossaka merged 1 commit intomainfrom
revert/intercept-mode

Conversation

@Mossaka
Copy link
Collaborator

@Mossaka Mossaka commented Feb 6, 2026

Summary

Reverts 8 commits that introduced Squid intercept mode and the cascade of fixes that followed.

What's being reverted

PR Title Why revert
#520 Enable Squid intercept mode Root cause — unnecessary complexity
v0.13.5 Release Released the broken intercept mode
#524 Remove HTTP_PROXY/HTTPS_PROXY Only needed because of #520
#526 Recompile lock files for v0.13.5 Only needed because of #520
#527 Fix lock files release mode Fixing #526's mistake
#522 Mount /etc/hosts, fix HTTP test Mixed fixes, includes intercept-related changes
#530 Restore HTTPS_PROXY, fix chroot Fixing #524's mistake
v0.13.6 Release Released the fixes-of-fixes

Why

The intercept mode was introduced to fix Codex (Rust/reqwest) failing with HTTP_PROXY. But the simpler fix is to just remove HTTP_PROXY for Codex — no need for a whole new proxy mode. The intercept mode caused a cascade of breakage:

  1. HTTPS can't be transparently intercepted (needs CONNECT method through explicit proxy)
  2. Image version bumps required lock file recompilation (which was done wrong twice)
  3. host.docker.internal traffic crashed Squid under heavy MCP load
  4. 6+ PRs needed to fix each regression

What we return to

The pre-#520 explicit proxy mode:

  • HTTP_PROXY + HTTPS_PROXY → Squid port 3128
  • iptables DNAT to port 3128 (explicit proxy, not intercept)
  • All engines (Copilot, Claude, Codex) work with explicit proxy

Test plan

  • 728 unit tests pass
  • Build succeeds
  • Lint passes (0 errors)
  • Smoke Copilot passes
  • Smoke Claude passes
  • All build tests pass

🤖 Generated with Claude Code

Reverts the following PRs which introduced unnecessary complexity:

- #520: fix: enable Squid intercept mode for NAT-redirected traffic
- v0.13.5 release: chore(release): bump version to 0.13.5
- #524: fix: remove HTTP_PROXY/HTTPS_PROXY env vars from agent container
- #526: chore: recompile workflow lock files for AWF v0.13.5
- #527: fix: recompile lock files with release action mode
- #522: fix: mount /etc/hosts in chroot and fix HTTP blocking test
- #530: fix: restore HTTPS_PROXY, fix chroot hosts/permissions, fix Bun crash
- v0.13.6 release: chore(release): bump version to 0.13.6

The intercept mode (#520) was introduced to fix Codex failing with
HTTP_PROXY, but the simpler fix is to just not set HTTP_PROXY for
Codex. The intercept mode introduced a cascade of breakage:
- HTTPS can't be transparently intercepted (needs CONNECT method)
- Image version bumps required lock file recompilation
- host.docker.internal traffic crashed Squid under load
- Multiple PRs needed to fix each regression

This reverts to the pre-#520 explicit proxy mode (HTTP_PROXY/HTTPS_PROXY
pointing to Squid port 3128) which worked for all engines.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 6, 2026 00:19
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Chroot tests failed Smoke Chroot failed - See logs for details.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

⚠️ Coverage Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

Metric Base PR Delta
Lines 82.12% 82.08% 📉 -0.04%
Statements 82.16% 82.12% 📉 -0.04%
Functions 81.95% 81.95% ➡️ +0.00%
Branches 75.48% 75.41% 📉 -0.07%
📁 Per-file Coverage Changes (2 files)
File Lines (Before → After) Statements (Before → After)
src/docker-manager.ts 83.0% → 82.9% (-0.09%) 82.3% → 82.2% (-0.09%)
src/squid-config.ts 95.2% → 95.1% (-0.06%) 95.2% → 95.2% (-0.05%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Smoke Test Results 🧪

@Mossaka — All tests passed ✅

Last 2 merged PRs:

Test Results:

  • ✅ GitHub MCP: Retrieved merged PRs
  • ✅ Playwright: GitHub page title verified
  • ✅ File I/O: Test file created and verified
  • ✅ Bash: Commands executed successfully

Status: PASS

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Go Build Test Results

Project Download Tests Status
color 1/1 PASS
env 1/1 PASS
uuid 1/1 PASS

Overall: PASS

AI generated by Build Test Go

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Build Test: Node.js - Results

Project Install Tests Status
clsx PASS PASS
execa PASS PASS
p-limit PASS PASS

Overall: PASS

All Node.js projects built and tested successfully.

AI generated by Build Test Node.js

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Build Test: Deno - Results

Project Tests Status
oak 1/1 ✅ PASS
std 1/1 ✅ PASS

Overall: ✅ PASS

All Deno tests completed successfully.

AI generated by Build Test Deno

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Smoke Test Results: PASS

Last 2 Merged PRs:

Test Results:

  • ✅ GitHub MCP: Retrieved PRs successfully
  • ✅ Playwright: Page title verified (contains "GitHub")
  • ✅ File Write: Created test file
  • ✅ Bash: Verified file content

Status: All tests passed

AI generated by Smoke Claude

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

C++ Build Test Results

Project CMake Build Status
fmt PASS
json PASS

Overall: PASS

All C++ projects built successfully.

AI generated by Build Test C++

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Rust Build Test Results

Project Build Tests Status
fd 1/1 PASS
zoxide 1/1 PASS

Overall: PASS

All Rust projects built successfully and all tests passed.

AI generated by Build Test Rust

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Build Test: Bun - FAILED ❌

Installation Status

  • ✅ Bun v1.3.8 downloaded successfully
  • Runtime crashes on execution

Test Results

Project Install Tests Status
elysia ❌ NotDir error ❌ Core dump FAIL
hono ❌ NotDir error ❌ Core dump FAIL

Overall: FAIL

Error Details

  1. bun install error: An internal error occurred (NotDir)
  2. bun test error: Aborted (core dumped) (exit code 134)

Root Cause

Bun v1.3.8 is incompatible with this GitHub Actions runner environment (Ubuntu 24.04). The runtime crashes with segmentation faults on both install and test commands.

Environment Info

  • OS: Ubuntu 24.04 (ubuntu24)
  • Bun: v1.3.8+b64edcb49
  • Kernel: GitHub Actions runner
  • Architecture: x86-64

Recommendation

This failure is due to a Bun runtime compatibility issue, not the test repositories. Consider:

  • Testing with an older Bun version
  • Using a different runner OS (Ubuntu 22.04)
  • Investigating system requirements for Bun v1.3.8

AI generated by Build Test Bun

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

❌ Java Build Test Failed

Environment Error

Unable to execute Java or Maven in the test environment. All attempts to run Java binaries result in bash version output instead of Java execution.

Error Details:

  • ✅ Repository cloned successfully: Mossaka/gh-aw-firewall-test-java
  • ✅ Java binaries exist at: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.10-7/x64/bin/java
  • ✅ Maven installed at: /usr/share/apache-maven-3.9.12/
  • Critical: ELF binaries do not execute properly - all executions return bash version instead

Test Results:

Project Compile Tests Status
gson ❌ ENV ERROR - FAILED
caffeine ❌ ENV ERROR - FAILED

Overall: FAILED (Environment Issue)

This appears to be a Docker/AWF container configuration problem where ELF executables cannot run properly. The environment requires debugging before Java build tests can proceed.

AI generated by Build Test Java

@Mossaka Mossaka merged commit 2eb8b02 into main Feb 6, 2026
85 of 87 checks passed
@Mossaka Mossaka deleted the revert/intercept-mode branch February 6, 2026 00:34
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Smoke Test Results

Last 2 merged PRs:

Test Results:

  • ✅ GitHub MCP: Retrieved PR data
  • ✅ Playwright: Verified GitHub homepage title
  • ✅ File Write: Created test file
  • ✅ Bash Tool: Verified file contents

Status: PASS 🎉

cc @Mossaka

AI generated by Smoke Copilot

Mossaka added a commit that referenced this pull request Feb 6, 2026
The intercept mode revert (#541) missed 3 references to
SQUID_INTERCEPT_PORT in docker-manager.ts: the constant definition,
the port mapping on the Squid container, and the env var passed to
the agent container. Squid no longer listens on port 3129, so these
are dead code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mossaka added a commit that referenced this pull request Feb 6, 2026
* fix: ensure .copilot directory permissions before Copilot CLI install

The Copilot CLI verification step tries to create
/home/runner/.copilot/pkg/ which fails with EACCES if the directory
was previously created with root ownership (e.g., by sudo -E awf
during chroot version tests).

Add a step to create .copilot with correct runner ownership before
the Copilot CLI install in both the .md source and lock file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: remove leftover SQUID_INTERCEPT_PORT references from revert

The intercept mode revert (#541) missed 3 references to
SQUID_INTERCEPT_PORT in docker-manager.ts: the constant definition,
the port mapping on the Squid container, and the env var passed to
the agent container. Squid no longer listens on port 3129, so these
are dead code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant