Skip to content

Fix Cloud Hypervisor enclave regression admission - #11223

Merged
lpcox merged 4 commits into
mainfrom
copilot/fix-cloud-hypervisor-regression
Nov 7, 2026
Merged

lpcox merged 4 commits into
mainfrom
copilot/fix-cloud-hypervisor-regression

Conversation

Copilot AI commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

All three enclave profiles reject before broker startup, but the aggregate admission reason hides the failing check. The guard also excludes valid regional GitHub Actions OIDC endpoints, while harness-created work directories produce secondary cleanup failures.

  • Admission: Accept regional HTTPS endpoints within GitHub’s .actions.githubusercontent.com namespace. Preserve signed workflow/source pins, exact profiles, artifact attestation, storage bounds, runtime matching, and no fallback.
  • Diagnostics: Retain versioned, finite reasons distinguishing workflow/source, configuration/profile, token acquisition, signature, and claim rejection. Exclude tokens, URLs, headers, and raw stderr; disable curlrc loading.
  • Cleanup: Let AWF create its work directory. Continue detecting—and preserving—unverified recovery residue.
  • Regression coverage: Exercise production configuration assembly with signed ordinary-workflow fixtures for all three profiles, including regional endpoints, malformed/untrusted identities, reusable-job impersonation, and pre-start rejection.

Hosted confirmation remains pending; the historical aggregate record cannot establish its precise failing subcondition.

Copilot AI changed the title [WIP] Fix Cloud Hypervisor regression admission rejecting all enclave profiles Fix Cloud Hypervisor enclave regression admission Nov 6, 2026
Copilot AI requested a review from lpcox November 6, 2026 23:15
@lpcox
lpcox marked this pull request as ready for review November 6, 2026 23:23
Copilot AI adaptive review requested due to automatic review settings November 6, 2026 23: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.

🟡 Changes recommended

The workflow-claim check still rejects valid ordinary-job attestations, leaving hosted admission broken even after token acquisition is fixed.

3 open issues
What changed in this PR

This PR targets the pre-broker Cloud Hypervisor enclave admission failures tracked in #11220, updating admission checks, startup diagnostics, and regression-harness cleanup. Hosted confirmation remains pending.

Changes:

  • Accept regional GitHub Actions OIDC endpoints while preserving signed identity and profile checks.
  • Retain finite admission-failure reasons and disable automatic curl configuration loading.
  • Let AWF create its work directory and expand configuration-assembly, identity, and cleanup coverage.
File Description
src/​logs/​early-startup-schema.json Allowlist specific admission-failure reasons.
src/​logs/​early-startup-diagnostics.test.ts Cover safe emission of each admission reason.
src/​enclave/​cloud-hypervisor-conformance-acceptance.ts Support regional endpoints and classify admission failures.
src/​cloud-hypervisor/​runtime-validation.ts Propagate detailed rejection codes.
scripts/​ci/​run-enclave-agent-regression.js Stop pre-creating AWF’s work directory.
scripts/​ci/​enclave-agent-regression.test.ts Exercise production assembly, signed identities, and pre-start cleanup.
scripts/​ci/​collect-enclave-smoke-debug.test.ts Cover export of detailed admission reasons.
scripts/​ci/​collect-enclave-smoke-debug.cjs Preserve new reasons in sanitized startup artifacts.
scripts/​ci/​cloud-hypervisor-enclave-live-smoke.test.ts Extend startup-diagnostic retention coverage.
docs/​cloud-hypervisor-foundation.md Document admission reasons, endpoint handling, and cleanup ownership.

Review effort: Max (auto)

