Skip to content

Hide Cloud Hypervisor runtime backend implementation - #7700

Merged
lpcox merged 2 commits into
mainfrom
copilot/remove-unused-export-cloudhypervisorruntimebackend
Aug 24, 2026
Merged

Hide Cloud Hypervisor runtime backend implementation#7700
lpcox merged 2 commits into
mainfrom
copilot/remove-unused-export-cloudhypervisorruntimebackend

Conversation

Copilot AI commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

The Cloud Hypervisor runtime backend class was exported despite having no external production consumers, expanding the API surface of a security-critical microVM boundary.

  • API surface

    • Made CloudHypervisorRuntimeBackend file-private.
    • Kept createCloudHypervisorRuntimeBackend() as the public construction path.
    • Returned the public ExternalAgentRuntimeBackend interface from the factory.
  • Tests

    • Replaced direct test imports/construction of the backend class with an internal test helper seam.
    • Preserved dependency injection coverage without exposing the implementation class.
export function createCloudHypervisorRuntimeBackend(
  config: WrapperConfig,
  startInfrastructure: WorkflowDependencies['startContainers'],
): ExternalAgentRuntimeBackend {
  return new CloudHypervisorRuntimeBackend(config, defaultDependencies(startInfrastructure));
}

class CloudHypervisorRuntimeBackend implements ExternalAgentRuntimeBackend {
  // private implementation detail
}

Copilot AI changed the title [WIP] Remove unused export CloudHypervisorRuntimeBackend Hide Cloud Hypervisor runtime backend implementation Aug 24, 2026
Copilot AI requested a review from lpcox August 24, 2026 14:50
@lpcox
lpcox marked this pull request as ready for review August 24, 2026 14:54
Copilot AI balanced review requested due to automatic review settings August 24, 2026 14:54

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.

Pull request overview

Hides the Cloud Hypervisor backend implementation behind its public interface, resolving #7691.

Changes:

  • Makes the implementation class file-private.
  • Adds an internal dependency-injection test helper.
  • Updates tests to use public or test-specific factory seams.
Show a summary per file
File Description
src/cloud-hypervisor-runtime-backend.ts Narrows the exported API and adds a test construction helper.
src/cloud-hypervisor-runtime-backend.test.ts Replaces direct class construction with factory helpers.

Review details

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@github-actions

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

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 93.85% 93.87% 📈 +0.02%
Statements 92.73% 92.74% ➡️ +0.01%
Functions 93.16% 93.16% ➡️ +0.00%
Branches 86.11% 86.12% 📈 +0.01%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/log-directory-setup.ts 96.2% → 100.0% (+3.78%) 96.3% → 100.0% (+3.71%)

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

@github-actions

github-actions Bot commented Aug 24, 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 Aug 24, 2026

Copy link
Copy Markdown
Contributor

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

Warning

Firewall blocked 3 domains

The following domains were blocked by the firewall during workflow execution:

  • msfeed2.pkgs.visualstudio.com
  • msfeed25.pkgs.visualstudio.com
  • registry.npmjs.org

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

network:
  allowed:
    - defaults
    - "msfeed2.pkgs.visualstudio.com"
    - "msfeed25.pkgs.visualstudio.com"
    - "registry.npmjs.org"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude passed

Generated by Smoke Claude for #7700

@lpcox
lpcox deployed to aoai-model August 24, 2026 15:04 — with GitHub Actions Active
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

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

📡 OTel tracing validated by Smoke OTel Tracing

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Build Test Suite completed successfully!

Generated by Build Test Suite for #7700

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Smoke Gemini reports failed. Facets need polishing...

💎 Faceted by Smoke Gemini

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

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

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

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

github-actions Bot commented Aug 24, 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 Aug 24, 2026

Copy link
Copy Markdown
Contributor

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

📰 BREAKING: Report filed by Smoke Docker Sbx

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Contribution Check failed. Please review the logs for details.

Generated by Contribution Check for #7700

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot Engine

✅ GitHub MCP connectivity (PR #7695: Upgrade gh-aw workflows to latest pre-release)
✅ GitHub.com connectivity (HTTP 200)
✅ File write/read test

Overall: PASS

cc @lpcox

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

@github-actions github-actions Bot added smoke-copilot smoke-copilot-network-isolation Copilot network-isolation egress smoke test labels Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

Check Result
API status ✅ PASS
gh check ✅ PASS
File status ✅ PASS

Overall result: PASS

Generated by Smoke Claude for #7700 · haiku45 · 55.7 AIC · ⊞ 4.5K ·
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass

✅ Allowed domain (github.com) reachable: allowed=200
✅ Non-allowed domain (example.com) blocked: denied=000 (CONNECT tunnel failed, 403)

Overall: PASS

@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

Copy link
Copy Markdown
Contributor

Docker Sbx Smoke Test@lpcox

Overall: PASS

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

@github-actions

Copy link
Copy Markdown
Contributor

@lpcox

GitHub MCP PRs: Make digest image validation internals private; Keep default image constants internal: ✅
GitHub.com connectivity: ✅
File write/read: ✅
BYOK inference: ✅
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw)
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

