Skip to content

Fix Cloud Hypervisor trusted artifact EACCES on hosted runners - #8835

Merged
lpcox merged 6 commits into
mainfrom
copilot/fix-cloud-hypervisor-eacces-failures
Sep 21, 2026
Merged

lpcox merged 6 commits into
mainfrom
copilot/fix-cloud-hypervisor-eacces-failures

Conversation

Copilot AI commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Cloud Hypervisor startup could fail before the agent launched because AWF staged the trusted cloud-hypervisor binary under /run, which may be mounted or constrained in ways that reject execution despite correct file modes. This keeps artifact verification fail-closed while moving executable staging to an exec-capable root and improving EACCES diagnostics.

  • Trusted artifact staging

    • Stages executable snapshots under:
      /var/lib/awf-cloud-hypervisor/trusted-artifacts
    • Keeps /run/awf-cloud-hypervisor for runtime state.
    • Preserves root-owned, non-writable snapshot permissions and digest/version verification before use.
  • Failure diagnostics

    • Adds execution-probe diagnostics for:
      • effective UID/GID and groups
      • mount options for the staged binary path
      • stat and ACL data for each path component
    • Makes future EACCES failures actionable instead of opaque.
  • Cleanup compatibility

    • Updates cleanup validation for the new trusted-artifact root.
    • Still accepts legacy /run snapshot records so older pending cleanup records can be reaped safely after upgrade.
  • Regression coverage

    • Adds focused preflight coverage for the new staging root and EACCES diagnostic output.
    • Updates Cloud Hypervisor docs and live-smoke residue checks to match the new snapshot location.

Copilot AI changed the title [WIP] Fix Cloud Hypervisor trusted-artifact EACCES failures on hosted runners Fix Cloud Hypervisor trusted artifact EACCES on hosted runners Sep 21, 2026
Copilot AI requested a review from lpcox September 21, 2026 16:00
@lpcox
lpcox marked this pull request as ready for review September 21, 2026 16:05
Copilot AI balanced review requested due to automatic review settings September 21, 2026 16:05

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 review overview

🟡 Changes recommended

Several smoke and workflow probes still use the legacy path, breaking process-death coverage and residue detection.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Moves trusted Cloud Hypervisor artifacts to an exec-capable staging root while preserving verification and cleanup compatibility.

Changes:

  • Stages artifacts under /var/lib/awf-cloud-hypervisor.
  • Adds execution-failure diagnostics.
  • Updates cleanup validation, tests, smoke checks, and documentation.
File Description
src/​cloud-hypervisor/​preflight.ts Moves staging and adds diagnostics.
src/​cloud-hypervisor/​preflight.test.ts Tests staging and diagnostics.
src/​cloud-hypervisor/​manager-types.ts Defines shared path constants.
src/​cloud-hypervisor/​cleanup-identity.ts Accepts current and legacy cleanup paths.
src/​cloud-hypervisor/​cleanup-handle.ts Uses shared snapshot-path validation.
scripts/​ci/​cloud-hypervisor-live-smoke.sh Updates residue checks.
docs/​cloud-hypervisor-foundation.md Documents the new staging path.

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

fi
if sudo pgrep -f '/run/awf-cloud-hypervisor/trusted-artifacts/run-[^/]*/[c]loud-hypervisor --api-socket' >/dev/null 2>&1; then
sudo pgrep -af '/run/awf-cloud-hypervisor/trusted-artifacts/run-[^/]*/[c]loud-hypervisor --api-socket' >&2
if sudo pgrep -f '/var/lib/awf-cloud-hypervisor/trusted-artifacts/run-[^/]*/[c]loud-hypervisor --api-socket' >/dev/null 2>&1; then
Comment on lines +431 to +437
expect(fs.mkdir).toHaveBeenCalledWith(CLOUD_HYPERVISOR_ARTIFACT_SNAPSHOT_ROOT, {
recursive: true,
mode: 0o711,
});
expect(fs.mkdtemp).toHaveBeenCalledWith(
path.join(CLOUD_HYPERVISOR_ARTIFACT_SNAPSHOT_ROOT, 'run-'),
);
@lpcox

lpcox commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

@copilot address the review feedback. also make sure that errors in which external binaries are not available are clear and not interpretted as permissions failures.

Copilot AI commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

@copilot address the review feedback. also make sure that errors in which external binaries are not available are clear and not interpretted as permissions failures.

Addressed in 60c87a4 and af04459. Remaining process probes now use the /var/lib snapshot root, the regression test pins that root explicitly, and ENOENT reports an unavailable external binary separately from EACCES permission diagnostics. Targeted tests and type-check pass.

@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

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

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

Built from commit 70381b3

@github-actions

github-actions Bot commented Sep 21, 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 Sep 21, 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 Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Warning

