Skip to content

Fix Cloud Hypervisor enclave admission and expose early startup failures - #11192

Merged
lpcox merged 4 commits into
mainfrom
copilot/diagnose-cloud-hypervisor-failure
Nov 6, 2026
Merged

lpcox merged 4 commits into
mainfrom
copilot/diagnose-cloud-hypervisor-failure

Conversation

Copilot AI commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

All three Cloud Hypervisor enclave cases exit before broker readiness, without a retained startup reason. The shared admission guard expects reusable-job OIDC claims from ordinary workflow jobs, rejecting their signed identities before diagnostics initialize.

  • Admission: Validate signed workflow_ref and workflow_sha; reject reusable-job identity. Preserve source/profile pins, artifact attestation, bounded storage, runtime matching, and no fallback.
  • Diagnostics: Capture configuration, validation, and backend-selection failures before awf-startup-error.json exists. Retain only versioned, allowlisted fields in startup.json; discard malformed markers and never publish raw stderr.
  • Regression coverage: Model ordinary-workflow tokens across all three agents; cover identity rejection, early CLI exits, malformed markers, and protected export.
  • Remaining verification: Live broker/gateway readiness and one approved invocation per agent still require CI validation.

Example retained diagnostic:

{"schemaVersion":1,"phase":"backend-selection","reason":"cloud-hypervisor-enclave-admission"}

Copilot AI changed the title [WIP] Diagnose shared Cloud Hypervisor enclave pre-broker exit Fix Cloud Hypervisor enclave admission and expose early startup failures Nov 6, 2026
Copilot AI requested a review from lpcox November 6, 2026 15:17
@lpcox
lpcox marked this pull request as ready for review November 6, 2026 15:24
Copilot AI adaptive review requested due to automatic review settings November 6, 2026 15:24

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.

🔵 Needs a closer look

The security-sensitive OIDC admission change still needs live GitHub-hosted CI validation of broker/gateway readiness and approved invocations for Copilot, Codex, and Claude while preserving isolation and cleanup gates.

No open issues 🎉

What changed in this PR

Updates AWF’s Cloud Hypervisor enclave admission for ordinary workflow jobs and preserves sanitized diagnostics for failures before startup records exist.

Changes:

  • Validates signed workflow identity while rejecting reusable-job claims and preserving existing admission safeguards.
  • Adds allowlisted early-failure markers and retains them through the protected startup exporter.
  • Extends regression coverage and documentation for identity checks, early exits, and malformed markers.
File Description
src/​logs/​early-startup-schema.json Defines allowed diagnostic phases, reasons, and categories.
src/​logs/​early-startup-diagnostics.ts Emits sanitized early-failure markers.
src/​logs/​early-startup-diagnostics.test.ts Covers nested diagnostics and early CLI exits.
src/​enclave/​cloud-hypervisor-conformance-acceptance.ts Updates signed workflow identity checks.
src/​commands/​validators/​config-assembly.ts Captures backend-validation failures.
src/​commands/​main-action.ts Captures configuration and option-validation failures.
src/​cloud-hypervisor/​runtime-validation.ts Adds a fixed admission-error code.
src/​cli.ts Captures failures during argument parsing.
scripts/​ci/​enclave-agent-regression.test.ts Models ordinary-job tokens and identity rejection cases.
scripts/​ci/​collect-enclave-smoke-debug.test.ts Tests protected early-reason retention.
scripts/​ci/​collect-enclave-smoke-debug.cjs Allows sanitized early-failure fields in exports.
scripts/​ci/​cloud-hypervisor-enclave-live-smoke.test.ts Tests valid and malformed diagnostic markers.
scripts/​ci/​cloud-hypervisor-enclave-live-smoke.js Projects early markers into startup evidence.
docs/​cloud-hypervisor-foundation.md Documents admission and diagnostic behavior.

Review effort: Max (auto)

@lpcox

lpcox commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

@copilot merge main, resolve conflicts, and address all review feedback

Copilot AI commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@copilot merge main, resolve conflicts, and address all review feedback

Merged main without conflicts in d8b0157. The live conformance run is still gated (action_required, zero jobs), so the requested hosted broker/gateway and agent validation remains pending. Local regression tests were also blocked because dependency installation did not complete.

@github-actions

github-actions Bot commented Nov 6, 2026

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

github-actions Bot commented Nov 6, 2026 •

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-11192 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit 18010d8

@github-actions

github-actions Bot commented Nov 6, 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 Nov 6, 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 Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request...

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

💎 Smoke Gemini is crystallizing results on this pull request...

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

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

🛡️ Egress verdict from Smoke Copilot Network Isolation

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ Build Test Suite completed successfully!

Generated by Build Test Suite for #11192

@github-actions

github-actions Bot commented Nov 6, 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 Nov 6, 2026

Copy link
Copy Markdown
Contributor

GitHub MCP Testing: ✅
GitHub.com Connectivity: ✅
File Write/Read Test: ✅
BYOK Inference Test: ✅
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw)
Overall Status: PASS
@Copilot @lpcox

🔑 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 Nov 6, 2026

Copy link
Copy Markdown
Contributor

Chroot Version Comparison

Runtime Host Version Chroot Version Match?
Python Python 3.12.16 Python 3.12.16 ✅ YES
Node.js v24.22.2 v26.11.1 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Result: Not all tests passed (Node.js version mismatch), so the smoke-chroot label was not added.

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

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Smoke test:

  • chore: refresh canonical model sources ✅ merged PR read
  • docs: sync schemas and specs with source changes ✅ PR detail read
  • Playwright title check ❌
  • Temp file write/read ✅
  • Build (npm ci && npm run build) ✅

Overall status: FAIL

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

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct Mode) ✅

Test Result
GitHub MCP connectivity ✅ (PR #11183, #11180 verified)
GitHub.com connectivity ✅ (HTTP 200)
File write/read ✅ (smoke-test verified)
BYOK inference path ✅ (Running via api-proxy → api.githubcopilot.com)

Status: PASS — Direct BYOK mode (COPILOT_PROVIDER_API_KEY) operational

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

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot: PASS

  • ✅ GitHub MCP: "feat(router)!: update the bundled routing tables to schema version 2"
  • ✅ GitHub.com (200)
  • ✅ File write/read

cc @Copilot @lpcox

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

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

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass

  • ✅ Allowed domain (api.github.com → 200)
  • ✅ Blocked domain (example.com blocked)

Overall: PASS — @lpcox

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

@lpcox
lpcox enabled auto-merge (squash) November 6, 2026 18:51
@lpcox

lpcox commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

@copilot merge main and resolve the conflicts

…d-hypervisor-failure

# Conflicts:
#	docs/cloud-hypervisor-foundation.md
#	scripts/ci/collect-enclave-smoke-debug.test.ts

Co-authored-by: lpcox <[email protected]>
auto-merge was automatically disabled November 6, 2026 19:13

Head branch was pushed to by a user without write access

Copilot AI commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@copilot merge main and resolve the conflicts

Merged the latest main and resolved both conflicts, preserving the changes from each branch. The two-parent merge commit is ab76f68.

@github-actions

github-actions Bot commented Nov 6, 2026

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.73% 93.75% 📈 +0.02%
Statements 92.27% 92.28% 📈 +0.01%
Functions 93.07% 93.02% 📉 -0.05%
Branches 86.55% 86.56% 📈 +0.01%
📁 Per-file Coverage Changes (4 files)
File Lines (Before → After) Statements (Before → After)
src/commands/main-action.ts 91.7% → 92.0% (+0.31%) 91.4% → 91.7% (+0.30%)
src/commands/validators/config-assembly.ts 82.1% → 83.3% (+1.19%) 82.1% → 82.0% (-0.18%)
src/cli.ts 87.5% → 88.9% (+1.38%) 87.5% → 80.0% (-7.50%)
src/nvx/one-shot-process.ts 81.5% → 84.0% (+2.47%) 74.7% → 76.8% (+2.11%)
✨ New Files (1 files)
  • src/logs/early-startup-diagnostics.ts: 100.0% lines

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

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.

Diagnose shared Cloud Hypervisor enclave pre-broker exit and expose its startup reason

3 participants