&& claims.job_workflow_ref === undefined
&& sha === CLOUD_HYPERVISOR_REGRESSION_COMMIT ? claims : undefined;
&& sha === CLOUD_HYPERVISOR_REGRESSION_COMMIT
? 'verified' : 'cloud-hypervisor-enclave-admission-claims';
Comment on lines +312 to +313
if (accepted) {
const assembled = assemble();
throw Object.assign(new Error(
'Cloud Hypervisor primary-agent execution with enclaves is reserved until the '
+ 'real end-to-end isolation acceptance completes; no runtime fallback is permitted',
), { code: rejection });
@lpcox

lpcox commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

@copilot address review feedback

Copilot AI commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@copilot address review feedback

Addressed the review feedback in d5f9285.

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

Built from commit 9dece44

@lpcox

lpcox commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

@copilot make sure that 'npm test' runs without any failures and fix this failing conformance ci check https://github.com/github/gh-aw-firewall/actions/runs/42314692578/job/128224812613?pr=11223

Copilot AI commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot make sure that 'npm test' runs without any failures and fix this failing conformance ci check https://github.com/github/gh-aw-firewall/actions/runs/42314692578/job/128224812613?pr=11223

Fixed the admission bypass so unsupported configurations receive the generic denial while only a verified pinned regression is admitted. Focused tests (148 passed) and npm test (12,328 passed; 73 skipped) pass. Commit: 1bef0e3.

@lpcox
lpcox enabled auto-merge (squash) November 7, 2026 00:34
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services is testing service connectivity for this pull request...

@github-actions

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

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

fix: handle Copilot zero-batch tariffs without masking model policy
Centralize sudo operator identity parsing
✅ MCP connectivity
✅ GitHub.com connectivity
✅ File read/write
✅ BYOK inference
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: PASS
@Copilot @lpcox

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

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

@Copilot @lpcox

  • fix: handle Copilot zero-batch tariffs without masking model policy: ✅
  • Centralize sudo operator identity parsing: ✅

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

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Cloud Hypervisor + Copilot smoke test

  1. Merged PR lookup: PASS
  2. github.com connectivity: PASS (HTTP 200)
  3. File write/read: PASS
  4. example.com blocked: PASS (HTTP 000)

Overall: PASS

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

OTEL smoke test

  • ✅ S1: otel.js loads; exports startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, routerCallTracing, shutdown, isEnabled
  • ✅ S2: 3 OTEL suites, 75/75 tests pass
  • ✅ S3: trace context (GITHUB_AW_OTEL_TRACE_ID/PARENT_SPAN_ID) forwarded in env-passthrough.ts; OTEL vars in api-proxy-env-config.ts
  • ✅ S4: onUsage hook present in token-tracker-http.js
  • ✅ S5: otel.jsonl has 1 record in this run

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

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode ✅

All tests passed — Direct BYOK mode active (COPILOT_PROVIDER_API_KEY → api-proxy → api.githubcopilot.com)

Test Result
GitHub MCP connectivity ✅
GitHub.com connectivity (HTTP 200) ✅
File write/read ✅
BYOK inference path ✅

Status: PASS — Agent credential isolation working, api-proxy injection functional.

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

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot
PRs: "fix: handle Copilot zero-batch tariffs without masking model policy", "Centralize sudo operator identity parsing"

  • GitHub MCP ✅
  • GitHub.com connectivity ✅
  • File write/read ✅

PASS — @Copilot @lpcox

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

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Chroot Version Comparison

Runtime Host Version Chroot Version Match?
Python Python 3.12.16 Python 3.12.16 ✅
Node.js v24.22.2 v22.23.2 ❌
Go go1.22.12 go1.22.12 ✅

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 7, 2026

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 ❌ FAIL
.NET json-parse ❌ N/A ❌ FAIL
Go color ✅ pass ✅ PASS
Go env ✅ pass ✅ PASS
Go uuid ✅ pass ✅ PASS
Java gson ❌ N/A ❌ FAIL
Java caffeine ❌ N/A ❌ FAIL
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: 6/8 ecosystems passed — FAIL

Failures

  • .NET (dotnet restore): System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations' (lstat("/run/user/1001") == -1; ENOENT).
  • Java (mvn compile): Could not create local repository at /home/runner/.m2/repository.

Both failures look like environment and filesystem issues in the sandbox (a missing runtime dir and an unwritable ~/.m2), not network blocking. I didn't investigate further or work around them. The build-test label was not added.

Generated by Build Test Suite for #11223 · copilot · auto · ~20 AIC · ⊞ 5.7K · ◷
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

11216 fix: handle Copilot zero-batch tariffs without masking model policy
11214 Centralize sudo operator identity parsing
Merged PR review ✅
PR detail fetch ✅
Playwright title check ❌
Temp file write/read ✅
AWF build ✅
Overall: FAIL

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

@github-actions

github-actions Bot commented Nov 7, 2026

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 #11223 · claude · haiku45 · ~35 AIC · ⊞ 6.1K · ◷
Add label ready-for-aw to run again

@lpcox
lpcox merged commit 8997dc9 into main Nov 7, 2026
156 of 162 checks passed
@lpcox
lpcox deleted the copilot/fix-cloud-hypervisor-regression branch November 7, 2026 00:59

This branch was previously deployed

1 inactive deployment
aoai-model — 1bef0e3f Deployed Nov 7, 2026 by lpcox via conclusion #2281
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 regression admission still rejecting all three enclave profiles

3 participants