Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates AWF’s api-proxy + Copilot BYOK flow so the agent-side Copilot CLI runs in offline+BYOK mode (skipping the GitHub OAuth handshake) when inference is routed through the api-proxy using COPILOT_API_KEY, while keeping the GitHub-token-based Copilot flow unchanged.
Changes:
- Inject
COPILOT_OFFLINE,COPILOT_PROVIDER_BASE_URL, and a placeholderCOPILOT_PROVIDER_API_KEYinto the agent environment for theenableApiProxy + copilotApiKeypath. - Add
COPILOT_PROVIDER_API_KEYtoAWF_ONE_SHOT_TOKENSand extend agent-side health checks to validate placeholder credential isolation. - Document the new env vars in the api-proxy sidecar documentation.
Show a summary per file
| File | Description |
|---|---|
src/docker-manager.ts |
Sets offline+BYOK Copilot env vars and adds COPILOT_PROVIDER_API_KEY to one-shot-token protection for the api-proxy BYOK path. |
src/docker-manager.test.ts |
Adds unit tests asserting the new Copilot offline+BYOK env var behavior and one-shot-token list inclusion. |
containers/agent/api-proxy-health-check.sh |
Extends preflight checks to validate COPILOT_PROVIDER_API_KEY is a placeholder and logs BYOK base URL when present. |
docs/api-proxy-sidecar.md |
Documents the new Copilot offline+BYOK env vars passed to the agent container. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The checkDockerHost function used a Set of two hardcoded socket paths (/var/run/docker.sock, /run/docker.sock) to validate DOCKER_HOST. Any other unix socket path (e.g. /tmp/custom-docker.sock) was incorrectly rejected as an external daemon. All unix:// sockets are local by definition — only TCP endpoints (tcp://host:port) indicate an external Docker daemon incompatible with AWF's network isolation model. Replace the Set lookup with a unix:// prefix check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (2 files)
Coverage comparison generated by |
|
Smoke Test Results (run 24292329628) ✅ GitHub MCP: "fix: accept any unix socket in checkDockerHost" / "fix: use gh CLI and Bearer auth for setup action latest version fetch" Overall: PASS
|
🔥 Smoke Test Results — PASS
Overall: PASS | Author:
|
Smoke Test: GitHub Actions Services Connectivity ✅All checks passed:
|
Chroot Version Comparison Results
Overall result: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot environments.
|
This comment has been minimized.
This comment has been minimized.
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Smoke test summary (run 24307173096)
|
When AWF's API proxy sidecar handles Copilot inference via
COPILOT_API_KEY, Copilot CLI would still attempt a GitHub OAuth handshake — unnecessary latency and an auth failure mode. This adds the new offline+BYOK env vars to eliminate that dependency.Changes
src/docker-manager.tsenableApiProxy && copilotApiKey, inject three new agent env vars:COPILOT_OFFLINE=true— skip GitHub OAuth handshake for inferenceCOPILOT_PROVIDER_BASE_URL=http://172.30.0.30:10002— point Copilot CLI's BYOK provider at the sidecarCOPILOT_PROVIDER_API_KEY=placeholder-token-for-credential-isolation— placeholder set early (pre---env-all) so the real key never reaches the agentCOPILOT_PROVIDER_API_KEYtoAWF_ONE_SHOT_TOKENScopilotApiKeypath; thecopilotGithubTokenflow is unchangedcontainers/agent/api-proxy-health-check.shCOPILOT_PROVIDER_API_KEYis the placeholder value (credential isolation check)COPILOT_PROVIDER_BASE_URLwhen offline+BYOK mode is activedocs/api-proxy-sidecar.mdEnv var flow (BYOK path)
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:
github.blog/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either: