Skip to content

refactor: remove legacy bounded execution in favor of MCP enclaves - #6994

Merged
lpcox merged 4 commits into
mainfrom
lpcox-remove-bounded-execution
Aug 7, 2026
Merged

refactor: remove legacy bounded execution in favor of MCP enclaves#6994
lpcox merged 4 commits into
mainfrom
lpcox-remove-bounded-execution

Conversation

@lpcox

@lpcox lpcox commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Stack

Final layer 5, targeting lpcox-enclave-mcpg-integration (#6992).

Depends on:

Summary

  • Remove the retired bounded query and bounded agent config/API surfaces, wrappers, skills, ingress paths, brokers, services, images, workflows, fixtures, tests, and guides.
  • Reject both removed top-level configuration keys as invalid unknown fields; there is no compatibility mode or legacy fallback.
  • Consolidate staging, finite disclosure, shared per-repository budgeting, private audit, runtime preflight, cleanup, and telemetry behind one AWF-owned enclave MCP server.
  • Expose only enclave_run_script and enclave_run_agent, conditionally by enabled executor, with primary-agent access exclusively through mcpg.
  • Publish and scan only enclave-script, enclave-agent, and enclave-mcp-server images from containers/enclave/Dockerfile.
  • Preserve script no-network isolation and agent API-proxy-only isolation, including exact network topology/membership checks before every agent launch.
  • Strip GitHub credential aliases from the primary-agent environment whenever enclaves are enabled.
  • Preserve graceful cleanup telemetry and explicitly mark incomplete audit artifacts if graceful shutdown cannot be confirmed.

Rollout ordering

Do not enable this layer until github/gh-aw#50920's compiler contract and github/gh-aw-mcpg#10784's late backend rediscovery are available. The latter requires MCP Gateway spec 1.15.0 and the first gh-aw-mcpg release after v0.4.8 containing it. Firewall readiness continues to retry 503 backend_unavailable within AWF_ENCLAVE_MCP_READINESS_TIMEOUT_MS; that behavior is inherited from #6992 rather than duplicated here.

Validation

Passed locally:

  • Enclave script image build and read-only/no-network execution smoke
  • Unified MCP server image build and module-graph import validation
  • Script-only, agent-only, and dual-executor MCP tool-publication smokes
  • Exact API-proxy-only agent network topology and per-launch membership checks
  • Graceful shutdown/cleanup telemetry smoke
  • Container JavaScript syntax, Python compile, shell syntax
  • Workflow/action YAML parsing
  • Runtime/docs schema generation and byte parity
  • Repository diff/whitespace checks
  • Repository-wide legacy identifier/path/image/service residual searches
  • Multiple security-focused code-review and rubber-duck passes

Environment-blocked locally:

  • npm ci cannot fetch typescript-eslint@8.66.0 (ENOTCONN; Microsoft mirror also lacks the tarball), so TypeScript type-check/build, Jest suites, and changed-file ESLint could not run.
  • The enclave-agent image build cannot fetch @github/copilot@1.0.34 from npm in this environment.
  • Docker Desktop has no registered runsc, so the gVisor smoke remains CI-only.

Intentional residual terminology

The removed names remain only in the explicit migration tables in docs/awf-config-spec.md and docs/enclaves-architecture.md, mapping old concepts to enclave_run_script and enclave_run_agent. There are no active code, config, workflow, image, service, or wrapper references.

Copilot AI balanced review requested due to automatic review settings August 6, 2026 22:26

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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@lpcox
lpcox requested a balanced review from Copilot August 6, 2026 23:49

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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

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

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Documentation Preview

Documentation build failed for this PR. View logs.

Built from commit e204f32

@lpcox

lpcox commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot merge main

Copilot AI commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@copilot merge main

Merged main in ca85a36. Resolved modify/delete conflicts on containers/bounded-agent/Dockerfile and containers/bounded-query/Dockerfile by keeping the deletion (main only bumped their Node base image tag). tsc --noEmit and npm test pass; one pre-existing unrelated failure in src/enclave/runtime-preflight.test.ts was confirmed present before this merge too.

@lpcox
lpcox force-pushed the lpcox-remove-bounded-execution branch from ca85a36 to f55df81 Compare August 7, 2026 01:48
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude passed

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Build Test Suite completed successfully!

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Security Guard failed. Please review the logs for details.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Contribution Check failed. Please review the logs for details.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Gemini completed. All facets verified. 💎

Smoke test: connectivity check

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Security Guard failed. Please review the logs for details.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Contribution Check failed. Please review the logs for details.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

📰 DEVELOPING STORY: Smoke Copilot reports failed to deliver outputs. Our correspondents are investigating the incident...

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Gemini completed. All facets verified. 💎

Smoke test completed with partial success (File/Bash ✅, MCP/Net ❌). Results posted to PR 6994.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation reports failed to deliver outputs while checking network isolation. Investigate the egress model.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Build Test Failed Build Test Suite - See logs for details

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

📰 DEVELOPING STORY: Smoke Docker Sbx reports failed to deliver outputs. Our correspondents are investigating the incident...

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (Entra) reports failed to deliver outputs. AOAI BYOK (Entra) mode investigation needed...

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

Check Status
API ✅ PASS
gh CLI ✅ PASS
File ✅ PASS

Overall result: PASS

Generated by Smoke Claude for #6994 · haiku45 · 59.9 AIC · ⊞ 3.6K ·
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode

✅ GitHub MCP connectivity (PR fetch works)
✅ GitHub.com connectivity (HTTP 200)
✅ File write/read test (artifact verified)
✅ BYOK inference path (agent → api-proxy → api.githubcopilot.com)

Status: PASS — Running in direct BYOK mode via COPILOT_PROVIDER_API_KEY with api-proxy sidecar authentication.

Recent PRs: #7027 (v0.86.0 upgrade), #6996 (api-proxy alias fix)

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

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot Engine@lpcox

Overall: PASS

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

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass

✅ Allowed domain (api.github.com): reachable, HTTP 200
✅ Blocked domain (example.com): denied (CONNECT tunnel failed, 403)

Overall: PASS

cc @lpcox

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: API Proxy OTEL Tracing

  • Module Loading: otel.js loads cleanly, exports startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled.
  • Test Suite: otel.test.js, otel-fanout.test.js, otel-workload-identity.test.js — 68/68 tests passed.
  • Env Var Forwarding: env-passthrough.ts forwards GITHUB_AW_OTEL_TRACE_ID/GITHUB_AW_OTEL_PARENT_SPAN_ID (and COPILOT_OTEL_FILE_EXPORTER_PATH) into the agent; api-proxy-env-config.ts buildOtelEnv() forwards OTLP endpoint/headers, service name, and parent trace context into api-proxy.
  • Token Tracker Integration: onUsage callback present in token-tracker-http.js (invoked after normalized usage extraction) as the OTEL hook point.
  • i️ OTEL Diagnostics: Not independently re-verified in this pass (no live span export check performed); relies on prior pre-step output.

Result: All checked scenarios passed.

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke test:

  • MCP: ✅
  • GH.com: ✅
  • File I/O: ✅
  • BYOK Inference: ✅

Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw)

