Skip to content

Document host-run Compose access from firewalled Playwright - #9560

Merged
lpcox merged 4 commits into
mainfrom
copilot/awf-document-reach-host-docker-compose
Oct 7, 2026
Merged

lpcox merged 4 commits into
mainfrom
copilot/awf-document-reach-host-docker-compose

Conversation

Copilot AI commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Playwright’s localhost is the agent sandbox, not the runner host. Existing guidance lacked a supported path to host-run Compose stacks and left Squid’s host.docker.internal resolution unclear.

  • Compose connectivity: Add a minimal Compose/Playwright example using --topology-attach. Explain container-name/container-port addressing and preservation of the frontend’s Compose network.
  • Host access: Clarify host-gateway mappings, automatic host-access enablement, explicit browser proxy configuration, and port semantics.
  • Trust boundaries: Document attached peers’ any-port access, untrusted-PR risks, and why disabling the agent firewall is discouraged.
  • Regression coverage: Add coverage for direct/proxied frontend access, backend network retention, and denied external destinations.
awf --network-isolation \
  --topology-attach awf-compose-web \
  --allow-domains awf-compose-web \
  -- npx playwright test tests/compose.spec.ts

The browser navigates to http://awf-compose-web:80; no published host port is needed.

Copilot AI and others added 2 commits October 7, 2026 18:06
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] Document reaching a host-run docker-compose stack from firewalled agent Document host-run Compose access from firewalled Playwright Oct 7, 2026
Copilot AI requested a review from lpcox October 7, 2026 18:10
@lpcox
lpcox marked this pull request as ready for review October 7, 2026 19:15
Copilot AI balanced review requested due to automatic review settings October 7, 2026 19:15

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 new test is excluded from CI, and parts of the gh-aw and CLI documentation remain unsupported or contradictory.

4 open findings
What changed in this PR

Documents supported connectivity from firewalled Playwright sessions to host-run Compose stacks and host services.

Changes:

  • Adds topology-attachment guidance and security boundaries.
  • Clarifies host-gateway, proxy, and port behavior.
  • Adds Compose topology integration coverage.
File Description
tests/​integration/​topology-compose.test.ts Tests attached frontend connectivity and network retention.
docs/​usage.md Documents Compose and host-gateway access.
docs-site/​src/​content/​docs/​guides/​server-connectivity.md Updates host-service connectivity guidance.
docs-site/​src/​content/​docs/​guides/​playwright-testing.md Adds detailed Playwright and Compose examples.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

import { createRunner } from '../fixtures/awf-runner';
import { cleanup } from '../fixtures/cleanup';

describe('Compose topology attachment', () => {
Comment on lines +99 to +101
Ensure your compiler passes the attachment through to AWF, and direct its
Playwright tool to `http://awf-compose-web:80`. gh-aw's external-domain field is
`network.allowed`; it is distinct from AWF's `network.allowDomains`. Keep stack
Comment thread docs/usage.md
proxy) instead of host iptables. Requires no sudo / NET_ADMIN, so it
works inside ARC / Kubernetes DinD runners. Not yet supported with
--dns-over-https or --enable-host-access. (default: false)
--dns-over-https. (default: false)
Comment thread docs/usage.md
> ⚠️ **Security Warning**: Host access exposes services reachable on the permitted host ports, including unrelated services on those ports. Treat the host as a trust boundary.
>
> **Port restrictions:** Use `--allow-host-ports` to explicitly restrict which ports can be accessed (e.g., `--allow-host-ports 80,443,8080`). A future update will make port restrictions the default behavior.
> **Port restrictions:** Squid permits ports 80 and 443 by default. `--allow-host-ports` adds ports to Squid's `Safe_ports` for allowlisted destinations; it does not restrict attached peers or create a direct host route in topology mode.
@lpcox

lpcox commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

@copilot address review feedback

Copilot AI commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot address review feedback

Addressed in d057c9d: the Compose test is selected by the CI network job, gh-aw guidance now reflects its supported handoff, and CLI/help port semantics are aligned.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@copilot Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

  1. Download the docs-preview-pr-9560 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit 93d4669

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 92.99% 93.00% 📈 +0.01%
Statements 91.49% 91.49% ➡️ +0.00%
Functions 90.20% 90.20% ➡️ +0.00%
Branches 85.24% 85.25% 📈 +0.01%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/log-directory-setup.ts 96.8% → 100.0% (+3.18%) 96.9% → 100.0% (+3.13%)

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

@lpcox
lpcox enabled auto-merge (squash) October 7, 2026 20:13
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request...

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

💎 Smoke Gemini is crystallizing results on this pull request...

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

📡 Smoke OTel Tracing is starting OTel tracing validation...

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ Build Test Suite completed successfully!

Generated by Build Test Suite for #9560

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

Tested by Smoke Chroot

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Claude passed

Generated by Smoke Claude for #9560

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Smoke Cloud Hypervisor reports failed. Cloud Hypervisor + Copilot failed.

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request...

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation is verifying network-isolation egress on this pull request...

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request...

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Cloud Hypervisor + Copilot Smoke Test

  1. PASS — list_pull_requests call succeeded (returned data, though filter returned an open PR, not merged)
  2. PASS — https://github.com returned HTTP 200
  3. PASS — Wrote and read back unique file smoke-cloud-hypervisor-37680433910.txt
  4. PASS — (example.com/redacted) blocked (curl exit 60, HTTP 000)

Overall: PASS

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Smoke services: Redis PING ✅ | pg_isready ✅ | SELECT 1 ✅ — PASS

🔌 Service connectivity validated by Smoke Services
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Copilot BYOK Smoke Test Results

✅ GitHub MCP Test: PR #9568 and #9567 verified
✅ HTTP Connectivity: api.githubcopilot.com returned 200
✅ File Write/Read: Test file verified
✅ BYOK Inference: Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) via api-proxy → api.githubcopilot.com