Firewall blocked 7 domains

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

  • accounts.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • msfeed25.pkgs.visualstudio.com
  • update.googleapis.com
  • www.google.com
  • www.gstatic.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "msfeed25.pkgs.visualstudio.com"
    - "update.googleapis.com"
    - "www.google.com"
    - "www.gstatic.com"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

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

🪪 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 Sep 21, 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 Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ Build Test Suite completed successfully!

Generated by Build Test Suite for #8835

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

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

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

@github-actions github-actions Bot added the smoke-copilot-network-isolation Copilot network-isolation egress smoke test label Sep 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass

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

Overall: PASS — network isolation egress enforcement working as expected.

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

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

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

Overall result: PASS

Warning

Firewall blocked 1 domain

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

  • api.anthropic.com

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

network:
  allowed:
    - defaults
    - "api.anthropic.com"

See Network Configuration for more information.

Generated by Smoke Claude for #8835 · claude · haiku45 · 55.8 AIC · ⊞ 4.7K · ◷
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

🔐 Smoke Test: Copilot BYOK (Direct Mode)

✅ MCP Connectivity - Fetched latest merged PRs (#8818, #8815)
✅ GitHub.com - HTTP 200 connectivity confirmed
✅ File I/O - Smoke test result file readable
✅ BYOK Inference - Direct BYOK mode active (COPILOT_PROVIDER_API_KEY → api-proxy → api.githubcopilot.com)

Overall Status: PASS

Running in direct BYOK mode with real credentials held by api-proxy sidecar.

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

@github-actions

Copy link
Copy Markdown
Contributor

🔥 Smoke Test: Copilot Engine

Overall: PASS

cc @lpcox

📰 BREAKING: Report filed by Smoke Copilot
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.21.0 v2.98.0 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

⚠️ Not all tests passed — Node.js version mismatch between host and chroot environments. The smoke-chroot label was not added.

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

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Services Connectivity

  • Redis PING: ✅ (PONG)
  • PostgreSQL pg_isready: ✅ (accepting connections)
  • PostgreSQL SELECT 1: ✅ (1)

Overall: PASS

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

@github-actions

Copy link
Copy Markdown
Contributor

Smoke test:

  • Refactor filtered model alias snapshots
  • test(nvx): gate Linux-specific cases
  • Merged PR review: ✅
  • PR detail lookup: ✅
  • Playwright title check: ✅
  • Temp file + cat: ✅
  • npm ci && npm run build: ✅
  • Discussion comment: ✅
  • Overall: PASS

Warning

Firewall blocked 7 domains

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

  • accounts.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • msfeed25.pkgs.visualstudio.com
  • update.googleapis.com
  • www.google.com
  • www.gstatic.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "msfeed25.pkgs.visualstudio.com"
    - "update.googleapis.com"
    - "www.google.com"
    - "www.gstatic.com"

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

🏗️ 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 ✅ 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 ✅ 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:

  • All 8 repositories cloned successfully.
  • Java required a workaround: the default ~/.m2/repository directory was owned by root and not writable in this sandbox, so Maven was run with -Dmaven.repo.local=/tmp/gh-aw/agent/m2-repo (a permission issue unrelated to the firewall/proxy config). Both gson and caffeine then compiled and passed tests.
  • No firewall/proxy-related failures were observed across any ecosystem.

Generated by Build Test Suite for #8835 · copilot · auto · 49.8 AIC · ⊞ 11.8K · ◷
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

📡 OTel Tracing Smoke Test Results

# Scenario Result
1 Module Loading ✅ otel.js loaded successfully. isEnabled(): true. Exports: startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled + internals.
2 Test Suite ✅ 3 suites / 68 tests passed, 0 failed (otel.test.js, otel-fanout.test.js, otel-workload-identity.test.js).
3 Env Var Forwarding ✅ GITHUB_AW_OTEL_TRACE_ID/GITHUB_AW_OTEL_PARENT_SPAN_ID present in env-passthrough.ts; GH_AW_OTLP_ENDPOINTS, OTEL_EXPORTER_OTLP_ENDPOINT, and trace context present in api-proxy-env-config.ts.
4 Token Tracker Integration ✅ onUsage callback confirmed in token-tracker-http.js (OTEL hook point).
5 OTLP Export Diagnostics ✅ Live export confirmed: Squid access log shows repeated CONNECT 200 TCP_TUNNEL:HIER_DIRECT to o205451.ingest.us.sentry.io:443 from the api-proxy (172.30.0.30); 12 token-usage records logged for the run's requests.

Summary: All 5 scenarios pass — OTEL module init, span/token/parent-context config, and OTLP export via Squid to the configured Sentry endpoint all working as expected. No regressions detected.

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

This branch was previously deployed

1 inactive deployment
aoai-model — af044599 Deployed Sep 21, 2026 by lpcox via conclusion #1710
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.

Fix Cloud Hypervisor trusted-artifact EACCES failures on hosted runners

3 participants