Skip to content

Retry transient Cloud Hypervisor version-probe failures in preflight - #8801

Merged
lpcox merged 4 commits into
mainfrom
copilot/debug-sbx-gvisor-doc-updater
Sep 20, 2026
Merged

lpcox merged 4 commits into
mainfrom
copilot/debug-sbx-gvisor-doc-updater

Conversation

Copilot AI commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

The "sbx, gVisor & Cloud Hypervisor Documentation Updater" workflow failed with an opaque "engine terminated before producing output" error. The actual failure occurred earlier, in AWF's Cloud Hypervisor preflight: the --version probe on the staged cloud-hypervisor binary failed with exited with code undefined, even though the binary's SHA-256 digest had already been verified against the trusted manifest. Both the initial attempt and the automatic AWF startup retry hit the identical failure, aborting the run before the copilot engine ever started.

Root cause

Since the artifact's digest is verified before the --version probe runs, a probe failure at that point reflects a transient exec/host hiccup (not a corrupt or wrong binary) — but runCloudHypervisorPreflight had no retry around it, so any single flaky exec failed the whole run.

Changes

  • Bounded retry for version probes — src/cloud-hypervisor/preflight.ts now wraps the cloud-hypervisor and virtiofsd --version probes in runVersionWithRetry (3 attempts, 250ms apart), since the content is already trusted by this point.
  • Fail-fast on deterministic errors — ENOENT/EACCES/EISDIR/ENOTDIR/ENOEXEC failures skip the retry and fail closed immediately, since they won't resolve on their own. The default runVersion now attaches a structured error.code for reliable classification (message-text parsing remains as a fallback for custom runVersion overrides).
  • Retry visibility — each retry attempt logs a logger.warn with the attempt count and underlying error.
const version = parseCloudHypervisorVersion(
  await runVersionWithRetry(dependencies, snapshot.cloudHypervisorBinary),
);

Tests

Added coverage in preflight.test.ts for: retry-then-succeed, retry-exhausted-then-fail, fail-fast on message-coded permanent errors, and fail-fast on structured error.code permanent errors.

Copilot AI changed the title [WIP] Fix workflow failure for sbx, gVisor & Cloud Hypervisor documentation updater Retry transient Cloud Hypervisor version-probe failures in preflight Sep 20, 2026
Copilot AI requested a review from lpcox September 20, 2026 16:44
@lpcox
lpcox marked this pull request as ready for review September 20, 2026 17:26
Copilot AI balanced review requested due to automatic review settings September 20, 2026 17: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 review overview

🟢 Approval recommended

The retry behavior is bounded, fail-closed, and adequately covered by focused tests.

Review effort: Balanced
Findings: None

What changed in this PR

Adds bounded retries for transient Cloud Hypervisor preflight version-probe failures while preserving fail-fast behavior for deterministic execution errors.

Changes:

  • Retries both binary version probes up to three times.
  • Preserves structured execution error codes for classification.
  • Adds retry, exhaustion, and permanent-error tests.
File Description
src/​cloud-hypervisor/​preflight.ts Implements classified version-probe retries and warnings.
src/​cloud-hypervisor/​preflight.test.ts Covers successful retries, exhaustion, and fail-fast errors.

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

@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 Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

Metric Base PR Delta
Lines 93.29% 93.30% ➡️ +0.01%
Statements 91.97% 91.98% 📈 +0.01%
Functions 92.16% 92.17% 📈 +0.01%
Branches 85.80% 85.77% 📉 -0.03%
📁 Per-file Coverage Changes (3 files)
File Lines (Before → After) Statements (Before → After)
src/nvx/one-shot-adapter.ts 80.4% → 79.8% (-0.58%) 77.8% → 77.3% (-0.54%)
src/cloud-hypervisor/preflight.ts 94.3% → 94.8% (+0.50%) 93.6% → 94.2% (+0.60%)
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

@lpcox
lpcox enabled auto-merge (squash) September 20, 2026 18:19
@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

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

📰 BREAKING: Report filed by Smoke Docker Sbx

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Sep 20, 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

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

✅ Build Test Suite completed successfully!

Generated by Build Test Suite for #8801

@github-actions

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

Copy link
Copy Markdown
Contributor

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

Warning

Firewall blocked 1 domain

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

  • msfeed25.pkgs.visualstudio.com

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

network:
  allowed:
    - defaults
    - "msfeed25.pkgs.visualstudio.com"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex

@github-actions

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

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass

✅ Allowed domain (github.com) reachable: allowed=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

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot Engine

  • ✅ GitHub MCP connectivity (PR mossaka/log filtering #5 mossaka/log filtering)
  • ✅ GitHub.com connectivity (HTTP 200)
  • ✅ File write/read test

Recent PRs: #8800 Deduplicate nested-KVM connectivity probe test setup · #8785 feat: add NVX Phase 3a confinement foundations

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-network-isolation Copilot network-isolation egress smoke test smoke-copilot labels Sep 20, 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

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 #8801 · claude · haiku45 · 30.7 AIC · ⊞ 4.7K · ◷
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) ✅ PASS

  • ✅ GitHub MCP connectivity: PR data verified
  • ✅ github.com connectivity: HTTP 200
  • ✅ File write/read: /tmp/gh-aw/agent/smoke-test-copilot-byok.txt exists
  • ✅ BYOK inference: Running in direct mode (agent → api-proxy → api.githubcopilot.com)

Mode: Direct BYOK (COPILOT_PROVIDER_API_KEY via 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: API Proxy OTel Tracing — Results

# Scenario Result
1 Module Loading ✅ otel.js loaded, isEnabled(): true, exports: startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled + internal helpers
2 Test Suite ✅ 3 suites, 68/68 tests passed (otel.test.js, otel-fanout.test.js, otel-workload-identity.test.js)
3 Env Var Forwarding ✅ env-passthrough.ts forwards GITHUB_AW_OTEL_TRACE_ID/GITHUB_AW_OTEL_PARENT_SPAN_ID; api-proxy-env-config.ts forwards GH_AW_OTLP_ENDPOINTS, OTEL_EXPORTER_OTLP_ENDPOINT, and trace context
4 Token Tracker Integration ✅ onUsage callback present in token-tracker-http.js (OTEL hook point)
5 OTEL Diagnostics ✅ /tmp/gh-aw/otel.jsonl contains 1 exported resourceSpans record with gh-aw.agent.setup span, correct traceId/spanId/parentSpanId matching workflow env vars, and full GitHub/runner resource attributes

All 5 scenarios passed. Live spans were exported end-to-end through the OTLP pipeline with correct GenAI/GitHub attributes and parent-context propagation. No regressions detected.

📡 OTel tracing validated by Smoke OTel Tracing
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 v22.23.2 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

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

Copy link
Copy Markdown
Contributor

Smoke Test: Services Connectivity

  • Redis PING: ✅ PONG
  • Postgres pg_isready: ✅ accepting connections
  • Postgres 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

🏗️ 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) ✅ PASS
.NET json-parse ✅ N/A (ran) ✅ PASS
Go color ✅ passed ✅ PASS
Go env ✅ passed ✅ PASS
Go uuid ✅ 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:

  • All 8 repositories cloned successfully.
  • Java builds initially failed due to ~/.m2/repository being owned by root (pre-existing directory in the environment); resolved by setting <localRepository> in settings.xml to a writable path (/tmp/gh-aw/agent/m2-repo) while keeping the required Squid proxy config. Not a firewall/network issue — a local filesystem permission artifact of this run environment.
  • No network egress errors were observed against the AWF firewall proxy for any ecosystem.

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

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test

  • Deduplicate nested-KVM connectivity probe test setup
  • feat: add NVX Phase 3a confinement foundations
  • GitHub PR checks: ✅
  • Playwright title check: ❌
  • File write/read: ✅
  • AWF build: ✅
  • Overall: FAIL

Warning

Firewall blocked 1 domain

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

  • msfeed25.pkgs.visualstudio.com

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

network:
  allowed:
    - defaults
    - "msfeed25.pkgs.visualstudio.com"

See Network Configuration for more information.

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

@lpcox
lpcox merged commit f1a9980 into main Sep 20, 2026
177 of 185 checks passed
@lpcox
lpcox deleted the copilot/debug-sbx-gvisor-doc-updater branch September 20, 2026 18:31
lpcox pushed a commit that referenced this pull request Sep 22, 2026
…follow-up (#8854)

* Initial plan

* docs: update D14 runner-doctor catalog with #8801 retry fix

* docs: align D14 citations across mirrored catalog files

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

This branch was previously deployed

1 inactive deployment
aoai-model — 0d10d27e Deployed Sep 20, 2026 by lpcox via conclusion #1705
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.

[aw] sbx, gVisor & Cloud Hypervisor Documentation Updater failed

3 participants