Copy link
Copy Markdown
Contributor

Chroot Version Comparison Results

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

Overall: FAILED — Node.js version mismatch between host and chroot environment. 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

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode ✅ PASS

  • ✅ GitHub.com connectivity (HTTP 200)
  • ✅ File write/read test (smoke-test-copilot-byok.txt)
  • ✅ BYOK inference path (api-proxy → api.githubcopilot.com)
  • ✅ MCP connectivity (PR data verified)

Running in direct BYOK mode via COPILOT_PROVIDER_API_KEY with api-proxy sidecar injection.

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

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results: GitHub Actions Services Connectivity

  • Redis PING: ❌ (name resolution failure)
  • PostgreSQL pg_isready: ❌ (no response)
  • PostgreSQL SELECT 1: ❌ (name resolution failure)
REDIS=Could not connect to Redis at host.docker.internal:6379: Temporary failure in name resolution
PG_READY=host.docker.internal:5432 - no response
PG_QUERY=psql: error: could not translate host name "host.docker.internal" to address: Temporary failure in name resolution

Overall: FAILhost.docker.internal could not be resolved from within the AWF sandbox.

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

@lpcox
lpcox deployed to aoai-model August 24, 2026 15:09 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Upgrade gh-aw workflows to latest pre-release
fix: preserve agent startup with restricted tmp

GitHub MCP: ❌
safeinputs-gh PR query: ❌
Playwright title: ✅
File write/read: ✅
Discussion query/comment: ❌
Build AWF: ✅
Overall: FAIL

Warning

Firewall blocked 3 domains

The following domains were blocked by the firewall during workflow execution:

  • msfeed2.pkgs.visualstudio.com
  • msfeed25.pkgs.visualstudio.com
  • registry.npmjs.org

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

network:
  allowed:
    - defaults
    - "msfeed2.pkgs.visualstudio.com"
    - "msfeed25.pkgs.visualstudio.com"
    - "registry.npmjs.org"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

GitHub MCP Testing: ❌
GitHub.com Connectivity: ✅
File Write/Read Test: ✅
BYOK Inference Test: ✅

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: FAIL

@Copilot @lpcox

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

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: API Proxy OpenTelemetry Tracing

  • Module Loading: otel.js loads cleanly, exports startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled, plus internal helpers (_ProxyAwareOtlpExporter, _FanOutSpanExporter, _FileSpanExporter, etc.)
  • Test Suite: otel.test.js, otel-fanout.test.js, otel-workload-identity.test.js — 68/68 tests passed (3/3 suites)
  • Env Var Forwarding: env-passthrough.ts forwards GITHUB_AW_OTEL_TRACE_ID/GITHUB_AW_OTEL_PARENT_SPAN_ID (+ COPILOT_OTEL_FILE_EXPORTER_PATH) into the agent container; api-proxy-env-config.ts's buildOtelEnv() forwards GH_AW_OTLP_ENDPOINTS, OTEL_EXPORTER_OTLP_ENDPOINT/HEADERS, trace/parent-span IDs, workload identity, and OTEL_SERVICE_NAME into the api-proxy container
  • Token Tracker Integration: onUsage callback present in token-tracker-http.js (invoked after normalized usage extraction) as the documented OTEL hook point
  • ⚠️ OTEL Diagnostics: No live diagnostics artifact/step-summary was available in this run context to confirm actual span export; static/unit validation above passed fully

Overall: PASS — all verifiable scenarios (1–4) succeeded; scenario 5 pending live run data.

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

@github-actions

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 (ran, printed "Hello, World!") ✅ PASS
.NET json-parse N/A (ran, printed expected JSON output) ✅ PASS
Go color ok ✅ PASS
Go env ok ✅ PASS
Go uuid ok ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine 1/1 passed ✅ PASS
Node.js clsx all passed ✅ PASS
Node.js execa all passed ✅ PASS
Node.js p-limit all passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — ✅ PASS

Note: Java's default mvn local repository (~/.m2/repository) was not writable in this sandbox (owned by root), causing an initial LocalRepositoryNotAccessibleException. Retried with -Dmaven.repo.local=<writable-dir> (proxy settings from ~/.m2/settings.xml unaffected), after which both gson and caffeine compiled and tested successfully. This is an environment/permissions quirk unrelated to the AWF firewall itself.

All other ecosystems (Bun, C++, Deno, .NET, Go, Node.js, Rust) built/tested cleanly with no proxy or network issues.

Generated by Build Test Suite for #7700 · auto · 83.4 AIC · ⊞ 12K ·
Add label ready-for-aw to run again

@lpcox
lpcox merged commit 59a01df into main Aug 24, 2026
164 of 170 checks passed
@lpcox
lpcox deleted the copilot/remove-unused-export-cloudhypervisorruntimebackend branch August 24, 2026 15:24
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.

[Export Audit] CloudHypervisorRuntimeBackend - unused export in security-critical module

3 participants