@lpcox Overall: PASS

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test Results: GitHub Actions Services Connectivity

  • Redis PING: ❌ (Temporary failure in name resolution)
  • PostgreSQL pg_isready: ❌ (no response)
  • PostgreSQL SELECT 1: ❌ (could not translate host name "host.docker.internal")

Overall: FAILhost.docker.internal could not be resolved from the AWF sandbox in all three checks.

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

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Gemini Engine Validation

  • GitHub MCP Testing: ❌ (Tools unavailable or failed)
  • GitHub.com Connectivity: ❌ (HTTP 000)
  • File Writing Testing: ✅
  • Bash Tool Testing: ✅

Overall status: FAIL

💎 Faceted by Smoke Gemini
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Chroot Version Comparison Results

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

Overall: FAILED — Node.js version mismatch between host (v24.18.0) and chroot (v22.23.2) environments. The smoke-chroot label was not added since not all tests passed.

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

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia 1/1 passed ✅ PASS
Bun hono 1/1 passed ✅ PASS
C++ fmt N/A ✅ PASS
C++ json N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world N/A ✅ PASS
.NET json-parse N/A ✅ PASS
Go color 1/1 passed ✅ PASS
Go env 1/1 passed ✅ PASS
Go uuid 1/1 passed ✅ 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: 8/8 ecosystems passed — PASS

Notes:

  • Java required -Dmaven.repo.local=<writable path> since the default ~/.m2/repository was not writable in this environment; Maven proxy settings (~/.m2/settings.xml) worked correctly through the AWF Squid proxy for downloading dependencies.
  • All network access (git clone, package installs, dependency downloads) succeeded through the firewall for allowed domains.

Generated by Build Test Suite for #6994 · auto · 39.7 AIC · ⊞ 11.5K ·
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

chore: upgrade gh-aw to v0.86.0 pre-release and recompile workflows: ✅
fix(api-proxy): stop alias fallback picking arbitrary models: ✅
GitHub MCP connectivity: ✅
GitHub.com connectivity: ✅
File write/read: ✅
BYOK inference: ✅
Running in direct BYOK mode (AWF_AUTH_TYPE=github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) authenticated via Microsoft Entra
Overall: PASS
Thanks @lpcox

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Docker Sbx Validation

  1. MCP connectivity (github-list_pull_requests): ✅
  2. GitHub.com connectivity: ✅ (HTTP 200)
  3. File write/read: ✅

Overall: PASS

PRs checked: #7027 "chore: upgrade gh-aw to v0.86.0 pre-release and recompile workflows", #6996 "fix(api-proxy): stop alias fallback picking arbitrary models"

cc @lpcox

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

@lpcox
lpcox merged commit 2bf9909 into main Aug 7, 2026
130 of 142 checks passed
@lpcox
lpcox deleted the lpcox-remove-bounded-execution branch August 7, 2026 23:14
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.

3 participants