Repository navigation
Fix Cloud Hypervisor enclave admission and expose early startup failures - #11192
Conversation
…ly startup failures Co-authored-by: lpcox <[email protected]>
There was a problem hiding this comment.
🔵 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)
|
@copilot merge main, resolve conflicts, and address all review feedback |
…d-hypervisor-failure Co-authored-by: lpcox <[email protected]>
Merged |
|
✅ Copilot review passed with no inline comments. @copilot Add the |
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 18010d8 |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
|
🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request... |
|
💎 Smoke Gemini is crystallizing results on this pull request... |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
✅ Build Test Suite completed successfully!
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
GitHub MCP Testing: ✅
|
Chroot Version Comparison
Result: Not all tests passed (Node.js version mismatch), so the
|
|
Smoke test:
Overall status: FAIL
|
Smoke Test: Copilot BYOK (Direct Mode) ✅
Status: PASS — Direct BYOK mode (COPILOT_PROVIDER_API_KEY) operational
|
|
Smoke Copilot: PASS
cc
|
|
EGRESS_RESULT allow=pass deny=pass
Overall: PASS — @lpcox
|
|
@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]>
Head branch was pushed to by a user without write access
Merged the latest |
|
| 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
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.
workflow_refandworkflow_sha; reject reusable-job identity. Preserve source/profile pins, artifact attestation, bounded storage, runtime matching, and no fallback.awf-startup-error.jsonexists. Retain only versioned, allowlisted fields instartup.json; discard malformed markers and never publish raw stderr.Example retained diagnostic:
{"schemaVersion":1,"phase":"backend-selection","reason":"cloud-hypervisor-enclave-admission"}