Status: PASS

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

  • API status: ✅ PASS
  • GitHub check: ✅ PASS
  • File status: ✅ PASS

Overall result: PASS

Generated by Smoke Claude for #9560 · claude · haiku45 · 45.4 AIC · ⊞ 6.1K · ◷
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot: PASS ✅

  • GitHub MCP ✅ (latest merged: "Pin NVX v0.1.0-dev.be859aa77ffa")
  • github.com HTTP 200 ✅
  • File write/read ✅
    Author @Copilot; assignees @lpcox @Copilot

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia ❌ not run ❌ FAIL
Bun hono ❌ not run ❌ FAIL
C++ fmt ✅ N/A ✅ PASS
C++ json ✅ N/A ✅ PASS
Deno oak N/A not run ❌ FAIL
Deno std N/A not run ❌ FAIL
.NET hello-world ✅ N/A ✅ PASS
.NET json-parse ✅ N/A ✅ PASS
Go color ✅ pass (ok) ✅ PASS
Go env ✅ pass (ok) ✅ PASS
Go uuid ✅ pass (ok) ✅ PASS
Java gson ✅ 1/1 passed ✅ PASS
Java caffeine ✅ 1/1 passed ✅ PASS
Node.js clsx ✅ passed ✅ PASS
Node.js execa ✅ passed ✅ PASS
Node.js p-limit ✅ passed ✅ PASS
Rust fd ✅ 1/1 passed ✅ PASS
Rust zoxide ✅ 1/1 passed ✅ PASS

Overall: 6/8 ecosystems passed — FAIL

Failure details

  • Bun and Deno: all repository clones succeeded, but the curl ... | bash and curl ... | sh installer commands were denied by the sandbox. Bun and Deno are not on PATH, so no tests ran.
  • Java: the default ~/.m2/repository couldn't be created, so I used -Dmaven.repo.local=/tmp/gh-aw/agent/m2. Both projects then built and tested successfully.

The build-test label was not added because of the failures.

Generated by Build Test Suite for #9560 · copilot · auto · 17.1 AIC · ⊞ 11.9K · ◷
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Chroot Version Comparison

Runtime Host Version Chroot Version Match?
Python Python 3.12.15 Python 3.12.15 ✅ YES
Node.js v24.21.0 v22.23.2 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Result: ❌ Not all tests passed. Node.js differs between host and chroot, so the smoke-chroot label was not added.

Tested by Smoke Chroot
Add label ready-for-aw to run again

@lpcox
lpcox disabled auto-merge October 7, 2026 20:46
@lpcox
lpcox merged commit 42f04e8 into main Oct 7, 2026
121 of 137 checks passed
@lpcox
lpcox deleted the copilot/awf-document-reach-host-docker-compose branch October 7, 2026 20:51

This branch had an error being deployed

1 failed deployment
aoai-model — d057c9dd Deployed Oct 7, 2026 by lpcox via Conclusion #1903
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.

[awf] docs/topologyAttach: document reaching a host-run docker-compose stack from the firewalled agent

3 participants